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 __domInstanceWithExtra_h__ 00010 #define __domInstanceWithExtra_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domExtra.h> 00017 class DAE; 00018 00024 class domInstanceWithExtra_complexType 00025 { 00026 protected: // Attributes 00033 xsAnyURI attrUrl; 00039 xsNCName attrSid; 00043 xsNCName attrName; 00044 00045 protected: // Element 00049 domExtra_Array elemExtra_array; 00050 00051 public: //Accessors and Mutators 00056 xsAnyURI &getUrl() { return attrUrl; } 00061 const xsAnyURI &getUrl() const { return attrUrl; } 00066 void setUrl( const xsAnyURI &atUrl ) { attrUrl = atUrl; } 00071 void setUrl( xsString atUrl ) { attrUrl = atUrl; } 00072 00077 xsNCName getSid() const { return attrSid; } 00082 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid;} 00083 00088 xsNCName getName() const { return attrName; } 00093 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName;} 00094 00099 domExtra_Array &getExtra_array() { return elemExtra_array; } 00104 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00105 protected: 00109 domInstanceWithExtra_complexType(DAE& dae, daeElement* elt) : attrUrl(dae, *elt), attrSid(), attrName(), elemExtra_array() {} 00113 virtual ~domInstanceWithExtra_complexType() {} 00117 virtual domInstanceWithExtra_complexType &operator=( const domInstanceWithExtra_complexType &cpy ) { (void)cpy; return *this; } 00118 }; 00119 00123 class domInstanceWithExtra : public daeElement, public domInstanceWithExtra_complexType 00124 { 00125 public: 00126 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INSTANCEWITHEXTRA; } 00127 static daeInt ID() { return 3; } 00128 virtual daeInt typeID() const { return ID(); } 00129 00130 public: //Accessors and Mutators 00135 xsAnyURI &getUrl() { return attrUrl; } 00140 const xsAnyURI &getUrl() const { return attrUrl; } 00145 void setUrl( const xsAnyURI &atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; } 00150 void setUrl( xsString atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; } 00151 00156 xsNCName getSid() const { return attrSid; } 00161 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; } 00162 00167 xsNCName getName() const { return attrName; } 00172 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[2] = true; } 00173 00174 protected: 00178 domInstanceWithExtra(DAE& dae) : daeElement(dae), domInstanceWithExtra_complexType(dae, this) {} 00182 virtual ~domInstanceWithExtra() {} 00186 virtual domInstanceWithExtra &operator=( const domInstanceWithExtra &cpy ) { (void)cpy; return *this; } 00187 00188 public: // STATIC METHODS 00193 static DLLSPEC daeElementRef create(DAE& dae); 00199 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00200 }; 00201 00202 00203 #endif