Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members Related Pages

# DataBlockI Class Reference

Plugin data interface. More...

`#include <DataBlockI.h>`

Inheritance diagram for DataBlockI:

List of all members.

## Public Member Functions
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, See also: set_alive().
## Protected Member Functions
| DataBlockI ()
| Protected default constructor.
virtual | ~DataBlockI ()
| Protected default desctructor.
## Protected Attributes
bool | m_bAlive

## Detailed Description

Plugin data interface.

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.

## Constructor & Destructor Documentation

DataBlockI | ( |  | ) | `[protected]`

| Protected default constructor.

virtual ~DataBlockI | ( |  | ) | `[protected, virtual]`

| Protected default desctructor.

## Member Function Documentation

virtual DataBlockI* create | ( |  | ) | `[pure virtual]`

| 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;
                }
Returns: Pointer to a new instance of this class. Implemented in AutoGizmoC, ChooseImporterCommonDialogC, ColorCommonDialogC, ControllerC, EditableI, FileHandleC, FileListC, GraphicsBufferI, GraphicsDeviceI, KeyC, FloatKeyC, FileKeyC, LayerC, ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, ParamFileC, SceneC, TimeSegmentC, OpenGLBufferC, and OpenGLViewportC.

virtual bool get_alive | ( |  | ) | const`[virtual]`

| Gets the alive flag, See also: set_alive().

virtual void release | ( |  | ) | `[virtual]`

| 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;
                }

virtual void set_alive | ( | bool | bState | ) | `[virtual]`

| 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.