domGles_newparam.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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 __domGles_newparam_h__
  14. #define __domGles_newparam_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. #include <dom/domGles_basic_type_common.h>
  19. #include <dom/domFx_annotate_common.h>
  20. class DAE;
  21. /**
  22. * Create a new, named param object in the GLES Runtime, assign it a type,
  23. * an initial value, and additional attributes at declaration time.
  24. */
  25. class domGles_newparam_complexType
  26. {
  27. public:
  28. class domSemantic;
  29. typedef daeSmartRef<domSemantic> domSemanticRef;
  30. typedef daeTArray<domSemanticRef> domSemantic_Array;
  31. /**
  32. * The semantic element allows you to specify a semantic for this new param.
  33. */
  34. class domSemantic : public daeElement
  35. {
  36. public:
  37. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SEMANTIC; }
  38. static daeInt ID() { return 165; }
  39. virtual daeInt typeID() const { return ID(); }
  40. protected: // Value
  41. /**
  42. * The xsNCName value of the text data of this element.
  43. */
  44. xsNCName _value;
  45. public: //Accessors and Mutators
  46. /**
  47. * Gets the value of this element.
  48. * @return Returns a xsNCName of the value.
  49. */
  50. xsNCName getValue() const { return _value; }
  51. /**
  52. * Sets the _value of this element.
  53. * @param val The new value for this element.
  54. */
  55. void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; }
  56. protected:
  57. /**
  58. * Constructor
  59. */
  60. domSemantic(DAE& dae) : daeElement(dae), _value() {}
  61. /**
  62. * Destructor
  63. */
  64. virtual ~domSemantic() {}
  65. /**
  66. * Overloaded assignment operator
  67. */
  68. virtual domSemantic &operator=( const domSemantic &cpy ) { (void)cpy; return *this; }
  69. public: // STATIC METHODS
  70. /**
  71. * Creates an instance of this class and returns a daeElementRef referencing it.
  72. * @return a daeElementRef referencing an instance of this object.
  73. */
  74. static DLLSPEC daeElementRef create(DAE& dae);
  75. /**
  76. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  77. * If a daeMetaElement already exists it will return that instead of creating a new one.
  78. * @return A daeMetaElement describing this COLLADA element.
  79. */
  80. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  81. };
  82. class domModifier;
  83. typedef daeSmartRef<domModifier> domModifierRef;
  84. typedef daeTArray<domModifierRef> domModifier_Array;
  85. /**
  86. * The modifier element allows you to specify a modifier for this new param.
  87. */
  88. class domModifier : public daeElement
  89. {
  90. public:
  91. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MODIFIER; }
  92. static daeInt ID() { return 166; }
  93. virtual daeInt typeID() const { return ID(); }
  94. protected: // Value
  95. /**
  96. * The domFx_modifier_enum_common value of the text data of this element.
  97. */
  98. domFx_modifier_enum_common _value;
  99. public: //Accessors and Mutators
  100. /**
  101. * Gets the value of this element.
  102. * @return a domFx_modifier_enum_common of the value.
  103. */
  104. domFx_modifier_enum_common getValue() const { return _value; }
  105. /**
  106. * Sets the _value of this element.
  107. * @param val The new value for this element.
  108. */
  109. void setValue( domFx_modifier_enum_common val ) { _value = val; }
  110. protected:
  111. /**
  112. * Constructor
  113. */
  114. domModifier(DAE& dae) : daeElement(dae), _value() {}
  115. /**
  116. * Destructor
  117. */
  118. virtual ~domModifier() {}
  119. /**
  120. * Overloaded assignment operator
  121. */
  122. virtual domModifier &operator=( const domModifier &cpy ) { (void)cpy; return *this; }
  123. public: // STATIC METHODS
  124. /**
  125. * Creates an instance of this class and returns a daeElementRef referencing it.
  126. * @return a daeElementRef referencing an instance of this object.
  127. */
  128. static DLLSPEC daeElementRef create(DAE& dae);
  129. /**
  130. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  131. * If a daeMetaElement already exists it will return that instead of creating a new one.
  132. * @return A daeMetaElement describing this COLLADA element.
  133. */
  134. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  135. };
  136. protected: // Attribute
  137. /**
  138. * The sid attribute is a text string value containing the sub-identifier
  139. * of this element. This value must be unique within the scope of the parent
  140. * element.
  141. */
  142. xsNCName attrSid;
  143. protected: // Elements
  144. /**
  145. * The annotate element allows you to specify an annotation for this new param.
  146. * @see domAnnotate
  147. */
  148. domFx_annotate_common_Array elemAnnotate_array;
  149. /**
  150. * The semantic element allows you to specify a semantic for this new param.
  151. * @see domSemantic
  152. */
  153. domSemanticRef elemSemantic;
  154. /**
  155. * The modifier element allows you to specify a modifier for this new param.
  156. * @see domModifier
  157. */
  158. domModifierRef elemModifier;
  159. domGles_basic_type_commonRef elemGles_basic_type_common;
  160. public: //Accessors and Mutators
  161. /**
  162. * Gets the sid attribute.
  163. * @return Returns a xsNCName of the sid attribute.
  164. */
  165. xsNCName getSid() const { return attrSid; }
  166. /**
  167. * Sets the sid attribute.
  168. * @param atSid The new value for the sid attribute.
  169. */
  170. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid;}
  171. /**
  172. * Gets the annotate element array.
  173. * @return Returns a reference to the array of annotate elements.
  174. */
  175. domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; }
  176. /**
  177. * Gets the annotate element array.
  178. * @return Returns a constant reference to the array of annotate elements.
  179. */
  180. const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; }
  181. /**
  182. * Gets the semantic element.
  183. * @return a daeSmartRef to the semantic element.
  184. */
  185. const domSemanticRef getSemantic() const { return elemSemantic; }
  186. /**
  187. * Gets the modifier element.
  188. * @return a daeSmartRef to the modifier element.
  189. */
  190. const domModifierRef getModifier() const { return elemModifier; }
  191. /**
  192. * Gets the gles_basic_type_common element.
  193. * @return a daeSmartRef to the gles_basic_type_common element.
  194. */
  195. const domGles_basic_type_commonRef getGles_basic_type_common() const { return elemGles_basic_type_common; }
  196. protected:
  197. /**
  198. * Constructor
  199. */
  200. domGles_newparam_complexType(DAE& dae, daeElement* elt) : attrSid(), elemAnnotate_array(), elemSemantic(), elemModifier(), elemGles_basic_type_common() {}
  201. /**
  202. * Destructor
  203. */
  204. virtual ~domGles_newparam_complexType() {}
  205. /**
  206. * Overloaded assignment operator
  207. */
  208. virtual domGles_newparam_complexType &operator=( const domGles_newparam_complexType &cpy ) { (void)cpy; return *this; }
  209. };
  210. /**
  211. * An element of type domGles_newparam_complexType.
  212. */
  213. class domGles_newparam : public daeElement, public domGles_newparam_complexType
  214. {
  215. public:
  216. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GLES_NEWPARAM; }
  217. static daeInt ID() { return 167; }
  218. virtual daeInt typeID() const { return ID(); }
  219. public: //Accessors and Mutators
  220. /**
  221. * Gets the sid attribute.
  222. * @return Returns a xsNCName of the sid attribute.
  223. */
  224. xsNCName getSid() const { return attrSid; }
  225. /**
  226. * Sets the sid attribute.
  227. * @param atSid The new value for the sid attribute.
  228. */
  229. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
  230. protected:
  231. /**
  232. * Constructor
  233. */
  234. domGles_newparam(DAE& dae) : daeElement(dae), domGles_newparam_complexType(dae, this) {}
  235. /**
  236. * Destructor
  237. */
  238. virtual ~domGles_newparam() {}
  239. /**
  240. * Overloaded assignment operator
  241. */
  242. virtual domGles_newparam &operator=( const domGles_newparam &cpy ) { (void)cpy; return *this; }
  243. public: // STATIC METHODS
  244. /**
  245. * Creates an instance of this class and returns a daeElementRef referencing it.
  246. * @return a daeElementRef referencing an instance of this object.
  247. */
  248. static DLLSPEC daeElementRef create(DAE& dae);
  249. /**
  250. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  251. * If a daeMetaElement already exists it will return that instead of creating a new one.
  252. * @return A daeMetaElement describing this COLLADA element.
  253. */
  254. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  255. };
  256. #endif