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 __domFloat_array_h__ 00010 #define __domFloat_array_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 class DAE; 00017 00022 class domFloat_array : public daeElement 00023 { 00024 public: 00025 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT_ARRAY; } 00026 static daeInt ID() { return 607; } 00027 virtual daeInt typeID() const { return ID(); } 00028 protected: // Attributes 00034 xsID attrId; 00038 xsNCName attrName; 00043 domUint attrCount; 00049 xsShort attrDigits; 00055 xsShort attrMagnitude; 00056 00057 protected: // Value 00061 domListOfFloats _value; 00062 00063 public: //Accessors and Mutators 00068 xsID getId() const { return attrId; } 00073 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00074 if( _document != NULL ) _document->changeElementID( this, attrId ); 00075 } 00076 00081 xsNCName getName() const { return attrName; } 00086 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00087 00092 domUint getCount() const { return attrCount; } 00097 void setCount( domUint atCount ) { attrCount = atCount; _validAttributeArray[2] = true; } 00098 00103 xsShort getDigits() const { return attrDigits; } 00108 void setDigits( xsShort atDigits ) { attrDigits = atDigits; _validAttributeArray[3] = true; } 00109 00114 xsShort getMagnitude() const { return attrMagnitude; } 00119 void setMagnitude( xsShort atMagnitude ) { attrMagnitude = atMagnitude; _validAttributeArray[4] = true; } 00120 00125 domListOfFloats &getValue() { return _value; } 00130 const domListOfFloats &getValue() const { return _value; } 00135 void setValue( const domListOfFloats &val ) { _value = val; } 00136 00137 protected: 00141 domFloat_array(DAE& dae) : daeElement(dae), attrId(), attrName(), attrCount(), attrDigits(), attrMagnitude(), _value() {} 00145 virtual ~domFloat_array() {} 00149 virtual domFloat_array &operator=( const domFloat_array &cpy ) { (void)cpy; return *this; } 00150 00151 public: // STATIC METHODS 00156 static DLLSPEC daeElementRef create(DAE& dae); 00162 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00163 }; 00164 00165 00166 #endif