DUNE: Uniform Navigational Environment  2.4.2
DUNE::Utils::ByteBuffer Class Reference

Public Member Functions

 ByteBuffer (uint32_t capacity=128)
 
 ~ByteBuffer (void)
 
void grow (uint32_t size)
 
void write (const uint8_t *data, uint32_t size)
 
void resetBuffer (void)
 
void append (const uint8_t *data, uint32_t size)
 
void appendSigned (const char *data, uint32_t size)
 
void setSize (uint32_t size)
 
uint8_t * getBuffer (void)
 
char * getBufferSigned (void)
 
uint32_t getCapacity (void)
 
uint32_t getSize (void)
 
uint32_t getRemaining (void)
 

Friends

std::ostream & operator<< (std::ostream &os, ByteBuffer &buffer)
 

Constructor & Destructor Documentation

DUNE::Utils::ByteBuffer::ByteBuffer ( uint32_t  capacity = 128)
inline
DUNE::Utils::ByteBuffer::~ByteBuffer ( void  )
inline

Member Function Documentation

void DUNE::Utils::ByteBuffer::append ( const uint8_t *  data,
uint32_t  size 
)
inline

References grow().

Referenced by appendSigned().

void DUNE::Utils::ByteBuffer::appendSigned ( const char *  data,
uint32_t  size 
)
inline
uint32_t DUNE::Utils::ByteBuffer::getCapacity ( void  )
inline
uint32_t DUNE::Utils::ByteBuffer::getRemaining ( void  )
inline
void DUNE::Utils::ByteBuffer::grow ( uint32_t  size)
inline
void DUNE::Utils::ByteBuffer::resetBuffer ( void  )
inline
void DUNE::Utils::ByteBuffer::write ( const uint8_t *  data,
uint32_t  size 
)
inline

References grow().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
ByteBuffer buffer 
)
friend
Collaboration diagram for DUNE::Utils::ByteBuffer:
Collaboration graph