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 __domGlsl_newparam_h__ 00010 #define __domGlsl_newparam_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domGlsl_param_type.h> 00017 #include <dom/domFx_annotate_common.h> 00018 #include <dom/domGlsl_newarray_type.h> 00019 class DAE; 00020 00021 class domGlsl_newparam_complexType 00022 { 00023 public: 00024 class domSemantic; 00025 00026 typedef daeSmartRef<domSemantic> domSemanticRef; 00027 typedef daeTArray<domSemanticRef> domSemantic_Array; 00028 00029 class domSemantic : public daeElement 00030 { 00031 public: 00032 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SEMANTIC; } 00033 static daeInt ID() { return 108; } 00034 virtual daeInt typeID() const { return ID(); } 00035 00036 protected: // Value 00040 xsNCName _value; 00041 00042 public: //Accessors and Mutators 00047 xsNCName getValue() const { return _value; } 00052 void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; } 00053 00054 protected: 00058 domSemantic(DAE& dae) : daeElement(dae), _value() {} 00062 virtual ~domSemantic() {} 00066 virtual domSemantic &operator=( const domSemantic &cpy ) { (void)cpy; return *this; } 00067 00068 public: // STATIC METHODS 00073 static DLLSPEC daeElementRef create(DAE& dae); 00079 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00080 }; 00081 00082 class domModifier; 00083 00084 typedef daeSmartRef<domModifier> domModifierRef; 00085 typedef daeTArray<domModifierRef> domModifier_Array; 00086 00087 class domModifier : public daeElement 00088 { 00089 public: 00090 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MODIFIER; } 00091 static daeInt ID() { return 109; } 00092 virtual daeInt typeID() const { return ID(); } 00093 00094 protected: // Value 00098 domFx_modifier_enum_common _value; 00099 00100 public: //Accessors and Mutators 00105 domFx_modifier_enum_common getValue() const { return _value; } 00110 void setValue( domFx_modifier_enum_common val ) { _value = val; } 00111 00112 protected: 00116 domModifier(DAE& dae) : daeElement(dae), _value() {} 00120 virtual ~domModifier() {} 00124 virtual domModifier &operator=( const domModifier &cpy ) { (void)cpy; return *this; } 00125 00126 public: // STATIC METHODS 00131 static DLLSPEC daeElementRef create(DAE& dae); 00137 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00138 }; 00139 00140 00141 protected: // Attribute 00142 domGlsl_identifier attrSid; 00143 00144 protected: // Elements 00145 domFx_annotate_common_Array elemAnnotate_array; 00146 domSemanticRef elemSemantic; 00147 domModifierRef elemModifier; 00148 domGlsl_param_typeRef elemGlsl_param_type; 00149 domGlsl_newarray_typeRef elemArray; 00153 daeElementRefArray _contents; 00157 daeUIntArray _contentsOrder; 00158 00162 daeTArray< daeCharArray * > _CMData; 00163 00164 00165 public: //Accessors and Mutators 00170 domGlsl_identifier getSid() const { return attrSid; } 00175 void setSid( domGlsl_identifier atSid ) { attrSid = atSid; } 00176 00181 domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; } 00186 const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; } 00191 const domSemanticRef getSemantic() const { return elemSemantic; } 00196 const domModifierRef getModifier() const { return elemModifier; } 00201 const domGlsl_param_typeRef getGlsl_param_type() const { return elemGlsl_param_type; } 00206 const domGlsl_newarray_typeRef getArray() const { return elemArray; } 00211 daeElementRefArray &getContents() { return _contents; } 00216 const daeElementRefArray &getContents() const { return _contents; } 00217 00218 protected: 00222 domGlsl_newparam_complexType(DAE& dae, daeElement* elt) : attrSid(), elemAnnotate_array(), elemSemantic(), elemModifier(), elemGlsl_param_type(), elemArray() {} 00226 virtual ~domGlsl_newparam_complexType() { daeElement::deleteCMDataArray(_CMData); } 00230 virtual domGlsl_newparam_complexType &operator=( const domGlsl_newparam_complexType &cpy ) { (void)cpy; return *this; } 00231 }; 00232 00236 class domGlsl_newparam : public daeElement, public domGlsl_newparam_complexType 00237 { 00238 public: 00239 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GLSL_NEWPARAM; } 00240 static daeInt ID() { return 110; } 00241 virtual daeInt typeID() const { return ID(); } 00242 00243 public: //Accessors and Mutators 00248 domGlsl_identifier getSid() const { return attrSid; } 00253 void setSid( domGlsl_identifier atSid ) { attrSid = atSid; _validAttributeArray[0] = true; } 00254 00255 protected: 00259 domGlsl_newparam(DAE& dae) : daeElement(dae), domGlsl_newparam_complexType(dae, this) {} 00263 virtual ~domGlsl_newparam() {} 00267 virtual domGlsl_newparam &operator=( const domGlsl_newparam &cpy ) { (void)cpy; return *this; } 00268 00269 public: // STATIC METHODS 00274 static DLLSPEC daeElementRef create(DAE& dae); 00280 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00281 }; 00282 00283 00284 #endif