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_float_or_param_type_h__ 00010 #define __domCommon_float_or_param_type_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 class DAE; 00017 00018 class domCommon_float_or_param_type_complexType 00019 { 00020 public: 00021 class domFloat; 00022 00023 typedef daeSmartRef<domFloat> domFloatRef; 00024 typedef daeTArray<domFloatRef> domFloat_Array; 00025 00026 class domFloat : public daeElement 00027 { 00028 public: 00029 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT; } 00030 static daeInt ID() { return 113; } 00031 virtual daeInt typeID() const { return ID(); } 00032 protected: // Attribute 00033 xsNCName attrSid; 00034 00035 protected: // Value 00039 ::domFloat _value; 00040 00041 public: //Accessors and Mutators 00046 xsNCName getSid() const { return attrSid; } 00051 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 00052 00057 ::domFloat getValue() const { return _value; } 00062 void setValue( ::domFloat val ) { _value = val; } 00063 00064 protected: 00068 domFloat(DAE& dae) : daeElement(dae), attrSid(), _value() {} 00072 virtual ~domFloat() {} 00076 virtual domFloat &operator=( const domFloat &cpy ) { (void)cpy; return *this; } 00077 00078 public: // STATIC METHODS 00083 static DLLSPEC daeElementRef create(DAE& dae); 00089 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00090 }; 00091 00092 class domParam; 00093 00094 typedef daeSmartRef<domParam> domParamRef; 00095 typedef daeTArray<domParamRef> domParam_Array; 00096 00097 class domParam : public daeElement 00098 { 00099 public: 00100 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PARAM; } 00101 static daeInt ID() { return 114; } 00102 virtual daeInt typeID() const { return ID(); } 00103 protected: // Attribute 00104 xsNCName attrRef; 00105 00106 00107 public: //Accessors and Mutators 00112 xsNCName getRef() const { return attrRef; } 00117 void setRef( xsNCName atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[0] = true; } 00118 00119 protected: 00123 domParam(DAE& dae) : daeElement(dae), attrRef() {} 00127 virtual ~domParam() {} 00131 virtual domParam &operator=( const domParam &cpy ) { (void)cpy; return *this; } 00132 00133 public: // STATIC METHODS 00138 static DLLSPEC daeElementRef create(DAE& dae); 00144 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00145 }; 00146 00147 00148 00149 protected: // Elements 00150 domFloatRef elemFloat; 00151 domParamRef elemParam; 00155 daeElementRefArray _contents; 00159 daeUIntArray _contentsOrder; 00160 00164 daeTArray< daeCharArray * > _CMData; 00165 00166 00167 public: //Accessors and Mutators 00172 const domFloatRef getFloat() const { return elemFloat; } 00177 const domParamRef getParam() const { return elemParam; } 00182 daeElementRefArray &getContents() { return _contents; } 00187 const daeElementRefArray &getContents() const { return _contents; } 00188 00189 protected: 00193 domCommon_float_or_param_type_complexType(DAE& dae, daeElement* elt) : elemFloat(), elemParam() {} 00197 virtual ~domCommon_float_or_param_type_complexType() { daeElement::deleteCMDataArray(_CMData); } 00201 virtual domCommon_float_or_param_type_complexType &operator=( const domCommon_float_or_param_type_complexType &cpy ) { (void)cpy; return *this; } 00202 }; 00203 00207 class domCommon_float_or_param_type : public daeElement, public domCommon_float_or_param_type_complexType 00208 { 00209 public: 00210 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::COMMON_FLOAT_OR_PARAM_TYPE; } 00211 static daeInt ID() { return 115; } 00212 virtual daeInt typeID() const { return ID(); } 00213 protected: 00217 domCommon_float_or_param_type(DAE& dae) : daeElement(dae), domCommon_float_or_param_type_complexType(dae, this) {} 00221 virtual ~domCommon_float_or_param_type() {} 00225 virtual domCommon_float_or_param_type &operator=( const domCommon_float_or_param_type &cpy ) { (void)cpy; return *this; } 00226 00227 public: // STATIC METHODS 00232 static DLLSPEC daeElementRef create(DAE& dae); 00238 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00239 }; 00240 00241 00242 #endif