00001 #ifndef __domGles2_program_h__ 00002 #define __domGles2_program_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domGles2_shader.h> 00009 #include <dom/domFx_target.h> 00010 #include <dom/domGles2_value.h> 00011 class DAE; 00012 00016 class domGles2_program : public daeElement 00017 { 00018 public: 00019 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GLES2_PROGRAM; } 00020 static daeInt ID() { return 215; } 00021 virtual daeInt typeID() const { return ID(); } 00022 public: 00023 class domBind_attribute; 00024 00025 typedef daeSmartRef<domBind_attribute> domBind_attributeRef; 00026 typedef daeTArray<domBind_attributeRef> domBind_attribute_Array; 00027 00033 class domBind_attribute : public daeElement 00034 { 00035 public: 00036 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BIND_ATTRIBUTE; } 00037 static daeInt ID() { return 216; } 00038 virtual daeInt typeID() const { return ID(); } 00039 public: 00040 class domSemantic; 00041 00042 typedef daeSmartRef<domSemantic> domSemanticRef; 00043 typedef daeTArray<domSemanticRef> domSemantic_Array; 00044 00050 class domSemantic : public daeElement 00051 { 00052 public: 00053 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SEMANTIC; } 00054 static daeInt ID() { return 217; } 00055 virtual daeInt typeID() const { return ID(); } 00056 00057 00058 public: //Accessors and Mutators 00063 xsToken getValue() const { return _value; } 00068 void setValue( xsToken val ) { *(daeStringRef*)&_value = val; } 00069 00070 protected: // Value 00074 xsToken _value; 00075 protected: 00079 domSemantic(DAE& dae) : daeElement(dae), _value() {} 00083 virtual ~domSemantic() {} 00087 virtual domSemantic &operator=( const domSemantic &cpy ) { (void)cpy; return *this; } 00088 00089 public: // STATIC METHODS 00094 static DLLSPEC daeElementRef create(DAE& dae); 00100 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00101 }; 00102 00103 00104 protected: // Attribute 00108 xsToken attrSymbol; 00109 00110 protected: // Element 00116 domSemanticRef elemSemantic; 00120 daeElementRefArray _contents; 00124 daeUIntArray _contentsOrder; 00125 00129 daeTArray< daeCharArray * > _CMData; 00130 00131 00132 public: //Accessors and Mutators 00137 xsToken getSymbol() const { return attrSymbol; } 00142 void setSymbol( xsToken atSymbol ) { *(daeStringRef*)&attrSymbol = atSymbol; _validAttributeArray[0] = true; } 00143 00148 const domSemanticRef getSemantic() const { return elemSemantic; } 00153 daeElementRefArray &getContents() { return _contents; } 00158 const daeElementRefArray &getContents() const { return _contents; } 00159 00160 protected: 00164 domBind_attribute(DAE& dae) : daeElement(dae), attrSymbol(), elemSemantic() {} 00168 virtual ~domBind_attribute() { daeElement::deleteCMDataArray(_CMData); } 00172 virtual domBind_attribute &operator=( const domBind_attribute &cpy ) { (void)cpy; return *this; } 00173 00174 public: // STATIC METHODS 00179 static DLLSPEC daeElementRef create(DAE& dae); 00185 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00186 }; 00187 00188 class domBind_uniform; 00189 00190 typedef daeSmartRef<domBind_uniform> domBind_uniformRef; 00191 typedef daeTArray<domBind_uniformRef> domBind_uniform_Array; 00192 00196 class domBind_uniform : public daeElement 00197 { 00198 public: 00199 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BIND_UNIFORM; } 00200 static daeInt ID() { return 218; } 00201 virtual daeInt typeID() const { return ID(); } 00202 public: 00203 class domParam; 00204 00205 typedef daeSmartRef<domParam> domParamRef; 00206 typedef daeTArray<domParamRef> domParam_Array; 00207 00211 class domParam : public daeElement 00212 { 00213 public: 00214 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PARAM; } 00215 static daeInt ID() { return 219; } 00216 virtual daeInt typeID() const { return ID(); } 00217 protected: // Attribute 00221 xsNCName attrRef; 00222 00223 00224 public: //Accessors and Mutators 00229 xsNCName getRef() const { return attrRef; } 00234 void setRef( xsNCName atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[0] = true; } 00235 00236 protected: 00240 domParam(DAE& dae) : daeElement(dae), attrRef() {} 00244 virtual ~domParam() {} 00248 virtual domParam &operator=( const domParam &cpy ) { (void)cpy; return *this; } 00249 00250 public: // STATIC METHODS 00255 static DLLSPEC daeElementRef create(DAE& dae); 00261 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00262 }; 00263 00264 00265 protected: // Attribute 00269 xsToken attrSymbol; 00270 00271 protected: // Elements 00275 domParamRef elemParam; 00276 domGles2_valueRef elemGles2_value; 00280 daeElementRefArray _contents; 00284 daeUIntArray _contentsOrder; 00285 00289 daeTArray< daeCharArray * > _CMData; 00290 00291 00292 public: //Accessors and Mutators 00297 xsToken getSymbol() const { return attrSymbol; } 00302 void setSymbol( xsToken atSymbol ) { *(daeStringRef*)&attrSymbol = atSymbol; _validAttributeArray[0] = true; } 00303 00308 const domParamRef getParam() const { return elemParam; } 00313 const domGles2_valueRef getGles2_value() const { return elemGles2_value; } 00318 daeElementRefArray &getContents() { return _contents; } 00323 const daeElementRefArray &getContents() const { return _contents; } 00324 00325 protected: 00329 domBind_uniform(DAE& dae) : daeElement(dae), attrSymbol(), elemParam(), elemGles2_value() {} 00333 virtual ~domBind_uniform() { daeElement::deleteCMDataArray(_CMData); } 00337 virtual domBind_uniform &operator=( const domBind_uniform &cpy ) { (void)cpy; return *this; } 00338 00339 public: // STATIC METHODS 00344 static DLLSPEC daeElementRef create(DAE& dae); 00350 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00351 }; 00352 00353 00354 00355 protected: // Elements 00359 domGles2_shader_Array elemShader_array; 00363 domFx_target_Array elemLinker_array; 00369 domBind_attribute_Array elemBind_attribute_array; 00373 domBind_uniform_Array elemBind_uniform_array; 00374 00375 public: //Accessors and Mutators 00380 domGles2_shader_Array &getShader_array() { return elemShader_array; } 00385 const domGles2_shader_Array &getShader_array() const { return elemShader_array; } 00390 domFx_target_Array &getLinker_array() { return elemLinker_array; } 00395 const domFx_target_Array &getLinker_array() const { return elemLinker_array; } 00400 domBind_attribute_Array &getBind_attribute_array() { return elemBind_attribute_array; } 00405 const domBind_attribute_Array &getBind_attribute_array() const { return elemBind_attribute_array; } 00410 domBind_uniform_Array &getBind_uniform_array() { return elemBind_uniform_array; } 00415 const domBind_uniform_Array &getBind_uniform_array() const { return elemBind_uniform_array; } 00416 protected: 00420 domGles2_program(DAE& dae) : daeElement(dae), elemShader_array(), elemLinker_array(), elemBind_attribute_array(), elemBind_uniform_array() {} 00424 virtual ~domGles2_program() {} 00428 virtual domGles2_program &operator=( const domGles2_program &cpy ) { (void)cpy; return *this; } 00429 00430 public: // STATIC METHODS 00435 static DLLSPEC daeElementRef create(DAE& dae); 00441 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00442 }; 00443 00444 00445 #endif