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 __domExtra_h__ 00010 #define __domExtra_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/domTechnique.h> 00018 class DAE; 00019 00024 class domExtra : public daeElement 00025 { 00026 public: 00027 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::EXTRA; } 00028 static daeInt ID() { return 679; } 00029 virtual daeInt typeID() const { return ID(); } 00030 protected: // Attributes 00036 xsID attrId; 00040 xsNCName attrName; 00045 xsNMTOKEN attrType; 00046 00047 protected: // Elements 00051 domAssetRef elemAsset; 00056 domTechnique_Array elemTechnique_array; 00057 00058 public: //Accessors and Mutators 00063 xsID getId() const { return attrId; } 00068 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00069 if( _document != NULL ) _document->changeElementID( this, attrId ); 00070 } 00071 00076 xsNCName getName() const { return attrName; } 00081 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00082 00087 xsNMTOKEN getType() const { return attrType; } 00092 void setType( xsNMTOKEN atType ) { *(daeStringRef*)&attrType = atType; _validAttributeArray[2] = true; } 00093 00098 const domAssetRef getAsset() const { return elemAsset; } 00103 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00108 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00109 protected: 00113 domExtra(DAE& dae) : daeElement(dae), attrId(), attrName(), attrType(), elemAsset(), elemTechnique_array() {} 00117 virtual ~domExtra() {} 00121 virtual domExtra &operator=( const domExtra &cpy ) { (void)cpy; return *this; } 00122 00123 public: // STATIC METHODS 00128 static DLLSPEC daeElementRef create(DAE& dae); 00134 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00135 }; 00136 00137 00138 #endif