Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Slots | Signals | Public Member Functions | List of all members
TypeInterface Class Referenceabstract

Interface class for type definitions. More...

`#include <OpenFlipper/BasePlugin/TypeInterface.hh>`

Inheritance diagram for TypeInterface:

## 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 virtual slot

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 | ) |
| inline virtual signal

Emit this signal if an empty object has been created.

Parameters

  _id | Id of the added object

Definition at line 81 of file TypeInterface.hh.

virtual void TypeInterface::generateBackup | ( | int | _id,
|  | QString | _name,
|  | UpdateType | _type
| ) |  |
| inline virtual slot

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

Parameters

  _id | Id of the added object
  _name | name of the backup
  _type | the 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 virtual slot

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:

- OpenFlipper/BasePlugin/TypeInterface.hh