ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | List of all members
anna::comm::Buffer Class Reference

#include <Buffer.hpp>

Inheritance diagram for anna::comm::Buffer:
Inheritance graph
[legend]
Collaboration diagram for anna::comm::Buffer:
Collaboration graph
[legend]

Public Member Functions

 Buffer ()
 
void setup (const char *buffer, const int size)
 
void resize (const int size)
 
- Public Member Functions inherited from anna::DataBlock
 DataBlock (const bool deepCopy=false)
 
 DataBlock (const char *buffer, const int size, const bool deepCopy=false) noexcept(false)
 
 DataBlock (const DataBlock &other) noexcept(false)
 
virtual ~DataBlock ()
 
int getMaxSize () const
 
int getSize () const
 
const char * getData () const
 
bool isEmpty () const
 
bool deepCopy () const
 
void setSize (const int size) noexcept(false)
 
DataBlockoperator+= (const char c) noexcept(false)
 
DataBlockoperator+= (const DataBlock &right) noexcept(false)
 
DataBlockoperator+= (const std::string &str) noexcept(false)
 
const char operator[] (const int pos) const noexcept(false)
 
char & operator[] (const int pos) noexcept(false)
 
void append (const char *data, const int len) noexcept(false)
 
void append (const DataBlock &other) noexcept(false)
 
void assign (const DataBlock &right) noexcept(false)
 
void assign (const char *buffer, const int size) noexcept(false)
 
DataBlockoperator= (const DataBlock &right) noexcept(false)
 
DataBlockoperator= (const char c) noexcept(false)
 
DataBlockoperator= (const std::string &str) noexcept(false)
 
void allocate (const int nbytes) noexcept(false)
 
void clear () noexcept(false)
 
void remove (const int pos, const int nbytes) noexcept(false)
 
void remove (const int nbytes) noexcept(false)
 
std::string asString (const int characterByLine=24) const
 

Additional Inherited Members

- Protected Member Functions inherited from anna::DataBlock
void initialize (const char *buffer, const int size) noexcept(false)
 
void setBuffer (const char *buffer)
 
void setMaxSize (const int maxSize)
 

Detailed Description

Clase para mantener en memoria lo buffer intermedios usados para enviar y/o recibir mensajes,

Constructor & Destructor Documentation

◆ Buffer()

anna::comm::Buffer::Buffer ( )
inline

Constructor.

27 : DataBlock(false) {;}
DataBlock(const bool deepCopy=false)
Definition: DataBlock.hpp:33

Member Function Documentation

◆ resize()

void anna::comm::Buffer::resize ( const int  size)
inline

Establece la longitud de la memoria asociada a esta instancia.

Parameters
sizeNumero de bytes asociados a esta instancia.
43 { setSize(size); }
void setSize(const int size) noexcept(false)
Here is the call graph for this function:

◆ setup()

void anna::comm::Buffer::setup ( const char *  buffer,
const int  size 
)
inline

Establece la direccion de memoria asociada a esta memoria intermedia.

Parameters
bufferDireccion de memoria asociada a esta instancia.
sizeNumero de bytes asociados a esta instancia.
34  {
35  setBuffer(buffer);
36  setSize(size);
37  }
void setBuffer(const char *buffer)
Definition: DataBlock.hpp:277
void setSize(const int size) noexcept(false)
Here is the call graph for this function:

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