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 __domIDREF_array_h__ 00010 #define __domIDREF_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 domIDREF_array : public daeElement 00023 { 00024 public: 00025 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::IDREF_ARRAY; } 00026 static daeInt ID() { return 604; } 00027 virtual daeInt typeID() const { return ID(); } 00028 protected: // Attributes 00034 xsID attrId; 00038 xsNCName attrName; 00043 domUint attrCount; 00044 00045 protected: // Value 00049 xsIDREFS _value; 00050 00051 public: //Accessors and Mutators 00056 xsID getId() const { return attrId; } 00061 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00062 if( _document != NULL ) _document->changeElementID( this, attrId ); 00063 } 00064 00069 xsNCName getName() const { return attrName; } 00074 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00075 00080 domUint getCount() const { return attrCount; } 00085 void setCount( domUint atCount ) { attrCount = atCount; _validAttributeArray[2] = true; } 00086 00091 xsIDREFS &getValue() { return _value; } 00096 const xsIDREFS &getValue() const { return _value; } 00101 void setValue( const xsIDREFS &val ) { _value = val; } 00102 00103 protected: 00107 domIDREF_array(DAE& dae) : daeElement(dae), attrId(), attrName(), attrCount(), _value(new xsIDREF(*this)) {} 00111 virtual ~domIDREF_array() {} 00115 virtual domIDREF_array &operator=( const domIDREF_array &cpy ) { (void)cpy; return *this; } 00116 00117 public: // STATIC METHODS 00122 static DLLSPEC daeElementRef create(DAE& dae); 00128 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00129 }; 00130 00131 00132 #endif