![]() |
VR-Forces 4.0.4 Class Documentation
|
The makVrv::DtVisualizerDefinitionSet is a collection of makVrv::DtVisualizerDefinition instances. More...
Public Member Functions | |
| int | numberOfVisualizerDefinitions () const |
| Get the number of definitions. | |
| DtVisualizerDefinition * | findVisualizerDefinition (unsigned int index) |
| Find a definition by index. | |
| const DtVisualizerDefinition * | findVisualizerDefinition (unsigned int index) const |
| Find a definition by index. | |
| void | findVisualizerDefinitions (const std::string &schemaName, std::vector< const DtVisualizerDefinition * > &defs) const |
| Find all of the visualizer definitions which use a particular schema name. | |
| void | findVisualizerDefinitions (const std::string &schemaName, std::vector< DtVisualizerDefinition * > &defs) |
| Find all of the visualizer definitions which use a particular schema name. | |
| int | indexOfVisualizerDefinition (const DtVisualizerDefinition *def) const |
| Find the index of a visualizer definition. | |
| DtVisualizerDefinition * | createVisualizerDefinition (const std::string &schemaName) |
| Create a new top level visualizer definition. | |
| DtVisualizerDefinition * | createVisualizerDefinition (DtVisualizerDefinition *parent) |
| Create a new visualizer definition which inherits from an existing visualizer definition. | |
| void | destroyVisualizerDefinition (DtVisualizerDefinition *def) |
| Remove a visualizer definition by index. | |
| bool | visualizerDefinitionLocal (const DtVisualizerDefinition *def) const |
| Check to is if the visualizer definition is owned by this set. | |
| bool | visualizerDefinitionInherited (const DtVisualizerDefinition *def) const |
| Check if the visualizer definition was inherited. | |
| bool | visualizerDefinitionOverridden (const DtVisualizerDefinition *def) const |
| Check if the visualizer definition is local and overrides a definition owned by a parent visualizer set. | |
| DtVisualizerDefinitionSet * | findParent () |
| Find the parent definition which this definition inherits from. | |
| const DtVisualizerDefinitionSet * | findParent () const |
| Find the parent definition which this definition inherits from. | |
| unsigned int | numberOfChildren () const |
| Get the number of child definitions which inherit from this definition. | |
| DtVisualizerDefinitionSet * | findChild (unsigned int index) |
| Find a child definition set by index. | |
| const DtVisualizerDefinitionSet * | findChild (unsigned int index) const |
| Find a child definition set by index. | |
| int | findChildIndex (const DtVisualizerDefinitionSet *child) const |
| Get the index of a child definition set. | |
Protected Types | |
| typedef std::vector < DtVisualizerDefinition * > | DefinitionList |
| typedef std::vector < DtVisualizerDefinitionSet * > | VisualizerDefinitionSetList |
Protected Member Functions | |
| DtVisualizerDefinitionSet () | |
| Create a top level definition set. | |
| DtVisualizerDefinitionSet (DtVisualizerDefinitionSet *parent) | |
| Create an inherited definition set. | |
| DtVisualizerDefinitionSet * | clone (DtVisualizerDefinitionSet *parent) const |
| Create a clone of this set using a new parent. | |
| ~DtVisualizerDefinitionSet () | |
| DTOR. | |
| void | addChild (DtVisualizerDefinitionSet *defSet) |
| Called internally to add a child. | |
| void | removeChild (DtVisualizerDefinitionSet *defSet) |
| Called internally to remove a child. | |
| void | addOwnership (DtVisualizerDefinition *definition) |
| Add a definition to the ownership vector of this set. | |
| bool | removeOwnership (DtVisualizerDefinition *definition) |
| Remove a definition to the ownership vector of this set. | |
| int | inheritenceIndex (DtVisualizerDefinition *definition) |
| Calculate the inheritenceIndex of a definition. | |
| void | addInheritance (DtVisualizerDefinition *definition, int inheritenceIndex) |
| Add a definition to the inheritance vector. | |
| void | replaceInheritance (DtVisualizerDefinition *oldDef, DtVisualizerDefinition *newDef) |
| Replace one pointer with another pointer in the inheritance vector. | |
| void | removeInheritance (DtVisualizerDefinition *oldDef) |
| Remove a pointer from the inheritance vector. | |
| DtVisualizerDefinitionSet * | findOwnerOfVisualizerDefinition (const DtVisualizerDefinition *def, unsigned int &indexToDef) |
| Find which visualizer definition set owns the specified visualizer definition. | |
| const DtVisualizerDefinitionSet * | findOwnerOfVisualizerDefinition (const DtVisualizerDefinition *def, unsigned int &indexToDef) const |
| Find which visualizer definition set owns the specified visualizer definition. | |
| DtVisualizerDefinition * | findEquivalentDefinition (const DtVisualizerDefinition *def, DtVisualizerDefinitionSet *equivalentToThis) const |
| Find the equivalent definition in a separate hierarchy. | |
| int | level () const |
| Returns the level of the definition set. | |
| DtVisualizerDefinitionSet * | findParent (int level) |
| Find the parent definition which this definition inherits which has a given level. | |
| void | replaceDefinitionParents (DtVisualizerDefinition *oldDef, DtVisualizerDefinition *newDef) |
| Replaces definition parents when a new class extends the old class. | |
| void | destroyVisualizerDefinitionsWithParent (DtVisualizerDefinition *parent) |
| Destroy all visualizer definitions which have a particular parent. | |
Protected Attributes | |
| DtVisualizerDefinitionSet * | myParent |
| VisualizerDefinitionSetList | myChildren |
| DefinitionList | myDefinitions |
| DefinitionList | myInheritedDefintions |
Friends | |
| class | DtElementDefinitionNew |
| Use the element definition interface for creating and deleting visual definition sets. | |
The makVrv::DtVisualizerDefinitionSet is a collection of makVrv::DtVisualizerDefinition instances.
A DtElementDefinition has a single visualizer definition set per model set.
typedef std::vector<DtVisualizerDefinition*> makVrv::DtVisualizerDefinitionSet::DefinitionList [protected] |
typedef std::vector<DtVisualizerDefinitionSet*> makVrv::DtVisualizerDefinitionSet::VisualizerDefinitionSetList [protected] |
| makVrv::DtVisualizerDefinitionSet::DtVisualizerDefinitionSet | ( | ) | [protected] |
Create a top level definition set.
| makVrv::DtVisualizerDefinitionSet::DtVisualizerDefinitionSet | ( | DtVisualizerDefinitionSet * | parent | ) | [protected] |
Create an inherited definition set.
| makVrv::DtVisualizerDefinitionSet::~DtVisualizerDefinitionSet | ( | ) | [protected] |
DTOR.
Get the number of definitions.
This number includes any local definitions as well as inherited definitions.
| DtVisualizerDefinition* makVrv::DtVisualizerDefinitionSet::findVisualizerDefinition | ( | unsigned int | index | ) |
Find a definition by index.
The index is not constant, and may change should any definitions be added or removed.
| const DtVisualizerDefinition* makVrv::DtVisualizerDefinitionSet::findVisualizerDefinition | ( | unsigned int | index | ) | const |
Find a definition by index.
The index is not constant, and may change should any definitions be added or removed. The returned visualizer definition may be local to this set or may be inherited and owned by the set's ancestor[s].
| void makVrv::DtVisualizerDefinitionSet::findVisualizerDefinitions | ( | const std::string & | schemaName, |
| std::vector< const DtVisualizerDefinition * > & | defs | ||
| ) | const |
Find all of the visualizer definitions which use a particular schema name.
| void makVrv::DtVisualizerDefinitionSet::findVisualizerDefinitions | ( | const std::string & | schemaName, |
| std::vector< DtVisualizerDefinition * > & | defs | ||
| ) |
Find all of the visualizer definitions which use a particular schema name.
| int makVrv::DtVisualizerDefinitionSet::indexOfVisualizerDefinition | ( | const DtVisualizerDefinition * | def | ) | const |
Find the index of a visualizer definition.
The index is not constant, and may change should any definitions be added or removed. The returned visualizer definition may be local to this set or may be inherited and owned by the set's ancestor[s].
| DtVisualizerDefinition* makVrv::DtVisualizerDefinitionSet::createVisualizerDefinition | ( | const std::string & | schemaName | ) |
Create a new top level visualizer definition.
The visualizer definition will be owned by this set. The pointer should not be deleted.
| DtVisualizerDefinition* makVrv::DtVisualizerDefinitionSet::createVisualizerDefinition | ( | DtVisualizerDefinition * | parent | ) |
Create a new visualizer definition which inherits from an existing visualizer definition.
The visualizer definition will be owned by this set. The pointer should not be deleted. The new definition will have the same schema as it's parent.
Remove a visualizer definition by index.
If the entireHierarchy is true, then all visualizer definitions which inherit from the visualizer definition at the index as well as it's parents are removed.
| DtInvalidInput | if the definition is not owned by this set. |
| bool makVrv::DtVisualizerDefinitionSet::visualizerDefinitionLocal | ( | const DtVisualizerDefinition * | def | ) | const |
Check to is if the visualizer definition is owned by this set.
| bool makVrv::DtVisualizerDefinitionSet::visualizerDefinitionInherited | ( | const DtVisualizerDefinition * | def | ) | const |
Check if the visualizer definition was inherited.
That means the definitions is owned by one of the parent sets.
| bool makVrv::DtVisualizerDefinitionSet::visualizerDefinitionOverridden | ( | const DtVisualizerDefinition * | def | ) | const |
Check if the visualizer definition is local and overrides a definition owned by a parent visualizer set.
Find the parent definition which this definition inherits from.
| const DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findParent | ( | ) | const |
Find the parent definition which this definition inherits from.
| unsigned int makVrv::DtVisualizerDefinitionSet::numberOfChildren | ( | ) | const |
Get the number of child definitions which inherit from this definition.
| DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findChild | ( | unsigned int | index | ) |
Find a child definition set by index.
| const DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findChild | ( | unsigned int | index | ) | const |
Find a child definition set by index.
| int makVrv::DtVisualizerDefinitionSet::findChildIndex | ( | const DtVisualizerDefinitionSet * | child | ) | const |
Get the index of a child definition set.
The index of the child may change if any children are removed.
| DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::clone | ( | DtVisualizerDefinitionSet * | parent | ) | const [protected] |
Create a clone of this set using a new parent.
| void makVrv::DtVisualizerDefinitionSet::addChild | ( | DtVisualizerDefinitionSet * | defSet | ) | [protected] |
Called internally to add a child.
| void makVrv::DtVisualizerDefinitionSet::removeChild | ( | DtVisualizerDefinitionSet * | defSet | ) | [protected] |
Called internally to remove a child.
| void makVrv::DtVisualizerDefinitionSet::addOwnership | ( | DtVisualizerDefinition * | definition | ) | [protected] |
Add a definition to the ownership vector of this set.
| bool makVrv::DtVisualizerDefinitionSet::removeOwnership | ( | DtVisualizerDefinition * | definition | ) | [protected] |
Remove a definition to the ownership vector of this set.
| int makVrv::DtVisualizerDefinitionSet::inheritenceIndex | ( | DtVisualizerDefinition * | definition | ) | [protected] |
Calculate the inheritenceIndex of a definition.
The definition must have previously been added to the set via addOwnership.
| void makVrv::DtVisualizerDefinitionSet::addInheritance | ( | DtVisualizerDefinition * | definition, |
| int | inheritenceIndex | ||
| ) | [protected] |
Add a definition to the inheritance vector.
| void makVrv::DtVisualizerDefinitionSet::replaceInheritance | ( | DtVisualizerDefinition * | oldDef, |
| DtVisualizerDefinition * | newDef | ||
| ) | [protected] |
Replace one pointer with another pointer in the inheritance vector.
| void makVrv::DtVisualizerDefinitionSet::removeInheritance | ( | DtVisualizerDefinition * | oldDef | ) | [protected] |
Remove a pointer from the inheritance vector.
| DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findOwnerOfVisualizerDefinition | ( | const DtVisualizerDefinition * | def, |
| unsigned int & | indexToDef | ||
| ) | [protected] |
Find which visualizer definition set owns the specified visualizer definition.
| const DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findOwnerOfVisualizerDefinition | ( | const DtVisualizerDefinition * | def, |
| unsigned int & | indexToDef | ||
| ) | const [protected] |
Find which visualizer definition set owns the specified visualizer definition.
| DtVisualizerDefinition* makVrv::DtVisualizerDefinitionSet::findEquivalentDefinition | ( | const DtVisualizerDefinition * | def, |
| DtVisualizerDefinitionSet * | equivalentToThis | ||
| ) | const [protected] |
Find the equivalent definition in a separate hierarchy.
This is used to handle finding the parent of definitions when cloning a hierarchy.
| int makVrv::DtVisualizerDefinitionSet::level | ( | ) | const [protected] |
Returns the level of the definition set.
A set with no parent is level 0, a set which has a parent has a level 1 greater than it's parent's level.
| DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findParent | ( | int | level | ) | [protected] |
Find the parent definition which this definition inherits which has a given level.
See the level() function for a description of level.
| void makVrv::DtVisualizerDefinitionSet::replaceDefinitionParents | ( | DtVisualizerDefinition * | oldDef, |
| DtVisualizerDefinition * | newDef | ||
| ) | [protected] |
Replaces definition parents when a new class extends the old class.
| void makVrv::DtVisualizerDefinitionSet::destroyVisualizerDefinitionsWithParent | ( | DtVisualizerDefinition * | parent | ) | [protected] |
Destroy all visualizer definitions which have a particular parent.
friend class DtElementDefinitionNew [friend] |
Use the element definition interface for creating and deleting visual definition sets.