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_newarray_type_h__ 00010 #define __domGlsl_newarray_type_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/domGlsl_newarray_type.h> 00018 class DAE; 00019 00024 class domGlsl_newarray_type_complexType 00025 { 00026 protected: // Attribute 00030 xsPositiveInteger attrLength; 00031 00032 protected: // Elements 00033 domGlsl_param_type_Array elemGlsl_param_type_array; 00038 domGlsl_newarray_type_Array elemArray_array; 00042 daeElementRefArray _contents; 00046 daeUIntArray _contentsOrder; 00047 00051 daeTArray< daeCharArray * > _CMData; 00052 00053 00054 public: //Accessors and Mutators 00059 xsPositiveInteger getLength() const { return attrLength; } 00064 void setLength( xsPositiveInteger atLength ) { attrLength = atLength; } 00065 00070 domGlsl_param_type_Array &getGlsl_param_type_array() { return elemGlsl_param_type_array; } 00075 const domGlsl_param_type_Array &getGlsl_param_type_array() const { return elemGlsl_param_type_array; } 00080 domGlsl_newarray_type_Array &getArray_array() { return elemArray_array; } 00085 const domGlsl_newarray_type_Array &getArray_array() const { return elemArray_array; } 00090 daeElementRefArray &getContents() { return _contents; } 00095 const daeElementRefArray &getContents() const { return _contents; } 00096 00097 protected: 00101 domGlsl_newarray_type_complexType(DAE& dae, daeElement* elt) : attrLength(), elemGlsl_param_type_array(), elemArray_array() {} 00105 virtual ~domGlsl_newarray_type_complexType() { daeElement::deleteCMDataArray(_CMData); } 00109 virtual domGlsl_newarray_type_complexType &operator=( const domGlsl_newarray_type_complexType &cpy ) { (void)cpy; return *this; } 00110 }; 00111 00115 class domGlsl_newarray_type : public daeElement, public domGlsl_newarray_type_complexType 00116 { 00117 public: 00118 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GLSL_NEWARRAY_TYPE; } 00119 static daeInt ID() { return 103; } 00120 virtual daeInt typeID() const { return ID(); } 00121 00122 public: //Accessors and Mutators 00127 xsPositiveInteger getLength() const { return attrLength; } 00132 void setLength( xsPositiveInteger atLength ) { attrLength = atLength; _validAttributeArray[0] = true; } 00133 00134 protected: 00138 domGlsl_newarray_type(DAE& dae) : daeElement(dae), domGlsl_newarray_type_complexType(dae, this) {} 00142 virtual ~domGlsl_newarray_type() {} 00146 virtual domGlsl_newarray_type &operator=( const domGlsl_newarray_type &cpy ) { (void)cpy; return *this; } 00147 00148 public: // STATIC METHODS 00153 static DLLSPEC daeElementRef create(DAE& dae); 00159 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00160 }; 00161 00162 00163 #endif