VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
makVrv::DtVisualizerDefinitionSet Class Reference

The makVrv::DtVisualizerDefinitionSet is a collection of makVrv::DtVisualizerDefinition instances. More...

List of all members.

Public Member Functions

int numberOfVisualizerDefinitions () const
 Get the number of definitions.
DtVisualizerDefinitionfindVisualizerDefinition (unsigned int index)
 Find a definition by index.
const DtVisualizerDefinitionfindVisualizerDefinition (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.
DtVisualizerDefinitioncreateVisualizerDefinition (const std::string &schemaName)
 Create a new top level visualizer definition.
DtVisualizerDefinitioncreateVisualizerDefinition (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.
DtVisualizerDefinitionSetfindParent ()
 Find the parent definition which this definition inherits from.
const DtVisualizerDefinitionSetfindParent () 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.
DtVisualizerDefinitionSetfindChild (unsigned int index)
 Find a child definition set by index.
const DtVisualizerDefinitionSetfindChild (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.
DtVisualizerDefinitionSetclone (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.
DtVisualizerDefinitionSetfindOwnerOfVisualizerDefinition (const DtVisualizerDefinition *def, unsigned int &indexToDef)
 Find which visualizer definition set owns the specified visualizer definition.
const DtVisualizerDefinitionSetfindOwnerOfVisualizerDefinition (const DtVisualizerDefinition *def, unsigned int &indexToDef) const
 Find which visualizer definition set owns the specified visualizer definition.
DtVisualizerDefinitionfindEquivalentDefinition (const DtVisualizerDefinition *def, DtVisualizerDefinitionSet *equivalentToThis) const
 Find the equivalent definition in a separate hierarchy.
int level () const
 Returns the level of the definition set.
DtVisualizerDefinitionSetfindParent (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

DtVisualizerDefinitionSetmyParent
VisualizerDefinitionSetList myChildren
DefinitionList myDefinitions
DefinitionList myInheritedDefintions

Friends

class DtElementDefinitionNew
 Use the element definition interface for creating and deleting visual definition sets.

Detailed Description

The makVrv::DtVisualizerDefinitionSet is a collection of makVrv::DtVisualizerDefinition instances.

A DtElementDefinition has a single visualizer definition set per model set.


Member Typedef Documentation


Constructor & Destructor Documentation

Create a top level definition set.

Create an inherited definition set.

DTOR.


Member Function Documentation

Get the number of definitions.

This number includes any local definitions as well as inherited definitions.

Find a definition by index.

The index is not constant, and may change should any definitions be added or removed.

Returns:
0 if there is no definition at that index.

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].

Returns:
0 if there is no definition at that index.
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.

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].

Returns:
-1 if the definition can't be found in the index.

Create a new top level visualizer definition.

The visualizer definition will be owned by this set. The pointer should not be deleted.

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.

Returns:
0 If the parent visualizer definition is not currently inherited into this set.

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.

Exceptions:
DtInvalidInputif the definition is not owned by this set.

Check to is if the visualizer definition is owned by this set.

Returns:
true if the definition is local to this set.
false if it is not local to this set.

Check if the visualizer definition was inherited.

That means the definitions is owned by one of the parent sets.

Returns:
true if the visualizer definition was inherited from a parent definition set.
false if the visualizer definition is not a member to this class or it's parents.

Check if the visualizer definition is local and overrides a definition owned by a parent visualizer set.

Returns:
true if the visualizer definition is local to this definition and overrides a visualizer definition in one of the parent definitions.
false if the attribute does not exist, or is inherited.

Find the parent definition which this definition inherits from.

Returns:
0 if there is no parent.

Find the parent definition which this definition inherits from.

Returns:
0 if there is no parent.

Get the number of child definitions which inherit from this definition.

Find a child definition set by index.

Returns:
0 if there is no child at that index.

Find a child definition set by index.

Returns:
0 if there is no child at that index.

Get the index of a child definition set.

The index of the child may change if any children are removed.

Returns:
-1 if the definition passed in is not a child.

Create a clone of this set using a new parent.

Called internally to add a child.

Called internally to remove a child.

Add a definition to the ownership vector of this set.

Remove a definition to the ownership vector of this set.

Returns:
true if the definition was removed.
false if the definition was not removed as it was not found.

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.

Replace one pointer with another pointer in the inheritance vector.

Remove a pointer from the inheritance vector.

Find which visualizer definition set owns the specified visualizer definition.

Returns:
0 If the definition is not owned by this set or any of it's parents.
const DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findOwnerOfVisualizerDefinition ( const DtVisualizerDefinition def,
unsigned int &  indexToDef 
) const [protected]

Find which visualizer definition set owns the specified visualizer definition.

Returns:
0 If the definition is not owned by this set or any of it's parents.

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.

Find the parent definition which this definition inherits which has a given level.

See the level() function for a description of level.

Returns:
0 if there is not parent.

Replaces definition parents when a new class extends the old class.

Destroy all visualizer definitions which have a particular parent.


Friends And Related Function Documentation

friend class DtElementDefinitionNew [friend]

Use the element definition interface for creating and deleting visual definition sets.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)