![]() |
VR-Forces 4.0.4 Class Documentation
|
The element definition class contains the element definition information. More...
Public Member Functions | |
| const DtUnicode & | name () const |
| Get the name of the element definition. | |
| int | numberOfVisualizerDefinitionSets () const |
| Get the number of visualizer definition sets the definition has. | |
| DtVisualizerDefinitionSet & | visualizerDefinitionSet (int modelSet) |
| Get the visualizer set for the model set. | |
| const DtVisualizerDefinitionSet & | visualizerDefinitionSet (int modelSet) const |
| Get the visualizer set for the model set. | |
| DtElementDefinitionNew * | findParent () |
| Find the element definition that his inherits from. | |
| const DtElementDefinitionNew * | findParent () const |
| Find the element definition that his inherits from. | |
| unsigned int | numberOfChildren () const |
| Get the number of element definitions which inherit from this definition. | |
| DtElementDefinitionNew * | findChild (unsigned int index) |
| Find a child at a given index. | |
| const DtElementDefinitionNew * | findChild (unsigned int index) const |
| Find a child at a given index. | |
| int | findChildIndex (const DtElementDefinitionNew *child) const |
| Get the index of a child definition. | |
| DtVisualizerDefinition * | findOrCreateLocalVisualizer (int modelSet, int visualizerIndex) |
| Finds or creates a local visualizer, there must be a visualizer at the visualizerIndex, either a local visualizer or an inherited visualizer. | |
| DtVisualizerAttribute * | findOrCreateLocalAttribute (int modelSet, int visualizerIndex, const std::string &attributeName) |
| Utility function for finding or creating a local visualizer and local attribute. | |
Protected Types | |
| typedef std::vector < DtElementDefinitionNew * > | DefinitionList |
| typedef std::vector < DtVisualizerDefinitionSet * > | DefinitionSetList |
Protected Member Functions | |
| DtElementDefinitionNew (const DtUnicode &name) | |
| Create a top level element definition. | |
| DtElementDefinitionNew (const DtUnicode &name, DtElementDefinitionNew *parent) | |
| Create an element definition which inherits from another definition. | |
| ~DtElementDefinitionNew () | |
| DTOR. | |
| DtElementDefinitionNew * | clone (const DtUnicode &name, DtElementDefinitionNew *newParent) const |
| Create a clone of this element definition with a new name and a new parent. | |
| void | setName (const DtUnicode &name) |
| Set the name of the element definition. | |
| void | addChild (DtElementDefinitionNew *child) |
| Internal function. | |
| void | removeChild (DtElementDefinitionNew *child) |
| Internal function. | |
Protected Attributes | |
| DtUnicode | myName |
| DefinitionSetList | mySets |
| DtElementDefinitionNew * | myParent |
| DefinitionList | myChildren |
Friends | |
| class | DtElementDefinitionManager |
| Use the element definition manager to create, copy and destroy element definitions. | |
The element definition class contains the element definition information.
The makVrv::DtElementDefinitionManager is responsible for create and destroying instances of the element definitions.
typedef std::vector<DtElementDefinitionNew*> makVrv::DtElementDefinitionNew::DefinitionList [protected] |
typedef std::vector<DtVisualizerDefinitionSet*> makVrv::DtElementDefinitionNew::DefinitionSetList [protected] |
| makVrv::DtElementDefinitionNew::DtElementDefinitionNew | ( | const DtUnicode & | name | ) | [protected] |
Create a top level element definition.
| makVrv::DtElementDefinitionNew::DtElementDefinitionNew | ( | const DtUnicode & | name, |
| DtElementDefinitionNew * | parent | ||
| ) | [protected] |
Create an element definition which inherits from another definition.
| makVrv::DtElementDefinitionNew::~DtElementDefinitionNew | ( | ) | [protected] |
DTOR.
| const DtUnicode& makVrv::DtElementDefinitionNew::name | ( | ) | const |
Get the name of the element definition.
The name of an element is unique.
Get the number of visualizer definition sets the definition has.
Get the visualizer set for the model set.
If visualizer definition set for the definition does not exist yet one will be created.
| const DtVisualizerDefinitionSet& makVrv::DtElementDefinitionNew::visualizerDefinitionSet | ( | int | modelSet | ) | const |
Get the visualizer set for the model set.
If the visualizer definition set does not exist for the model set an exception (DtInvalidInput) will be thrown.
Find the element definition that his inherits from.
| const DtElementDefinitionNew* makVrv::DtElementDefinitionNew::findParent | ( | ) | const |
Find the element definition that his inherits from.
| unsigned int makVrv::DtElementDefinitionNew::numberOfChildren | ( | ) | const |
Get the number of element definitions which inherit from this definition.
| DtElementDefinitionNew* makVrv::DtElementDefinitionNew::findChild | ( | unsigned int | index | ) |
Find a child at a given index.
| const DtElementDefinitionNew* makVrv::DtElementDefinitionNew::findChild | ( | unsigned int | index | ) | const |
Find a child at a given index.
| int makVrv::DtElementDefinitionNew::findChildIndex | ( | const DtElementDefinitionNew * | child | ) | const |
Get the index of a child definition.
The index of the child may change if any children are removed.
| DtVisualizerDefinition* makVrv::DtElementDefinitionNew::findOrCreateLocalVisualizer | ( | int | modelSet, |
| int | visualizerIndex | ||
| ) |
Finds or creates a local visualizer, there must be a visualizer at the visualizerIndex, either a local visualizer or an inherited visualizer.
| DtVisualizerAttribute* makVrv::DtElementDefinitionNew::findOrCreateLocalAttribute | ( | int | modelSet, |
| int | visualizerIndex, | ||
| const std::string & | attributeName | ||
| ) |
Utility function for finding or creating a local visualizer and local attribute.
A local visualizer is owned by this element.
| DtElementDefinitionNew* makVrv::DtElementDefinitionNew::clone | ( | const DtUnicode & | name, |
| DtElementDefinitionNew * | newParent | ||
| ) | const [protected] |
Create a clone of this element definition with a new name and a new parent.
| void makVrv::DtElementDefinitionNew::setName | ( | const DtUnicode & | name | ) | [protected] |
Set the name of the element definition.
| void makVrv::DtElementDefinitionNew::addChild | ( | DtElementDefinitionNew * | child | ) | [protected] |
Internal function.
| void makVrv::DtElementDefinitionNew::removeChild | ( | DtElementDefinitionNew * | child | ) | [protected] |
Internal function.
friend class DtElementDefinitionManager [friend] |
Use the element definition manager to create, copy and destroy element definitions.
DtUnicode makVrv::DtElementDefinitionNew::myName [protected] |