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 __domCg_newparam_h__ 00010 #define __domCg_newparam_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domCg_param_type.h> 00017 #include <dom/domFx_annotate_common.h> 00018 #include <dom/domCg_setuser_type.h> 00019 #include <dom/domCg_newarray_type.h> 00020 class DAE; 00021 00026 class domCg_newparam_complexType 00027 { 00028 public: 00029 class domSemantic; 00030 00031 typedef daeSmartRef<domSemantic> domSemanticRef; 00032 typedef daeTArray<domSemanticRef> domSemantic_Array; 00033 00037 class domSemantic : public daeElement 00038 { 00039 public: 00040 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SEMANTIC; } 00041 static daeInt ID() { return 140; } 00042 virtual daeInt typeID() const { return ID(); } 00043 00044 protected: // Value 00048 xsNCName _value; 00049 00050 public: //Accessors and Mutators 00055 xsNCName getValue() const { return _value; } 00060 void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; } 00061 00062 protected: 00066 domSemantic(DAE& dae) : daeElement(dae), _value() {} 00070 virtual ~domSemantic() {} 00074 virtual domSemantic &operator=( const domSemantic &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 domModifier; 00091 00092 typedef daeSmartRef<domModifier> domModifierRef; 00093 typedef daeTArray<domModifierRef> domModifier_Array; 00094 00098 class domModifier : public daeElement 00099 { 00100 public: 00101 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MODIFIER; } 00102 static daeInt ID() { return 141; } 00103 virtual daeInt typeID() const { return ID(); } 00104 00105 protected: // Value 00109 domFx_modifier_enum_common _value; 00110 00111 public: //Accessors and Mutators 00116 domFx_modifier_enum_common getValue() const { return _value; } 00121 void setValue( domFx_modifier_enum_common val ) { _value = val; } 00122 00123 protected: 00127 domModifier(DAE& dae) : daeElement(dae), _value() {} 00131 virtual ~domModifier() {} 00135 virtual domModifier &operator=( const domModifier &cpy ) { (void)cpy; return *this; } 00136 00137 public: // STATIC METHODS 00142 static DLLSPEC daeElementRef create(DAE& dae); 00148 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00149 }; 00150 00151 00152 protected: // Attribute 00153 domCg_identifier attrSid; 00154 00155 protected: // Elements 00160 domFx_annotate_common_Array elemAnnotate_array; 00165 domSemanticRef elemSemantic; 00170 domModifierRef elemModifier; 00171 domCg_param_typeRef elemCg_param_type; 00172 domCg_setuser_typeRef elemUsertype; 00173 domCg_newarray_typeRef elemArray; 00177 daeElementRefArray _contents; 00181 daeUIntArray _contentsOrder; 00182 00186 daeTArray< daeCharArray * > _CMData; 00187 00188 00189 public: //Accessors and Mutators 00194 domCg_identifier getSid() const { return attrSid; } 00199 void setSid( domCg_identifier atSid ) { attrSid = atSid; } 00200 00205 domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; } 00210 const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; } 00215 const domSemanticRef getSemantic() const { return elemSemantic; } 00220 const domModifierRef getModifier() const { return elemModifier; } 00225 const domCg_param_typeRef getCg_param_type() const { return elemCg_param_type; } 00230 const domCg_setuser_typeRef getUsertype() const { return elemUsertype; } 00235 const domCg_newarray_typeRef getArray() const { return elemArray; } 00240 daeElementRefArray &getContents() { return _contents; } 00245 const daeElementRefArray &getContents() const { return _contents; } 00246 00247 protected: 00251 domCg_newparam_complexType(DAE& dae, daeElement* elt) : attrSid(), elemAnnotate_array(), elemSemantic(), elemModifier(), elemCg_param_type(), elemUsertype(), elemArray() {} 00255 virtual ~domCg_newparam_complexType() { daeElement::deleteCMDataArray(_CMData); } 00259 virtual domCg_newparam_complexType &operator=( const domCg_newparam_complexType &cpy ) { (void)cpy; return *this; } 00260 }; 00261 00265 class domCg_newparam : public daeElement, public domCg_newparam_complexType 00266 { 00267 public: 00268 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CG_NEWPARAM; } 00269 static daeInt ID() { return 142; } 00270 virtual daeInt typeID() const { return ID(); } 00271 00272 public: //Accessors and Mutators 00277 domCg_identifier getSid() const { return attrSid; } 00282 void setSid( domCg_identifier atSid ) { attrSid = atSid; _validAttributeArray[0] = true; } 00283 00284 protected: 00288 domCg_newparam(DAE& dae) : daeElement(dae), domCg_newparam_complexType(dae, this) {} 00292 virtual ~domCg_newparam() {} 00296 virtual domCg_newparam &operator=( const domCg_newparam &cpy ) { (void)cpy; return *this; } 00297 00298 public: // STATIC METHODS 00303 static DLLSPEC daeElementRef create(DAE& dae); 00309 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00310 }; 00311 00312 00313 #endif