TypeInterface Class Reference

Interface class for type definitions. More...

#include <TypeInterface.hh>

List of all members.

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.

Detailed Description

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.


Member Function Documentation

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.

Parameters:
_type Data type of object that will be created
Returns:
Id of the new Object
virtual void TypeInterface::emptyObjectAdded ( int   )  [inline, virtual, signal]

Emit this signal if an empty object has been created.

Parameters:
_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().


The documentation for this class was generated from the following file:

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .