00001 #ifndef __domFx_common_float_or_param_h__ 00002 #define __domFx_common_float_or_param_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 class DAE; 00009 00010 class domFx_common_float_or_param : public daeElement 00011 { 00012 public: 00013 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_COMMON_FLOAT_OR_PARAM; } 00014 static daeInt ID() { return 189; } 00015 virtual daeInt typeID() const { return ID(); } 00016 public: 00017 class domFloat; 00018 00019 typedef daeSmartRef<domFloat> domFloatRef; 00020 typedef daeTArray<domFloatRef> domFloat_Array; 00021 00022 class domFloat : public daeElement 00023 { 00024 public: 00025 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT; } 00026 static daeInt ID() { return 190; } 00027 virtual daeInt typeID() const { return ID(); } 00028 protected: // Attribute 00029 domSid attrSid; 00030 00031 00032 public: //Accessors and Mutators 00037 domSid getSid() const { return attrSid; } 00042 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 00043 00048 ::domFloat& getValue() { return _value; } 00053 void setValue( const ::domFloat& val ) { _value = val; } 00054 00055 protected: // Value 00059 ::domFloat _value; 00060 protected: 00064 domFloat(DAE& dae) : daeElement(dae), attrSid(), _value() {} 00068 virtual ~domFloat() {} 00072 virtual domFloat &operator=( const domFloat &cpy ) { (void)cpy; return *this; } 00073 00074 public: // STATIC METHODS 00079 static DLLSPEC daeElementRef create(DAE& dae); 00085 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00086 }; 00087 00088 class domParam; 00089 00090 typedef daeSmartRef<domParam> domParamRef; 00091 typedef daeTArray<domParamRef> domParam_Array; 00092 00093 class domParam : public daeElement 00094 { 00095 public: 00096 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PARAM; } 00097 static daeInt ID() { return 191; } 00098 virtual daeInt typeID() const { return ID(); } 00099 protected: // Attribute 00100 xsNCName attrRef; 00101 00102 00103 public: //Accessors and Mutators 00108 xsNCName getRef() const { return attrRef; } 00113 void setRef( xsNCName atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[0] = true; } 00114 00115 protected: 00119 domParam(DAE& dae) : daeElement(dae), attrRef() {} 00123 virtual ~domParam() {} 00127 virtual domParam &operator=( const domParam &cpy ) { (void)cpy; return *this; } 00128 00129 public: // STATIC METHODS 00134 static DLLSPEC daeElementRef create(DAE& dae); 00140 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00141 }; 00142 00143 00144 00145 protected: // Elements 00146 domFloatRef elemFloat; 00147 domParamRef elemParam; 00151 daeElementRefArray _contents; 00155 daeUIntArray _contentsOrder; 00156 00160 daeTArray< daeCharArray * > _CMData; 00161 00162 00163 public: //Accessors and Mutators 00168 const domFloatRef getFloat() const { return elemFloat; } 00173 const domParamRef getParam() const { return elemParam; } 00178 daeElementRefArray &getContents() { return _contents; } 00183 const daeElementRefArray &getContents() const { return _contents; } 00184 00185 protected: 00189 domFx_common_float_or_param(DAE& dae) : daeElement(dae), elemFloat(), elemParam() {} 00193 virtual ~domFx_common_float_or_param() { daeElement::deleteCMDataArray(_CMData); } 00197 virtual domFx_common_float_or_param &operator=( const domFx_common_float_or_param &cpy ) { (void)cpy; return *this; } 00198 00199 public: // STATIC METHODS 00204 static DLLSPEC daeElementRef create(DAE& dae); 00210 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00211 }; 00212 00213 00214 #endif