#include <OpenGUI_Resource.h>
Inheritance diagram for OpenGUI::Resource:

This version simply maintains a byte array of dynamic memory. If you need something fancier, just subclass this.
Public Member Functions | |
| Resource () | |
| constructor | |
| virtual | ~Resource () |
| virtual destructor | |
| virtual void | setData (unsigned char *newData, size_t newSize) |
| Sets this object's stored data to the given memory. | |
| unsigned char * | getData () |
| Returns a pointer to the held data, or 0 if there is no stored data. | |
| virtual void | setSize (size_t size) |
| Sets the size of the data buffer. The current contents will be lost. | |
| size_t | getSize () |
| Returns the size of the held data in bytes. | |
| void | release () |
| frees the data held | |
| OpenGUI::Resource::Resource | ( | ) | [inline] |
constructor
| virtual OpenGUI::Resource::~Resource | ( | ) | [inline, virtual] |
virtual destructor
| unsigned char* OpenGUI::Resource::getData | ( | ) | [inline] |
Returns a pointer to the held data, or 0 if there is no stored data.
| size_t OpenGUI::Resource::getSize | ( | ) | [inline] |
Returns the size of the held data in bytes.
| void OpenGUI::Resource::release | ( | ) | [inline] |
frees the data held
| virtual void OpenGUI::Resource::setData | ( | unsigned char * | newData, | |
| size_t | newSize | |||
| ) | [inline, virtual] |
Sets this object's stored data to the given memory.
| newData | pointer to the data to store | |
| newSize | the size of the data given in bytes |
Reimplemented in OpenGUI::Resource_CStr.
| virtual void OpenGUI::Resource::setSize | ( | size_t | size | ) | [inline, virtual] |
Sets the size of the data buffer. The current contents will be lost.
Reimplemented in OpenGUI::Resource_CStr.