#include <PhxBuffer.h>
Inheritance diagram for Phx::Buffer< T >:

Public Member Functions | |
| Buffer (const T *data, uint32_t size) | |
| Constructs a new buffer with a copy of the given data. | |
| Buffer (const std::vector< T > &array) | |
Constructs a new buffer with a copy of the data in array. | |
| Buffer (uint32_t size=0) | |
| Constructs a new buffer, setting its initial buffer size. | |
| uint32_t | size () const |
| void | size (uint32_t len) |
| Sets the size of the buffer. | |
| T * | buffer () |
| const T * | buffer () const |
| void | buffer (const T *buffer, uint32_t len) |
Overwrites the buffer with a copy of buffer. | |
The accessors size() and buffer() allow direct access to the data and control over its size. No concurrency protection (locking) is provided.
|
||||||||||
|
Constructs a new buffer, setting its initial buffer size. A standard way to use the Buffer class is to use this constructor allocate a buffer up front, then fill the buffer with data by retrieving the raw pointer to the array from buffer().
|
|
||||||||||||||||
|
Overwrites the buffer with a copy of
|
|
||||||||||
|
Sets the size of the buffer. This will truncate the data if the new size is smaller, or default-construct new elements (preserving the old ones) if the new size is larger.
|
1.4.2