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 __domAccessor_h__ 00010 #define __domAccessor_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domParam.h> 00017 class DAE; 00018 00025 class domAccessor : public daeElement 00026 { 00027 public: 00028 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ACCESSOR; } 00029 static daeInt ID() { return 609; } 00030 virtual daeInt typeID() const { return ID(); } 00031 protected: // Attributes 00036 domUint attrCount; 00041 domUint attrOffset; 00046 xsAnyURI attrSource; 00052 domUint attrStride; 00053 00054 protected: // Element 00058 domParam_Array elemParam_array; 00059 00060 public: //Accessors and Mutators 00065 domUint getCount() const { return attrCount; } 00070 void setCount( domUint atCount ) { attrCount = atCount; _validAttributeArray[0] = true; } 00071 00076 domUint getOffset() const { return attrOffset; } 00081 void setOffset( domUint atOffset ) { attrOffset = atOffset; _validAttributeArray[1] = true; } 00082 00087 xsAnyURI &getSource() { return attrSource; } 00092 const xsAnyURI &getSource() const { return attrSource; } 00097 void setSource( const xsAnyURI &atSource ) { attrSource = atSource; _validAttributeArray[2] = true; } 00102 void setSource( xsString atSource ) { attrSource = atSource; _validAttributeArray[2] = true; } 00103 00108 domUint getStride() const { return attrStride; } 00113 void setStride( domUint atStride ) { attrStride = atStride; _validAttributeArray[3] = true; } 00114 00119 domParam_Array &getParam_array() { return elemParam_array; } 00124 const domParam_Array &getParam_array() const { return elemParam_array; } 00125 protected: 00129 domAccessor(DAE& dae) : daeElement(dae), attrCount(), attrOffset(), attrSource(dae, *this), attrStride(), elemParam_array() {} 00133 virtual ~domAccessor() {} 00137 virtual domAccessor &operator=( const domAccessor &cpy ) { (void)cpy; return *this; } 00138 00139 public: // STATIC METHODS 00144 static DLLSPEC daeElementRef create(DAE& dae); 00150 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00151 }; 00152 00153 00154 #endif