00001 /* 00002 * Copyright 2006 Sony Computer Entertainment Inc. 00003 * 00004 * Licensed under the MIT Open Source License, for details please see license.txt or the website 00005 * http://www.opensource.org/licenses/mit-license.php 00006 * 00007 */ 00008 00009 #ifndef __domController_h__ 00010 #define __domController_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domAsset.h> 00017 #include <dom/domSkin.h> 00018 #include <dom/domMorph.h> 00019 #include <dom/domExtra.h> 00020 class DAE; 00021 00027 class domController : public daeElement 00028 { 00029 public: 00030 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CONTROLLER; } 00031 static daeInt ID() { return 655; } 00032 virtual daeInt typeID() const { return ID(); } 00033 protected: // Attributes 00039 xsID attrId; 00043 xsNCName attrName; 00044 00045 protected: // Elements 00049 domAssetRef elemAsset; 00054 domSkinRef elemSkin; 00059 domMorphRef elemMorph; 00063 domExtra_Array elemExtra_array; 00067 daeElementRefArray _contents; 00071 daeUIntArray _contentsOrder; 00072 00076 daeTArray< daeCharArray * > _CMData; 00077 00078 00079 public: //Accessors and Mutators 00084 xsID getId() const { return attrId; } 00089 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00090 if( _document != NULL ) _document->changeElementID( this, attrId ); 00091 } 00092 00097 xsNCName getName() const { return attrName; } 00102 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00103 00108 const domAssetRef getAsset() const { return elemAsset; } 00113 const domSkinRef getSkin() const { return elemSkin; } 00118 const domMorphRef getMorph() const { return elemMorph; } 00123 domExtra_Array &getExtra_array() { return elemExtra_array; } 00128 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00133 daeElementRefArray &getContents() { return _contents; } 00138 const daeElementRefArray &getContents() const { return _contents; } 00139 00140 protected: 00144 domController(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemSkin(), elemMorph(), elemExtra_array() {} 00148 virtual ~domController() { daeElement::deleteCMDataArray(_CMData); } 00152 virtual domController &operator=( const domController &cpy ) { (void)cpy; return *this; } 00153 00154 public: // STATIC METHODS 00159 static DLLSPEC daeElementRef create(DAE& dae); 00165 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00166 }; 00167 00168 00169 #endif