Frontend::Buffer Class Reference
A buffer of bytes. More...
#include <Buffer.h>
Inheritance diagram for Frontend::Buffer:

Public Member Functions | |
| Buffer (unsigned int size) | |
| Creates a new buffer. | |
| ~Buffer () | |
| Destructs the buffer, releasing the allocated memory. | |
| unsigned int | Size () |
| Returns the size of the buffer, in bytes. | |
| void | Resize (unsigned int newSize) |
| Resizes the buffer. | |
| void * | Pointer () |
| Allows the buffer to be used as pointer. | |
| operator void * () | |
| Allows the buffer to be used as pointer. | |
| void | AddRef () |
| Adds a reference to the object. | |
| void | Release () |
| Releases a reference on the object. | |
| unsigned int | GetRefCount () |
| Returns the number of references on the object. | |
Private Attributes | |
| UInt8 * | data |
| unsigned int | size |
Detailed Description
A buffer of bytes.General purpose buffer wrappper.
Constructor & Destructor Documentation
|
|
Creates a new buffer.
|
|
|
Destructs the buffer, releasing the allocated memory.
|
Member Function Documentation
|
|
Adds a reference to the object. Aqcuires an additional ownership on the object. The object will not be deleted until all owners have called Release() on it.
|
|
|
Returns the number of references on the object.
|
|
|
Allows the buffer to be used as pointer.
|
|
|
Allows the buffer to be used as pointer.
|
|
|
Releases a reference on the object. If you are an owner of an object, use this function to release it when you are done with it. The object will not be deleted until all owners have called Release() on it. |
|
|
Resizes the buffer. If the buffer is enlarged, the data in the old buffer is copied into the first Size() bytes of the new buffer, the rest of the buffer will contain undefined data. If the buffer is shrinked, the old buffer is copied into the first newSize bytes of the new buffer. Overshooting data will be lost.
|
|
|
Returns the size of the buffer, in bytes.
|
Member Data Documentation
|
|
|
|
|
|
The documentation for this class was generated from the following file: