Developer Documentation
__PropertyModelFactory Class Reference

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

#include <Plugin-PropertyVis/PropertyModelFactory.hh>

Public Member Functions

PropertyModelgetModel (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 76 of file PropertyModelFactory.hh.

Member Function Documentation

PropertyModel * __PropertyModelFactory::getModel ( int  objectID)

Returns the PropertyModel.

Parameters
objectIDThe 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 85 of file PropertyModelFactory.cc.


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