00001 #ifndef __domImage_source_h__ 00002 #define __domImage_source_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 class DAE; 00009 00010 class domImage_source : public daeElement 00011 { 00012 public: 00013 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::IMAGE_SOURCE; } 00014 static daeInt ID() { return 19; } 00015 virtual daeInt typeID() const { return ID(); } 00016 public: 00017 class domRef; 00018 00019 typedef daeSmartRef<domRef> domRefRef; 00020 typedef daeTArray<domRefRef> domRef_Array; 00021 00027 class domRef : public daeElement 00028 { 00029 public: 00030 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::REF; } 00031 static daeInt ID() { return 20; } 00032 virtual daeInt typeID() const { return ID(); } 00033 00034 00035 public: //Accessors and Mutators 00040 xsAnyURI &getValue() { return _value; } 00045 const xsAnyURI &getValue() const { return _value; } 00050 void setValue( const xsAnyURI &val ) { _value = val; } 00055 void setValue( xsString val ) { _value = val; } 00056 00057 protected: // Value 00061 xsAnyURI _value; 00062 protected: 00066 domRef(DAE& dae) : daeElement(dae), _value(dae, *this) {} 00070 virtual ~domRef() {} 00074 virtual domRef &operator=( const domRef &cpy ) { (void)cpy; return *this; } 00075 00076 public: // STATIC METHODS 00081 static DLLSPEC daeElementRef create(DAE& dae); 00087 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00088 }; 00089 00090 class domHex; 00091 00092 typedef daeSmartRef<domHex> domHexRef; 00093 typedef daeTArray<domHexRef> domHex_Array; 00094 00100 class domHex : public daeElement 00101 { 00102 public: 00103 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::HEX; } 00104 static daeInt ID() { return 21; } 00105 virtual daeInt typeID() const { return ID(); } 00106 protected: // Attribute 00112 xsToken attrFormat; 00113 00114 00115 public: //Accessors and Mutators 00120 xsToken getFormat() const { return attrFormat; } 00125 void setFormat( xsToken atFormat ) { *(daeStringRef*)&attrFormat = atFormat; _validAttributeArray[0] = true; } 00126 00131 domList_of_hex_binary& getValue() { return _value; } 00136 void setValue( const domList_of_hex_binary& val ) { _value = val; } 00137 00138 protected: // Value 00142 domList_of_hex_binary _value; 00143 protected: 00147 domHex(DAE& dae) : daeElement(dae), attrFormat(), _value() {} 00151 virtual ~domHex() {} 00155 virtual domHex &operator=( const domHex &cpy ) { (void)cpy; return *this; } 00156 00157 public: // STATIC METHODS 00162 static DLLSPEC daeElementRef create(DAE& dae); 00168 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00169 }; 00170 00171 00172 00173 protected: // Elements 00179 domRefRef elemRef; 00185 domHexRef elemHex; 00189 daeElementRefArray _contents; 00193 daeUIntArray _contentsOrder; 00194 00198 daeTArray< daeCharArray * > _CMData; 00199 00200 00201 public: //Accessors and Mutators 00206 const domRefRef getRef() const { return elemRef; } 00211 const domHexRef getHex() const { return elemHex; } 00216 daeElementRefArray &getContents() { return _contents; } 00221 const daeElementRefArray &getContents() const { return _contents; } 00222 00223 protected: 00227 domImage_source(DAE& dae) : daeElement(dae), elemRef(), elemHex() {} 00231 virtual ~domImage_source() { daeElement::deleteCMDataArray(_CMData); } 00235 virtual domImage_source &operator=( const domImage_source &cpy ) { (void)cpy; return *this; } 00236 00237 public: // STATIC METHODS 00242 static DLLSPEC daeElementRef create(DAE& dae); 00248 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00249 }; 00250 00251 00252 #endif