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_setparam_h__ 00010 #define __domCg_setparam_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/domCg_setuser_type.h> 00018 #include <dom/domCg_setarray_type.h> 00019 #include <dom/domCg_connect_param.h> 00020 class DAE; 00021 00025 class domCg_setparam_complexType 00026 { 00027 protected: // Attributes 00028 domCg_identifier attrRef; 00029 xsNCName attrProgram; 00030 00031 protected: // Elements 00032 domCg_param_typeRef elemCg_param_type; 00033 domCg_setuser_typeRef elemUsertype; 00034 domCg_setarray_typeRef elemArray; 00035 domCg_connect_paramRef elemConnect_param; 00039 daeElementRefArray _contents; 00043 daeUIntArray _contentsOrder; 00044 00048 daeTArray< daeCharArray * > _CMData; 00049 00050 00051 public: //Accessors and Mutators 00056 domCg_identifier getRef() const { return attrRef; } 00061 void setRef( domCg_identifier atRef ) { attrRef = atRef; } 00062 00067 xsNCName getProgram() const { return attrProgram; } 00072 void setProgram( xsNCName atProgram ) { *(daeStringRef*)&attrProgram = atProgram;} 00073 00078 const domCg_param_typeRef getCg_param_type() const { return elemCg_param_type; } 00083 const domCg_setuser_typeRef getUsertype() const { return elemUsertype; } 00088 const domCg_setarray_typeRef getArray() const { return elemArray; } 00093 const domCg_connect_paramRef getConnect_param() const { return elemConnect_param; } 00098 daeElementRefArray &getContents() { return _contents; } 00103 const daeElementRefArray &getContents() const { return _contents; } 00104 00105 protected: 00109 domCg_setparam_complexType(DAE& dae, daeElement* elt) : attrRef(), attrProgram(), elemCg_param_type(), elemUsertype(), elemArray(), elemConnect_param() {} 00113 virtual ~domCg_setparam_complexType() { daeElement::deleteCMDataArray(_CMData); } 00117 virtual domCg_setparam_complexType &operator=( const domCg_setparam_complexType &cpy ) { (void)cpy; return *this; } 00118 }; 00119 00123 class domCg_setparam : public daeElement, public domCg_setparam_complexType 00124 { 00125 public: 00126 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CG_SETPARAM; } 00127 static daeInt ID() { return 144; } 00128 virtual daeInt typeID() const { return ID(); } 00129 00130 public: //Accessors and Mutators 00135 domCg_identifier getRef() const { return attrRef; } 00140 void setRef( domCg_identifier atRef ) { attrRef = atRef; _validAttributeArray[0] = true; } 00141 00146 xsNCName getProgram() const { return attrProgram; } 00151 void setProgram( xsNCName atProgram ) { *(daeStringRef*)&attrProgram = atProgram; _validAttributeArray[1] = true; } 00152 00153 protected: 00157 domCg_setparam(DAE& dae) : daeElement(dae), domCg_setparam_complexType(dae, this) {} 00161 virtual ~domCg_setparam() {} 00165 virtual domCg_setparam &operator=( const domCg_setparam &cpy ) { (void)cpy; return *this; } 00166 00167 public: // STATIC METHODS 00172 static DLLSPEC daeElementRef create(DAE& dae); 00178 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00179 }; 00180 00181 00182 #endif