HosrDiretta
Loading...
Searching...
No Matches
ACQUA::BufferArray< si > Class Template Reference

Fixed-length heap memory buffer. More...

#include <Buffer.hpp>

Public Member Functions

std::uint8_t & operator[] (size_t p)
 Returns a reference to the byte at the specified index.
 
std::uint8_t operator[] (size_t p) const
 Const subscript operator that returns the byte at the specified index.
 
 operator BufferCS ()
 Implicit conversion operator to BufferCS that constructs and returns a BufferCS initialized with the object's Data and si members.
 
 operator BufferCS_const () const
 Const-qualified conversion operator that creates and returns a BufferCS_const constructed from the object's Data and si members.
 
std::size_t size () const
 Returns the stored size of the buffer.
 
std::string dump () const
 Returns a textual dump of the object's buffer by converting to BufferCS_const and invoking its dump() method.
 
std::string dump (std::size_t s) const
 Returns a textual dump of the object's buffer by converting to BufferCS_const and invoking its dump() method. Size specification.
 

Detailed Description

template<size_t si>
class ACQUA::BufferArray< si >

Fixed-length heap memory buffer.

Template Parameters
siLength

Member Function Documentation

◆ dump() [1/2]

template<size_t si>
std::string ACQUA::BufferArray< si >::dump ( ) const
inline

Returns a textual dump of the object's buffer by converting to BufferCS_const and invoking its dump() method.

Returns
A std::string containing the buffer dump.

◆ dump() [2/2]

template<size_t si>
std::string ACQUA::BufferArray< si >::dump ( std::size_t s) const
inline

Returns a textual dump of the object's buffer by converting to BufferCS_const and invoking its dump() method. Size specification.

Parameters
sThe number of bytes (or elements) to include in the dump.
Returns
std::string containing the buffer dump.

◆ operator[]() [1/2]

template<size_t si>
std::uint8_t & ACQUA::BufferArray< si >::operator[] ( size_t p)
inline

Returns a reference to the byte at the specified index.

Parameters
pIndex of the element to access.
Returns
A reference to the std::uint8_t element at index p. Behavior is undefined if p is out of range.

◆ operator[]() [2/2]

template<size_t si>
std::uint8_t ACQUA::BufferArray< si >::operator[] ( size_t p) const
inline

Const subscript operator that returns the byte at the specified index.

Parameters
pZero-based index of the element to retrieve from Data.
Returns
The byte value at index p (std::uint8_t).

◆ size()

template<size_t si>
std::size_t ACQUA::BufferArray< si >::size ( ) const
inline

Returns the stored size of the buffer.

Returns
The size as a std::size_t, taken from the member variable si.

The documentation for this class was generated from the following file: