Static buffer with pre-allocated memory. More...
#include <pinocchio/serialization/static-buffer.hpp>
Public Member Functions | |
StaticBuffer (const size_t n) | |
| |
char * | data () |
Returns the pointer on the data. | |
const char * | data () const |
Returns the pointer on the data (const version) | |
void | resize (const size_t new_size) |
Increase the capacity of the vector to a value that's greater or equal to new_size. | |
size_t | size () const |
Returns the current size of the buffer. | |
Protected Attributes | |
std::vector< char > | m_data |
size_t | m_size |
Static buffer with pre-allocated memory.
Definition at line 16 of file static-buffer.hpp.
|
inlineexplicit |
|
inline |
Returns the pointer on the data.
Definition at line 33 of file static-buffer.hpp.
Returns the pointer on the data (const version)
Definition at line 39 of file static-buffer.hpp.
Increase the capacity of the vector to a value that's greater or equal to new_size.
[in] | new_size | New capacity of the buffer. |
Definition at line 48 of file static-buffer.hpp.
|
inline |
Returns the current size of the buffer.
Definition at line 27 of file static-buffer.hpp.
|
protected |
Definition at line 56 of file static-buffer.hpp.
|
protected |
Definition at line 55 of file static-buffer.hpp.