00001 #ifndef __domController_h__ 00002 #define __domController_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domAsset.h> 00009 #include <dom/domSkin.h> 00010 #include <dom/domMorph.h> 00011 #include <dom/domExtra.h> 00012 class DAE; 00013 00019 class domController : public daeElement 00020 { 00021 public: 00022 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CONTROLLER; } 00023 static daeInt ID() { return 345; } 00024 virtual daeInt typeID() const { return ID(); } 00025 protected: // Attributes 00031 xsID attrId; 00035 xsToken attrName; 00036 00037 protected: // Elements 00041 domAssetRef elemAsset; 00046 domSkinRef elemSkin; 00051 domMorphRef elemMorph; 00055 domExtra_Array elemExtra_array; 00059 daeElementRefArray _contents; 00063 daeUIntArray _contentsOrder; 00064 00068 daeTArray< daeCharArray * > _CMData; 00069 00070 00071 public: //Accessors and Mutators 00076 xsID getId() const { return attrId; } 00081 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; 00082 if( _document != NULL ) _document->changeElementID( this, attrId ); 00083 } 00084 00089 xsToken getName() const { return attrName; } 00094 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00095 00100 const domAssetRef getAsset() const { return elemAsset; } 00105 const domSkinRef getSkin() const { return elemSkin; } 00110 const domMorphRef getMorph() const { return elemMorph; } 00115 domExtra_Array &getExtra_array() { return elemExtra_array; } 00120 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00125 daeElementRefArray &getContents() { return _contents; } 00130 const daeElementRefArray &getContents() const { return _contents; } 00131 00132 protected: 00136 domController(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemSkin(), elemMorph(), elemExtra_array() {} 00140 virtual ~domController() { daeElement::deleteCMDataArray(_CMData); } 00144 virtual domController &operator=( const domController &cpy ) { (void)cpy; return *this; } 00145 00146 public: // STATIC METHODS 00151 static DLLSPEC daeElementRef create(DAE& dae); 00157 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00158 }; 00159 00160 00161 #endif