Interface class for type definitions. More...
#include <TypeInterface.hh>
Public Slots | |
| virtual bool | registerType ()=0 |
| virtual int | addEmpty ()=0 |
| Create an empty object. | |
| virtual DataType | supportedType ()=0 |
| Return your supported object type( e.g. DATA_TRIANGLE_MESH ). | |
Signals | |
| virtual void | emptyObjectAdded (int) |
| Emit this signal if an empty object has been created. | |
Public Member Functions | |
| virtual | ~TypeInterface () |
| Destructor. | |
Interface class for type definitions.
This interface is used to register new types in OpenFlipper. The type plugins are loaded before all other plugins. They have only the registerType function which registers the type to the core. The type itself has to be defined in the ObjectTypes subdirectory.
Definition at line 56 of file TypeInterface.hh.
| virtual int TypeInterface::addEmpty | ( | ) | [pure virtual, slot] |
Create an empty object.
When this slot is called you have to create an object of your supported type.
| _type | Data type of object that will be created |
| virtual void TypeInterface::emptyObjectAdded | ( | int | ) | [inline, virtual, signal] |
Emit this signal if an empty object has been created.
| _id | Id of the added object |
Definition at line 63 of file TypeInterface.hh.
| virtual DataType TypeInterface::supportedType | ( | ) | [pure virtual, slot] |
Return your supported object type( e.g. DATA_TRIANGLE_MESH ).
If you support multiple datatypes you can use the bitwise or to combine them here. The function is used from addEmpty to check if your plugin can create an object of a given dataType.
Referenced by Core::loadPlugin().