Developer Documentation

Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
__PropertyModelFactory Class Reference

This class manages the creation of PropertyModels. More...

`#include <Plugin-PropertyVis/Models/PropertyModelFactory.hh>`

## Public Member Functions
PropertyModel * | getModel (int objectID)
| Returns the PropertyModel. More...
void | deleteModel (int objectID)
| Deletes the PropertyModel.

## Private Types
typedef std::map< int, PropertyModel * > | PropertyModelMap

## Private Member Functions
| __PropertyModelFactory (__PropertyModelFactory &)

## Private Attributes
PropertyModelMap | propertyModelMap

## Friends
class | OpenMesh::SingletonT< __PropertyModelFactory >

## Detailed Description

This class manages the creation of PropertyModels.

This class is used to create the correct PropertyModel for a given object. Using this factory the PropertyVisPlugin does not need to know about different object types such as TriMesh, PolyMesh, PolyhedralMesh etc. If in future a new type of object should be visualized only the factory needs to be updated in order to recognize the new type and create the correct PropertyModel.

A map of PropertyModels is kept so that for each object only one PropertyModel is created.

Note that this class is transformed to a Singleton and accessed via PropertyModelFactory::Instance().

Definition at line 69 of file PropertyModelFactory.hh.

## Member Function Documentation

## ◆ getModel()

PropertyModel * __PropertyModelFactory::getModel | ( | int | objectID | ) |

Returns the PropertyModel.

Parameters

  objectID | The index of the object for which we want to get the property model

Returns
  The PropertyModel.

For the given objectID this method finds out which type the object has and creates and return the PropertyModel for that type of object.

Currently supported are TriMesh, PolyMesh and - if found - also PolyhedralMesh and HexahedralMesh. For an unrecognized object a PropertyModel with no functionality will be returned.

Definition at line 79 of file PropertyModelFactory.cc.

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

- Plugin-PropertyVis/Models/PropertyModelFactory.hh
- Plugin-PropertyVis/Models/PropertyModelFactory.cc