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 __domCommon_newparam_type_h__ 00010 #define __domCommon_newparam_type_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domFx_surface_common.h> 00017 #include <dom/domFx_sampler2D_common.h> 00018 class DAE; 00019 00020 class domCommon_newparam_type_complexType 00021 { 00022 public: 00023 class domSemantic; 00024 00025 typedef daeSmartRef<domSemantic> domSemanticRef; 00026 typedef daeTArray<domSemanticRef> domSemantic_Array; 00027 00028 class domSemantic : public daeElement 00029 { 00030 public: 00031 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SEMANTIC; } 00032 static daeInt ID() { return 121; } 00033 virtual daeInt typeID() const { return ID(); } 00034 00035 protected: // Value 00039 xsNCName _value; 00040 00041 public: //Accessors and Mutators 00046 xsNCName getValue() const { return _value; } 00051 void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; } 00052 00053 protected: 00057 domSemantic(DAE& dae) : daeElement(dae), _value() {} 00061 virtual ~domSemantic() {} 00065 virtual domSemantic &operator=( const domSemantic &cpy ) { (void)cpy; return *this; } 00066 00067 public: // STATIC METHODS 00072 static DLLSPEC daeElementRef create(DAE& dae); 00078 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00079 }; 00080 00081 class domFloat; 00082 00083 typedef daeSmartRef<domFloat> domFloatRef; 00084 typedef daeTArray<domFloatRef> domFloat_Array; 00085 00086 class domFloat : public daeElement 00087 { 00088 public: 00089 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT; } 00090 static daeInt ID() { return 122; } 00091 virtual daeInt typeID() const { return ID(); } 00092 00093 protected: // Value 00097 ::domFloat _value; 00098 00099 public: //Accessors and Mutators 00104 ::domFloat getValue() const { return _value; } 00109 void setValue( ::domFloat val ) { _value = val; } 00110 00111 protected: 00115 domFloat(DAE& dae) : daeElement(dae), _value() {} 00119 virtual ~domFloat() {} 00123 virtual domFloat &operator=( const domFloat &cpy ) { (void)cpy; return *this; } 00124 00125 public: // STATIC METHODS 00130 static DLLSPEC daeElementRef create(DAE& dae); 00136 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00137 }; 00138 00139 class domFloat2; 00140 00141 typedef daeSmartRef<domFloat2> domFloat2Ref; 00142 typedef daeTArray<domFloat2Ref> domFloat2_Array; 00143 00144 class domFloat2 : public daeElement 00145 { 00146 public: 00147 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT2; } 00148 static daeInt ID() { return 123; } 00149 virtual daeInt typeID() const { return ID(); } 00150 00151 protected: // Value 00155 ::domFloat2 _value; 00156 00157 public: //Accessors and Mutators 00162 ::domFloat2 &getValue() { return _value; } 00167 const ::domFloat2 &getValue() const { return _value; } 00172 void setValue( const ::domFloat2 &val ) { _value = val; } 00173 00174 protected: 00178 domFloat2(DAE& dae) : daeElement(dae), _value() {} 00182 virtual ~domFloat2() {} 00186 virtual domFloat2 &operator=( const domFloat2 &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 class domFloat3; 00203 00204 typedef daeSmartRef<domFloat3> domFloat3Ref; 00205 typedef daeTArray<domFloat3Ref> domFloat3_Array; 00206 00207 class domFloat3 : public daeElement 00208 { 00209 public: 00210 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT3; } 00211 static daeInt ID() { return 124; } 00212 virtual daeInt typeID() const { return ID(); } 00213 00214 protected: // Value 00218 ::domFloat3 _value; 00219 00220 public: //Accessors and Mutators 00225 ::domFloat3 &getValue() { return _value; } 00230 const ::domFloat3 &getValue() const { return _value; } 00235 void setValue( const ::domFloat3 &val ) { _value = val; } 00236 00237 protected: 00241 domFloat3(DAE& dae) : daeElement(dae), _value() {} 00245 virtual ~domFloat3() {} 00249 virtual domFloat3 &operator=( const domFloat3 &cpy ) { (void)cpy; return *this; } 00250 00251 public: // STATIC METHODS 00256 static DLLSPEC daeElementRef create(DAE& dae); 00262 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00263 }; 00264 00265 class domFloat4; 00266 00267 typedef daeSmartRef<domFloat4> domFloat4Ref; 00268 typedef daeTArray<domFloat4Ref> domFloat4_Array; 00269 00270 class domFloat4 : public daeElement 00271 { 00272 public: 00273 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT4; } 00274 static daeInt ID() { return 125; } 00275 virtual daeInt typeID() const { return ID(); } 00276 00277 protected: // Value 00281 ::domFloat4 _value; 00282 00283 public: //Accessors and Mutators 00288 ::domFloat4 &getValue() { return _value; } 00293 const ::domFloat4 &getValue() const { return _value; } 00298 void setValue( const ::domFloat4 &val ) { _value = val; } 00299 00300 protected: 00304 domFloat4(DAE& dae) : daeElement(dae), _value() {} 00308 virtual ~domFloat4() {} 00312 virtual domFloat4 &operator=( const domFloat4 &cpy ) { (void)cpy; return *this; } 00313 00314 public: // STATIC METHODS 00319 static DLLSPEC daeElementRef create(DAE& dae); 00325 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00326 }; 00327 00328 00329 protected: // Attribute 00335 xsNCName attrSid; 00336 00337 protected: // Elements 00338 domSemanticRef elemSemantic; 00339 domFloatRef elemFloat; 00340 domFloat2Ref elemFloat2; 00341 domFloat3Ref elemFloat3; 00342 domFloat4Ref elemFloat4; 00343 domFx_surface_commonRef elemSurface; 00344 domFx_sampler2D_commonRef elemSampler2D; 00348 daeElementRefArray _contents; 00352 daeUIntArray _contentsOrder; 00353 00357 daeTArray< daeCharArray * > _CMData; 00358 00359 00360 public: //Accessors and Mutators 00365 xsNCName getSid() const { return attrSid; } 00370 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid;} 00371 00376 const domSemanticRef getSemantic() const { return elemSemantic; } 00381 const domFloatRef getFloat() const { return elemFloat; } 00386 const domFloat2Ref getFloat2() const { return elemFloat2; } 00391 const domFloat3Ref getFloat3() const { return elemFloat3; } 00396 const domFloat4Ref getFloat4() const { return elemFloat4; } 00401 const domFx_surface_commonRef getSurface() const { return elemSurface; } 00406 const domFx_sampler2D_commonRef getSampler2D() const { return elemSampler2D; } 00411 daeElementRefArray &getContents() { return _contents; } 00416 const daeElementRefArray &getContents() const { return _contents; } 00417 00418 protected: 00422 domCommon_newparam_type_complexType(DAE& dae, daeElement* elt) : attrSid(), elemSemantic(), elemFloat(), elemFloat2(), elemFloat3(), elemFloat4(), elemSurface(), elemSampler2D() {} 00426 virtual ~domCommon_newparam_type_complexType() { daeElement::deleteCMDataArray(_CMData); } 00430 virtual domCommon_newparam_type_complexType &operator=( const domCommon_newparam_type_complexType &cpy ) { (void)cpy; return *this; } 00431 }; 00432 00436 class domCommon_newparam_type : public daeElement, public domCommon_newparam_type_complexType 00437 { 00438 public: 00439 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::COMMON_NEWPARAM_TYPE; } 00440 static daeInt ID() { return 126; } 00441 virtual daeInt typeID() const { return ID(); } 00442 00443 public: //Accessors and Mutators 00448 xsNCName getSid() const { return attrSid; } 00453 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 00454 00455 protected: 00459 domCommon_newparam_type(DAE& dae) : daeElement(dae), domCommon_newparam_type_complexType(dae, this) {} 00463 virtual ~domCommon_newparam_type() {} 00467 virtual domCommon_newparam_type &operator=( const domCommon_newparam_type &cpy ) { (void)cpy; return *this; } 00468 00469 public: // STATIC METHODS 00474 static DLLSPEC daeElementRef create(DAE& dae); 00480 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00481 }; 00482 00483 00484 #endif