VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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...

Public Member Functions

bool isEqual (const DtVisualizerDefinitionSet &) const
 check if two visual definition set are equal we don't comapre the parent or children
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

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.

Member Function Documentation

bool makVrv::DtVisualizerDefinitionSet::isEqual ( const DtVisualizerDefinitionSet ) const

check if two visual definition set are equal we don't comapre the parent or children

Returns
true is those two visual definition set are identical
int makVrv::DtVisualizerDefinitionSet::numberOfVisualizerDefinitions ( ) const

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.

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

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.

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

Returns
-1 if the definition can't be found in the index.
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.

Returns
0 If the parent visualizer definition is not currently inherited into this set.
void makVrv::DtVisualizerDefinitionSet::destroyVisualizerDefinition ( DtVisualizerDefinition def)

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.
bool makVrv::DtVisualizerDefinitionSet::visualizerDefinitionLocal ( const DtVisualizerDefinition def) const

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

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

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.
DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findParent ( )

Find the parent definition which this definition inherits from.

Returns
0 if there is no parent.
const DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findParent ( ) const

Find the parent definition which this definition inherits from.

Returns
0 if there is no parent.
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.

Returns
0 if there is no child at that index.
const DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::findChild ( unsigned int  index) const

Find a child definition set by index.

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

Returns
-1 if the definition passed in is not a child.
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.

Returns
true if the definition was removed.
false if the definition was not removed as it was not found.
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.

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

Returns
0 if there is not parent.
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.

Friends And Related Function Documentation

friend class DtElementDefinitionNew
friend

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

Member Data Documentation

DtVisualizerDefinitionSet* makVrv::DtVisualizerDefinitionSet::myParent
protected
VisualizerDefinitionSetList makVrv::DtVisualizerDefinitionSet::myChildren
protected
DefinitionList makVrv::DtVisualizerDefinitionSet::myDefinitions
protected
DefinitionList makVrv::DtVisualizerDefinitionSet::myInheritedDefintions
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)