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 __domInstance_controller_h__ 00010 #define __domInstance_controller_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domBind_material.h> 00017 #include <dom/domExtra.h> 00018 class DAE; 00019 00024 class domInstance_controller : public daeElement 00025 { 00026 public: 00027 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INSTANCE_CONTROLLER; } 00028 static daeInt ID() { return 689; } 00029 virtual daeInt typeID() const { return ID(); } 00030 public: 00031 class domSkeleton; 00032 00033 typedef daeSmartRef<domSkeleton> domSkeletonRef; 00034 typedef daeTArray<domSkeletonRef> domSkeleton_Array; 00035 00041 class domSkeleton : public daeElement 00042 { 00043 public: 00044 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SKELETON; } 00045 static daeInt ID() { return 690; } 00046 virtual daeInt typeID() const { return ID(); } 00047 00048 protected: // Value 00052 xsAnyURI _value; 00053 00054 public: //Accessors and Mutators 00059 xsAnyURI &getValue() { return _value; } 00064 const xsAnyURI &getValue() const { return _value; } 00069 void setValue( const xsAnyURI &val ) { _value = val; } 00074 void setValue( xsString val ) { _value = val; } 00075 00076 protected: 00080 domSkeleton(DAE& dae) : daeElement(dae), _value(dae, *this) {} 00084 virtual ~domSkeleton() {} 00088 virtual domSkeleton &operator=( const domSkeleton &cpy ) { (void)cpy; return *this; } 00089 00090 public: // STATIC METHODS 00095 static DLLSPEC daeElementRef create(DAE& dae); 00101 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00102 }; 00103 00104 00105 protected: // Attributes 00112 xsAnyURI attrUrl; 00118 xsNCName attrSid; 00122 xsNCName attrName; 00123 00124 protected: // Elements 00130 domSkeleton_Array elemSkeleton_array; 00135 domBind_materialRef elemBind_material; 00139 domExtra_Array elemExtra_array; 00140 00141 public: //Accessors and Mutators 00146 xsAnyURI &getUrl() { return attrUrl; } 00151 const xsAnyURI &getUrl() const { return attrUrl; } 00156 void setUrl( const xsAnyURI &atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; } 00161 void setUrl( xsString atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; } 00162 00167 xsNCName getSid() const { return attrSid; } 00172 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; } 00173 00178 xsNCName getName() const { return attrName; } 00183 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[2] = true; } 00184 00189 domSkeleton_Array &getSkeleton_array() { return elemSkeleton_array; } 00194 const domSkeleton_Array &getSkeleton_array() const { return elemSkeleton_array; } 00199 const domBind_materialRef getBind_material() const { return elemBind_material; } 00204 domExtra_Array &getExtra_array() { return elemExtra_array; } 00209 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00210 protected: 00214 domInstance_controller(DAE& dae) : daeElement(dae), attrUrl(dae, *this), attrSid(), attrName(), elemSkeleton_array(), elemBind_material(), elemExtra_array() {} 00218 virtual ~domInstance_controller() {} 00222 virtual domInstance_controller &operator=( const domInstance_controller &cpy ) { (void)cpy; return *this; } 00223 00224 public: // STATIC METHODS 00229 static DLLSPEC daeElementRef create(DAE& dae); 00235 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00236 }; 00237 00238 00239 #endif