odtone::buffer_vla
// In header: </home/carlos/Projectos/odtone/inc/odtone/buffer.hpp> template<typename T> class buffer_vla : private odtone::buffer< uint8 > { public: // construct/copy/destruct buffer_vla(const buffer_vla &); buffer_vla(); buffer_vla(buffer_vla &&); buffer_vla(size_t); buffer_vla& operator=(const buffer_vla &); buffer_vla& operator=(buffer_vla &&); // private member functions ODTONE_STATIC_ASSERT(!boost::is_enum< T >::value &&boost::is_pod< T >::value &&boost::is_class< T >::value, "T must be a class/struct POD type"); // public member functions void size(size_t); T & operator*(); T * operator->(); T * get(); const T & operator*() const; const T * operator->() const; const T * get() const; };
A container (buffer) for 8-bit unsigned int data type with linear and finite sequence of elements.
buffer_vla
public
construct/copy/destructbuffer_vla(const buffer_vla &);
buffer_vla();
Construct an empty buffer. The created buffer will be empty and with zero length.
buffer_vla(buffer_vla && buff);
Construct a buffer. The new created buffer will be a copy of another buffer.
Parameters: |
|
buffer_vla(size_t len);
Construct an empty buffer. Although the created buffer is empty, it has the length defined at its creation.
Parameters: |
|
buffer_vla& operator=(const buffer_vla &);
buffer_vla& operator=(buffer_vla && buff);
Copy the elements from another buffer. The elements contained in the buffer will be overwrited.
Parameters: |
|
||
Returns: |
The reference to the buffer. |
buffer_vla
public member functionsvoid size(size_t len);
Set the number of elements the buffer can store.
Parameters: |
|
T & operator*();
Get the reference to the first element of the buffer.
Returns: |
The reference to the first element of the buffer. |
T * operator->();
Get the pointer to the first element of the buffer.
Returns: |
The pointer to the first element of the buffer. |
T * get();
Get the pointer to the first element of the buffer.
Returns: |
The pointer to the first element of the buffer. |
const T & operator*() const;
Get the reference to the first element of the buffer.
Returns: |
The reference to the first element of the buffer. |
const T * operator->() const;
Get the pointer to the first element of the buffer.
Returns: |
The pointer to the first element of the buffer. |
const T * get() const;
Get the pointer to the first element of the buffer.
Returns: |
The pointer to the first element of the buffer. |