Developer Documentation
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 TypePolyLineCollectionPlugin TypePolyLinePlugin TypePolyMeshPlugin TypeQtWidgetPlugin TypeSkeletonPlugin TypeSpherePlugin TypeSplatCloudPlugin TypeTetrahedralMeshPlugin 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 63 of file TypeInterface.hh.

Member Function Documentation

◆ addEmpty

virtual int TypeInterface::addEmpty ( )
pure virtualslot

◆ emptyObjectAdded

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 71 of file TypeInterface.hh.

◆ generateBackup

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 102 of file TypeInterface.hh.

◆ supportedType

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, TypeSplatCloudPlugin, TypeCameraPlugin, TypePolyLinePlugin, TypeSpherePlugin, TypePolyMeshPlugin, TypeTriangleMeshPlugin, TypePolyLineCollectionPlugin, TypeQtWidgetPlugin, TypePlanePlugin, and TypeCoordsysPlugin.


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