#include <DataBlockI.h>
Inheritance diagram for DataBlockI:
Public Methods | |
virtual DataBlockI * | create ()=0 |
Creates new datablock. | |
virtual void | release () |
Deletes data block. | |
virtual void | set_alive (bool bState) |
Sets flag indicating wheter the datablock is alive or dead. | |
virtual bool | get_alive () const |
Gets the alive flag,
| |
Protected Methods | |
DataBlockI () | |
Protected default constructor. | |
virtual | ~DataBlockI () |
Protected default desctructor. | |
Protected Attributes | |
bool | m_bAlive |
Data block class is base class for every object created in a plugin class in a DLL and returned to the Demopaja system. Data block class takes care that the memory management of the main application and the plugin won't corrupt. This class also hides the constructor and destructor to prevent the misuse of the classes derived from this class.
|
Protected default constructor.
|
|
Protected default desctructor.
|
|
Creates new datablock. The create method of data block class creates new instance of the same class the data block is. Example implementation: DataBlockI* TGAImportC::create() { return new TGAImportC; }
Implemented in AutoGizmoC, ColorCommonDialogC, ControllerC, EditableI, FileHandleC, FileListC, GraphicsBufferI, GraphicsDeviceI, KeyC, FloatKeyC, FileKeyC, LayerC, ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, ParamFileC, SceneC, TimeSegmentC, OpenGLBufferC, and OpenGLViewportC. |
|
Gets the alive flag,
|
|
Deletes data block. This method should delete all the contents of this class. The default implementation is shown below. So in practice, you can implement the desctructor method to release the data as usual. The default implementation of this method is:
void DataBlockI::release() { delete this; } |
|
Sets flag indicating wheter the datablock is alive or dead. This flag indicates, if the editable is alive or dead. If the editable is "dead", it still exists in the memory, but it's been deleted and hangs somewhere in the undostack. If your operation has to be only done to the "living" datablocks, check this flag. |