VR-Forces Developer's Guide
 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 | Private Member Functions | Friends
makVrv::DtElementDefinition Class Reference

The element definition class contains the element definition information. The makVrv::DtElementDefinitionManager is responsible for create and destroying instances of the element definitions.

Public Member Functions

const DtUnicode & name () const
 
const std::string & fileName () const
 
const std::vector< std::string > & duplicateNames () const
 
void setFileName (const std::string &)
 
bool isEqual (const DtElementDefinition &) const
 
int numberOfVisualizerDefinitionSets () const
 
DtVisualizerDefinitionSet & visualizerDefinitionSet (DtModelSetId modelSet)
 
const DtVisualizerDefinitionSet & visualizerDefinitionSet (DtModelSetId modelSet) const
 
DtElementDefinition * findParent ()
 
const DtElementDefinition * findParent () const
 
unsigned int numberOfChildren () const
 
DtElementDefinition * findChild (unsigned int index)
 
const DtElementDefinition * findChild (unsigned int index) const
 
int findChildIndex (const DtElementDefinition *child) const
 
std::vector
< DtElementDefinition * > 
getChildren ()
 
DtVisualizerDefinition * findOrCreateLocalVisualizer (DtModelSetId modelSet, int visualizerIndex)
 
DtVisualizerDefinition * findOrCreateLocalVisualizer (DtModelSetId modelSet, const std::string &uuidString)
 
DtVisualizerAttribute * findOrCreateLocalAttribute (DtModelSetId modelSet, int visualizerIndex, const std::string &attributeName)
 
bool isHier () const
 
void setIsHier (bool isHier)
 
bool isDuplicate () const
 
void addDuplicateName (const std::string &duplicateName)
 
void setDuplicateFlag (bool duplicate)
 
DtElementDefinition * clone () const
 
virtual void clearAllVisualizerSets ()
 
 ~DtElementDefinition ()
 
DtElementDefinition * clone (const DtUnicode &name, DtElementDefinition *newParent) const
 
void setName (const DtUnicode &name)
 
void addChild (DtElementDefinition *child)
 
void removeChild (DtElementDefinition *child)
 

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 &copy)
 
DtElementDefinition & operator= (const DtElementDefinition &)
 

Friends

class DtElementDefinitionManager
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtElementDefinition::DtElementDefinition ( const DtUnicode &  name)
protected

Create a top level element definition.

makVrv::DtElementDefinition::DtElementDefinition ( const DtUnicode &  name,
DtElementDefinition *  parent 
)
protected

Create an element definition which inherits from another definition.

makVrv::DtElementDefinition::~DtElementDefinition ( )

DTOR.

makVrv::DtElementDefinition::DtElementDefinition ( )
private

CTOR.

makVrv::DtElementDefinition::DtElementDefinition ( const DtElementDefinition &  copy)
private

Copy Constructor Not implemented.

Member Function Documentation

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

Returns
true is those two element Definitions are identical
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.

Returns
0 if this is a top level definition.
const DtElementDefinition* makVrv::DtElementDefinition::findParent ( ) const

Find the element definition that his inherits from.

Returns
0 if this is a top level definition.
unsigned int makVrv::DtElementDefinition::numberOfChildren ( ) const

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.

Returns
0 if the child does not exist at the provided index.
const DtElementDefinition* makVrv::DtElementDefinition::findChild ( unsigned int  index) const

Find a child at a given index.

Returns
0 if the child does not exist at the provided 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.

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

Returns
0 if the Visualizer definition index is invalid.
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.

Returns
0 if the Visualizer definition index is invalid. See findOrCreateLocalVisualizer function.
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 void makVrv::DtElementDefinition::clearAllVisualizerSets ( )
virtual

Remove all the visualizer sets in this element definition.

DtElementDefinition& makVrv::DtElementDefinition::operator= ( const DtElementDefinition &  )
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.

Friends And Related Function Documentation

friend class DtElementDefinitionManager
friend

Use the element definition manager to create, copy and destroy element definitions.

Member Data Documentation

DtUnicode makVrv::DtElementDefinition::myName
protected
std::string makVrv::DtElementDefinition::myFileName
protected
DefinitionSetList makVrv::DtElementDefinition::mySets
protected
std::vector<std::string> makVrv::DtElementDefinition::myDuplicateNames
protected
bool makVrv::DtElementDefinition::myIsHier
protected
bool makVrv::DtElementDefinition::myDuplicateFlag
protected
DtElementDefinition* makVrv::DtElementDefinition::myParent
protected
DefinitionList makVrv::DtElementDefinition::myChildren
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)