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_setparam_h__ 00010 #define __domGlsl_setparam_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_setarray_type.h> 00019 class DAE; 00020 00021 class domGlsl_setparam_complexType 00022 { 00023 protected: // Attributes 00024 domGlsl_identifier attrRef; 00025 xsNCName attrProgram; 00026 00027 protected: // Elements 00028 domFx_annotate_common_Array elemAnnotate_array; 00029 domGlsl_param_typeRef elemGlsl_param_type; 00030 domGlsl_setarray_typeRef elemArray; 00034 daeElementRefArray _contents; 00038 daeUIntArray _contentsOrder; 00039 00043 daeTArray< daeCharArray * > _CMData; 00044 00045 00046 public: //Accessors and Mutators 00051 domGlsl_identifier getRef() const { return attrRef; } 00056 void setRef( domGlsl_identifier atRef ) { attrRef = atRef; } 00057 00062 xsNCName getProgram() const { return attrProgram; } 00067 void setProgram( xsNCName atProgram ) { *(daeStringRef*)&attrProgram = atProgram;} 00068 00073 domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; } 00078 const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; } 00083 const domGlsl_param_typeRef getGlsl_param_type() const { return elemGlsl_param_type; } 00088 const domGlsl_setarray_typeRef getArray() const { return elemArray; } 00093 daeElementRefArray &getContents() { return _contents; } 00098 const daeElementRefArray &getContents() const { return _contents; } 00099 00100 protected: 00104 domGlsl_setparam_complexType(DAE& dae, daeElement* elt) : attrRef(), attrProgram(), elemAnnotate_array(), elemGlsl_param_type(), elemArray() {} 00108 virtual ~domGlsl_setparam_complexType() { daeElement::deleteCMDataArray(_CMData); } 00112 virtual domGlsl_setparam_complexType &operator=( const domGlsl_setparam_complexType &cpy ) { (void)cpy; return *this; } 00113 }; 00114 00118 class domGlsl_setparam : public daeElement, public domGlsl_setparam_complexType 00119 { 00120 public: 00121 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GLSL_SETPARAM; } 00122 static daeInt ID() { return 112; } 00123 virtual daeInt typeID() const { return ID(); } 00124 00125 public: //Accessors and Mutators 00130 domGlsl_identifier getRef() const { return attrRef; } 00135 void setRef( domGlsl_identifier atRef ) { attrRef = atRef; _validAttributeArray[0] = true; } 00136 00141 xsNCName getProgram() const { return attrProgram; } 00146 void setProgram( xsNCName atProgram ) { *(daeStringRef*)&attrProgram = atProgram; _validAttributeArray[1] = true; } 00147 00148 protected: 00152 domGlsl_setparam(DAE& dae) : daeElement(dae), domGlsl_setparam_complexType(dae, this) {} 00156 virtual ~domGlsl_setparam() {} 00160 virtual domGlsl_setparam &operator=( const domGlsl_setparam &cpy ) { (void)cpy; return *this; } 00161 00162 public: // STATIC METHODS 00167 static DLLSPEC daeElementRef create(DAE& dae); 00173 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00174 }; 00175 00176 00177 #endif