Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TypeInterface Class Referenceabstract

Interface class for type definitions. More...

#include <OpenFlipper/BasePlugin/TypeInterface.hh>

Inheritance diagram for TypeInterface:
TypeBSplineCurvePlugin TypeBSplineSurfacePlugin TypeCameraPlugin TypeCoordsysPlugin TypeHexahedralMeshPlugin TypeLightPlugin TypePlanePlugin TypePolyhedralMeshPlugin TypePolyLinePlugin TypePolyMeshPlugin TypeQtWidgetPlugin TypeSkeletonPlugin TypeSpherePlugin TypeSplatCloudPlugin TypeTriangleMeshPlugin

Public Slots

virtual bool registerType ()=0
 
virtual int addEmpty ()=0
 Create an empty object. More...
 
virtual DataType supportedType ()=0
 Return your supported object type( e.g. DATA_TRIANGLE_MESH ) More...
 
virtual void generateBackup (int _id, QString _name, UpdateType _type)
 This slot should be implemented in a TypePlugin to generate type specific backups. More...
 

Signals

virtual void emptyObjectAdded (int _id)
 Emit this signal if an empty object has been created. More...
 

Public Member Functions

virtual ~TypeInterface ()
 Destructor.
 

Detailed Description

Interface class for type definitions.


Detailed description
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 and a function to add new objects at runtime.

Definition at line 73 of file TypeInterface.hh.

Member Function Documentation

virtual int TypeInterface::addEmpty ( )
pure virtualslot

Create an empty object.

When this slot is called you have to create an object of your supported type.

Returns
Id of the new Object

Implemented in TypeLightPlugin, TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeSkeletonPlugin, TypeCameraPlugin, TypeSplatCloudPlugin, TypePolyMeshPlugin, TypeQtWidgetPlugin, TypeTriangleMeshPlugin, TypePlanePlugin, TypeSpherePlugin, TypeCoordsysPlugin, and TypePolyLinePlugin.

virtual void TypeInterface::emptyObjectAdded ( int  _id)
inlinevirtualsignal

Emit this signal if an empty object has been created.

Parameters
_idId of the added object

Definition at line 81 of file TypeInterface.hh.

virtual void TypeInterface::generateBackup ( int  _id,
QString  _name,
UpdateType  _type 
)
inlinevirtualslot

This slot should be implemented in a TypePlugin to generate type specific backups.

Parameters
_idId of the added object
_namename of the backup
_typethe type of backup that needs to be done

Reimplemented in TypeSkeletonPlugin, TypeSplatCloudPlugin, TypePolyMeshPlugin, and TypeTriangleMeshPlugin.

Definition at line 112 of file TypeInterface.hh.

virtual DataType TypeInterface::supportedType ( )
pure virtualslot

Return your supported object type( e.g. DATA_TRIANGLE_MESH )

The function is used from addEmpty in the core to check if your plugin can create an object of a given dataType. If so, your addEmpty function will be invoked to create it.

Implemented in TypeLightPlugin, TypeBSplineCurvePlugin, TypeBSplineSurfacePlugin, TypeSkeletonPlugin, TypeCameraPlugin, TypeSplatCloudPlugin, TypePolyMeshPlugin, TypeQtWidgetPlugin, TypeTriangleMeshPlugin, TypePlanePlugin, TypeSpherePlugin, TypeCoordsysPlugin, and TypePolyLinePlugin.


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