![]() |
VR-Forces Developer's Guide
|
The element definition class contains the element definition information. The makVrv::DtElementDefinitionManager is responsible for create and destroying instances of the element definitions.
Protected Types | |
| typedef std::vector < DtElementDefinition * > | DefinitionList |
| typedef std::vector < DtVisualizerDefinitionSet * > | DefinitionSetList |
Protected Member Functions | |
| DtElementDefinition (const DtUnicode &name) | |
| DtElementDefinition (const DtUnicode &name, DtElementDefinition *parent) | |
Protected Attributes | |
| DtUnicode | myName |
| std::string | myFileName |
| DefinitionSetList | mySets |
| std::vector< std::string > | myDuplicateNames |
| bool | myIsHier |
| bool | myDuplicateFlag |
| DtElementDefinition * | myParent |
| DefinitionList | myChildren |
Private Member Functions | |
| DtElementDefinition () | |
| DtElementDefinition (const DtElementDefinition ©) | |
| DtElementDefinition & | operator= (const DtElementDefinition &) |
Friends | |
| class | DtElementDefinitionManager |
|
protected |
|
protected |
|
protected |
Create a top level element definition.
|
protected |
Create an element definition which inherits from another definition.
| makVrv::DtElementDefinition::~DtElementDefinition | ( | ) |
DTOR.
|
private |
CTOR.
|
private |
Copy Constructor Not implemented.
| const DtUnicode& makVrv::DtElementDefinition::name | ( | ) | const |
Get the name of the element definition. The name of an element is unique.
| const std::string& makVrv::DtElementDefinition::fileName | ( | ) | const |
Get the file name of the element definition. Each fileName links to a corresponding file.
| const std::vector<std::string>& makVrv::DtElementDefinition::duplicateNames | ( | ) | const |
Gets the list of all file names saved to show duplicates.
| void makVrv::DtElementDefinition::setFileName | ( | const std::string & | ) |
Assigns the file name to the model definition.
| bool makVrv::DtElementDefinition::isEqual | ( | const DtElementDefinition & | ) | const |
check if two element definitions are equal we don't comapre the parent or children
| int makVrv::DtElementDefinition::numberOfVisualizerDefinitionSets | ( | ) | const |
Get the number of visualizer definition sets the definition has.
| DtVisualizerDefinitionSet& makVrv::DtElementDefinition::visualizerDefinitionSet | ( | DtModelSetId | modelSet | ) |
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::DtElementDefinition::visualizerDefinitionSet | ( | DtModelSetId | 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.
| DtElementDefinition* makVrv::DtElementDefinition::findParent | ( | ) |
Find the element definition that his inherits from.
| const DtElementDefinition* makVrv::DtElementDefinition::findParent | ( | ) | const |
Find the element definition that his inherits from.
Get the number of element definitions which inherit from this definition.
| DtElementDefinition* makVrv::DtElementDefinition::findChild | ( | unsigned int | index | ) |
Find a child at a given index.
| const DtElementDefinition* makVrv::DtElementDefinition::findChild | ( | unsigned int | index | ) | const |
Find a child at a given index.
| int makVrv::DtElementDefinition::findChildIndex | ( | const DtElementDefinition * | child | ) | const |
Get the index of a child definition. The index of the child may change if any children are removed.
| std::vector<DtElementDefinition*> makVrv::DtElementDefinition::getChildren | ( | ) |
Gets the list of children of the element definition.
| DtVisualizerDefinition* makVrv::DtElementDefinition::findOrCreateLocalVisualizer | ( | DtModelSetId | 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.
| DtVisualizerDefinition* makVrv::DtElementDefinition::findOrCreateLocalVisualizer | ( | DtModelSetId | modelSet, |
| const std::string & | uuidString | ||
| ) |
| DtVisualizerAttribute* makVrv::DtElementDefinition::findOrCreateLocalAttribute | ( | DtModelSetId | 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.
| bool makVrv::DtElementDefinition::isHier | ( | ) | const |
Is this element definition a hierarchy node?
| void makVrv::DtElementDefinition::setIsHier | ( | bool | isHier | ) |
Set the name of the element definition.
| bool makVrv::DtElementDefinition::isDuplicate | ( | ) | const |
Whether or not the element definition is in another file as well.
| void makVrv::DtElementDefinition::addDuplicateName | ( | const std::string & | duplicateName | ) |
Adds file locations where duplicates of file are found.
| void makVrv::DtElementDefinition::setDuplicateFlag | ( | bool | duplicate | ) |
Set whether or not this def is a duplicate.
| DtElementDefinition* makVrv::DtElementDefinition::clone | ( | ) | const |
Create a clone of this element definition.
|
virtual |
Remove all the visualizer sets in this element definition.
|
private |
Assignment Operator Not implemented.
| DtElementDefinition* makVrv::DtElementDefinition::clone | ( | const DtUnicode & | name, |
| DtElementDefinition * | newParent | ||
| ) | const |
Create a clone of this element definition with a new name and a new parent.
| void makVrv::DtElementDefinition::setName | ( | const DtUnicode & | name | ) |
Set the name of the element definition.
| void makVrv::DtElementDefinition::addChild | ( | DtElementDefinition * | child | ) |
Internal function.
| void makVrv::DtElementDefinition::removeChild | ( | DtElementDefinition * | child | ) |
Internal function.
|
friend |
Use the element definition manager to create, copy and destroy element definitions.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |