![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2011 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 00006 #pragma once 00007 #include <vector> 00008 #include <vrvUtil/DtUnicode.h> 00009 #include <vrvCore/DtVisualizerDefinitionSet.h> 00010 #include <vrvCore/vrvCore.h> 00011 00012 namespace makVrv 00013 { 00014 00015 class DtVisualizerAttribute; 00016 class DtVisualizerDefinition; 00017 class DtElementDefinitionManager; 00018 00022 class DT_DLL_VRVCORE DtElementDefinitionNew 00023 { 00024 public: 00025 00028 const DtUnicode& name() const; 00029 00031 int numberOfVisualizerDefinitionSets() const; 00032 00035 DtVisualizerDefinitionSet& visualizerDefinitionSet(int modelSet); 00036 00040 const DtVisualizerDefinitionSet& visualizerDefinitionSet( 00041 int modelSet) const; 00042 00045 DtElementDefinitionNew* findParent(); 00046 00049 const DtElementDefinitionNew* findParent() const; 00050 00053 unsigned int numberOfChildren() const; 00054 00057 DtElementDefinitionNew* findChild(unsigned int index); 00058 00061 const DtElementDefinitionNew* findChild(unsigned int index) const; 00062 00066 int findChildIndex(const DtElementDefinitionNew* child) const; 00067 00072 DtVisualizerDefinition* findOrCreateLocalVisualizer(int modelSet, 00073 int visualizerIndex); 00074 00079 DtVisualizerAttribute* findOrCreateLocalAttribute(int modelSet, 00080 int visualizerIndex,const std::string& attributeName); 00081 00082 protected: 00083 00086 friend class DtElementDefinitionManager; 00087 00089 DtElementDefinitionNew(const DtUnicode& name); 00090 00092 DtElementDefinitionNew(const DtUnicode& name, DtElementDefinitionNew* parent); 00093 00095 ~DtElementDefinitionNew(); 00096 00099 DtElementDefinitionNew* clone(const DtUnicode& name, 00100 DtElementDefinitionNew* newParent) const; 00101 00103 void setName(const DtUnicode& name); 00104 00106 void addChild(DtElementDefinitionNew* child); 00107 00109 void removeChild(DtElementDefinitionNew* child); 00110 00111 protected: 00112 00113 typedef std::vector<DtElementDefinitionNew*> DefinitionList; 00114 typedef std::vector<DtVisualizerDefinitionSet*> DefinitionSetList; 00115 00116 DtUnicode myName; 00117 DefinitionSetList mySets; 00118 00119 DtElementDefinitionNew* myParent; 00120 DefinitionList myChildren; 00121 00122 }; 00123 }