2
0

domInstance_effect.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. /*
  2. * Copyright 2006 Sony Computer Entertainment Inc.
  3. *
  4. * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this
  5. * file except in compliance with the License. You may obtain a copy of the License at:
  6. * http://research.scea.com/scea_shared_source_license.html
  7. *
  8. * Unless required by applicable law or agreed to in writing, software distributed under the License
  9. * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  10. * implied. See the License for the specific language governing permissions and limitations under the
  11. * License.
  12. */
  13. #ifndef __domInstance_effect_h__
  14. #define __domInstance_effect_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. #include <dom/domExtra.h>
  19. #include <dom/domFx_basic_type_common.h>
  20. class DAE;
  21. /**
  22. * The instance_effect element declares the instantiation of a COLLADA effect
  23. * resource.
  24. */
  25. class domInstance_effect : public daeElement
  26. {
  27. public:
  28. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INSTANCE_EFFECT; }
  29. static daeInt ID() { return 691; }
  30. virtual daeInt typeID() const { return ID(); }
  31. public:
  32. class domTechnique_hint;
  33. typedef daeSmartRef<domTechnique_hint> domTechnique_hintRef;
  34. typedef daeTArray<domTechnique_hintRef> domTechnique_hint_Array;
  35. /**
  36. * Add a hint for a platform of which technique to use in this effect.
  37. */
  38. class domTechnique_hint : public daeElement
  39. {
  40. public:
  41. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_HINT; }
  42. static daeInt ID() { return 692; }
  43. virtual daeInt typeID() const { return ID(); }
  44. protected: // Attributes
  45. /**
  46. * A platform defines a string that specifies which platform this is hint
  47. * is aimed for.
  48. */
  49. xsNCName attrPlatform;
  50. /**
  51. * A profile defines a string that specifies which API profile this is hint
  52. * is aimed for.
  53. */
  54. xsNCName attrProfile;
  55. /**
  56. * A reference to the technique to use for the specified platform.
  57. */
  58. xsNCName attrRef;
  59. public: //Accessors and Mutators
  60. /**
  61. * Gets the platform attribute.
  62. * @return Returns a xsNCName of the platform attribute.
  63. */
  64. xsNCName getPlatform() const { return attrPlatform; }
  65. /**
  66. * Sets the platform attribute.
  67. * @param atPlatform The new value for the platform attribute.
  68. */
  69. void setPlatform( xsNCName atPlatform ) { *(daeStringRef*)&attrPlatform = atPlatform; _validAttributeArray[0] = true; }
  70. /**
  71. * Gets the profile attribute.
  72. * @return Returns a xsNCName of the profile attribute.
  73. */
  74. xsNCName getProfile() const { return attrProfile; }
  75. /**
  76. * Sets the profile attribute.
  77. * @param atProfile The new value for the profile attribute.
  78. */
  79. void setProfile( xsNCName atProfile ) { *(daeStringRef*)&attrProfile = atProfile; _validAttributeArray[1] = true; }
  80. /**
  81. * Gets the ref attribute.
  82. * @return Returns a xsNCName of the ref attribute.
  83. */
  84. xsNCName getRef() const { return attrRef; }
  85. /**
  86. * Sets the ref attribute.
  87. * @param atRef The new value for the ref attribute.
  88. */
  89. void setRef( xsNCName atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[2] = true; }
  90. protected:
  91. /**
  92. * Constructor
  93. */
  94. domTechnique_hint(DAE& dae) : daeElement(dae), attrPlatform(), attrProfile(), attrRef() {}
  95. /**
  96. * Destructor
  97. */
  98. virtual ~domTechnique_hint() {}
  99. /**
  100. * Overloaded assignment operator
  101. */
  102. virtual domTechnique_hint &operator=( const domTechnique_hint &cpy ) { (void)cpy; return *this; }
  103. public: // STATIC METHODS
  104. /**
  105. * Creates an instance of this class and returns a daeElementRef referencing it.
  106. * @return a daeElementRef referencing an instance of this object.
  107. */
  108. static DLLSPEC daeElementRef create(DAE& dae);
  109. /**
  110. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  111. * If a daeMetaElement already exists it will return that instead of creating a new one.
  112. * @return A daeMetaElement describing this COLLADA element.
  113. */
  114. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  115. };
  116. class domSetparam;
  117. typedef daeSmartRef<domSetparam> domSetparamRef;
  118. typedef daeTArray<domSetparamRef> domSetparam_Array;
  119. /**
  120. * Assigns a new value to a previously defined parameter
  121. */
  122. class domSetparam : public daeElement
  123. {
  124. public:
  125. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SETPARAM; }
  126. static daeInt ID() { return 693; }
  127. virtual daeInt typeID() const { return ID(); }
  128. protected: // Attribute
  129. xsToken attrRef;
  130. protected: // Element
  131. domFx_basic_type_commonRef elemFx_basic_type_common;
  132. public: //Accessors and Mutators
  133. /**
  134. * Gets the ref attribute.
  135. * @return Returns a xsToken of the ref attribute.
  136. */
  137. xsToken getRef() const { return attrRef; }
  138. /**
  139. * Sets the ref attribute.
  140. * @param atRef The new value for the ref attribute.
  141. */
  142. void setRef( xsToken atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[0] = true; }
  143. /**
  144. * Gets the fx_basic_type_common element.
  145. * @return a daeSmartRef to the fx_basic_type_common element.
  146. */
  147. const domFx_basic_type_commonRef getFx_basic_type_common() const { return elemFx_basic_type_common; }
  148. protected:
  149. /**
  150. * Constructor
  151. */
  152. domSetparam(DAE& dae) : daeElement(dae), attrRef(), elemFx_basic_type_common() {}
  153. /**
  154. * Destructor
  155. */
  156. virtual ~domSetparam() {}
  157. /**
  158. * Overloaded assignment operator
  159. */
  160. virtual domSetparam &operator=( const domSetparam &cpy ) { (void)cpy; return *this; }
  161. public: // STATIC METHODS
  162. /**
  163. * Creates an instance of this class and returns a daeElementRef referencing it.
  164. * @return a daeElementRef referencing an instance of this object.
  165. */
  166. static DLLSPEC daeElementRef create(DAE& dae);
  167. /**
  168. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  169. * If a daeMetaElement already exists it will return that instead of creating a new one.
  170. * @return A daeMetaElement describing this COLLADA element.
  171. */
  172. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  173. };
  174. protected: // Attributes
  175. /**
  176. * The url attribute refers to resource. This may refer to a local resource
  177. * using a relative URL fragment identifier that begins with the “#”
  178. * character. The url attribute may refer to an external resource using an
  179. * absolute or relative URL.
  180. */
  181. xsAnyURI attrUrl;
  182. /**
  183. * The sid attribute is a text string value containing the sub-identifier
  184. * of this element. This value must be unique within the scope of the parent
  185. * element. Optional attribute.
  186. */
  187. xsNCName attrSid;
  188. /**
  189. * The name attribute is the text string name of this element. Optional attribute.
  190. */
  191. xsNCName attrName;
  192. protected: // Elements
  193. /**
  194. * Add a hint for a platform of which technique to use in this effect. @see
  195. * domTechnique_hint
  196. */
  197. domTechnique_hint_Array elemTechnique_hint_array;
  198. /**
  199. * Assigns a new value to a previously defined parameter @see domSetparam
  200. */
  201. domSetparam_Array elemSetparam_array;
  202. /**
  203. * The extra element may appear any number of times. @see domExtra
  204. */
  205. domExtra_Array elemExtra_array;
  206. public: //Accessors and Mutators
  207. /**
  208. * Gets the url attribute.
  209. * @return Returns a xsAnyURI reference of the url attribute.
  210. */
  211. xsAnyURI &getUrl() { return attrUrl; }
  212. /**
  213. * Gets the url attribute.
  214. * @return Returns a constant xsAnyURI reference of the url attribute.
  215. */
  216. const xsAnyURI &getUrl() const { return attrUrl; }
  217. /**
  218. * Sets the url attribute.
  219. * @param atUrl The new value for the url attribute.
  220. */
  221. void setUrl( const xsAnyURI &atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; }
  222. /**
  223. * Sets the url attribute.
  224. * @param atUrl The new value for the url attribute.
  225. */
  226. void setUrl( xsString atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; }
  227. /**
  228. * Gets the sid attribute.
  229. * @return Returns a xsNCName of the sid attribute.
  230. */
  231. xsNCName getSid() const { return attrSid; }
  232. /**
  233. * Sets the sid attribute.
  234. * @param atSid The new value for the sid attribute.
  235. */
  236. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; }
  237. /**
  238. * Gets the name attribute.
  239. * @return Returns a xsNCName of the name attribute.
  240. */
  241. xsNCName getName() const { return attrName; }
  242. /**
  243. * Sets the name attribute.
  244. * @param atName The new value for the name attribute.
  245. */
  246. void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[2] = true; }
  247. /**
  248. * Gets the technique_hint element array.
  249. * @return Returns a reference to the array of technique_hint elements.
  250. */
  251. domTechnique_hint_Array &getTechnique_hint_array() { return elemTechnique_hint_array; }
  252. /**
  253. * Gets the technique_hint element array.
  254. * @return Returns a constant reference to the array of technique_hint elements.
  255. */
  256. const domTechnique_hint_Array &getTechnique_hint_array() const { return elemTechnique_hint_array; }
  257. /**
  258. * Gets the setparam element array.
  259. * @return Returns a reference to the array of setparam elements.
  260. */
  261. domSetparam_Array &getSetparam_array() { return elemSetparam_array; }
  262. /**
  263. * Gets the setparam element array.
  264. * @return Returns a constant reference to the array of setparam elements.
  265. */
  266. const domSetparam_Array &getSetparam_array() const { return elemSetparam_array; }
  267. /**
  268. * Gets the extra element array.
  269. * @return Returns a reference to the array of extra elements.
  270. */
  271. domExtra_Array &getExtra_array() { return elemExtra_array; }
  272. /**
  273. * Gets the extra element array.
  274. * @return Returns a constant reference to the array of extra elements.
  275. */
  276. const domExtra_Array &getExtra_array() const { return elemExtra_array; }
  277. protected:
  278. /**
  279. * Constructor
  280. */
  281. domInstance_effect(DAE& dae) : daeElement(dae), attrUrl(dae, *this), attrSid(), attrName(), elemTechnique_hint_array(), elemSetparam_array(), elemExtra_array() {}
  282. /**
  283. * Destructor
  284. */
  285. virtual ~domInstance_effect() {}
  286. /**
  287. * Overloaded assignment operator
  288. */
  289. virtual domInstance_effect &operator=( const domInstance_effect &cpy ) { (void)cpy; return *this; }
  290. public: // STATIC METHODS
  291. /**
  292. * Creates an instance of this class and returns a daeElementRef referencing it.
  293. * @return a daeElementRef referencing an instance of this object.
  294. */
  295. static DLLSPEC daeElementRef create(DAE& dae);
  296. /**
  297. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  298. * If a daeMetaElement already exists it will return that instead of creating a new one.
  299. * @return A daeMetaElement describing this COLLADA element.
  300. */
  301. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  302. };
  303. #endif