• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright 2006 Sony Computer Entertainment Inc.
3 *
4 * Licensed under the MIT Open Source License, for details please see license.txt or the website
5 * http://www.opensource.org/licenses/mit-license.php
6 *
7 */
8 
9 #ifndef __domGlsl_newparam_h__
10 #define __domGlsl_newparam_h__
11 
12 #include <dae/daeDocument.h>
13 #include <dom/domTypes.h>
14 #include <dom/domElements.h>
15 
16 #include <dom/domGlsl_param_type.h>
17 #include <dom/domFx_annotate_common.h>
18 #include <dom/domGlsl_newarray_type.h>
19 class DAE;
20 
21 class domGlsl_newparam_complexType
22 {
23 public:
24 	class domSemantic;
25 
26 	typedef daeSmartRef<domSemantic> domSemanticRef;
27 	typedef daeTArray<domSemanticRef> domSemantic_Array;
28 
29 	class domSemantic : public daeElement
30 	{
31 	public:
getElementType()32 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SEMANTIC; }
ID()33 		static daeInt ID() { return 108; }
typeID()34 		virtual daeInt typeID() const { return ID(); }
35 
36 	protected:  // Value
37 		/**
38 		 * The xsNCName value of the text data of this element.
39 		 */
40 		xsNCName _value;
41 
42 	public:	//Accessors and Mutators
43 		/**
44 		 * Gets the value of this element.
45 		 * @return Returns a xsNCName of the value.
46 		 */
getValue()47 		xsNCName getValue() const { return _value; }
48 		/**
49 		 * Sets the _value of this element.
50 		 * @param val The new value for this element.
51 		 */
setValue(xsNCName val)52 		void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; }
53 
54 	protected:
55 		/**
56 		 * Constructor
57 		 */
domSemantic(DAE & dae)58 		domSemantic(DAE& dae) : daeElement(dae), _value() {}
59 		/**
60 		 * Destructor
61 		 */
~domSemantic()62 		virtual ~domSemantic() {}
63 		/**
64 		 * Overloaded assignment operator
65 		 */
66 		virtual domSemantic &operator=( const domSemantic &cpy ) { (void)cpy; return *this; }
67 
68 	public: // STATIC METHODS
69 		/**
70 		 * Creates an instance of this class and returns a daeElementRef referencing it.
71 		 * @return a daeElementRef referencing an instance of this object.
72 		 */
73 		static DLLSPEC daeElementRef create(DAE& dae);
74 		/**
75 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
76 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
77 		 * @return A daeMetaElement describing this COLLADA element.
78 		 */
79 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
80 	};
81 
82 	class domModifier;
83 
84 	typedef daeSmartRef<domModifier> domModifierRef;
85 	typedef daeTArray<domModifierRef> domModifier_Array;
86 
87 	class domModifier : public daeElement
88 	{
89 	public:
getElementType()90 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MODIFIER; }
ID()91 		static daeInt ID() { return 109; }
typeID()92 		virtual daeInt typeID() const { return ID(); }
93 
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 
100 	public:	//Accessors and Mutators
101 		/**
102 		 * Gets the value of this element.
103 		 * @return a domFx_modifier_enum_common of the value.
104 		 */
getValue()105 		domFx_modifier_enum_common getValue() const { return _value; }
106 		/**
107 		 * Sets the _value of this element.
108 		 * @param val The new value for this element.
109 		 */
setValue(domFx_modifier_enum_common val)110 		void setValue( domFx_modifier_enum_common val ) { _value = val; }
111 
112 	protected:
113 		/**
114 		 * Constructor
115 		 */
domModifier(DAE & dae)116 		domModifier(DAE& dae) : daeElement(dae), _value() {}
117 		/**
118 		 * Destructor
119 		 */
~domModifier()120 		virtual ~domModifier() {}
121 		/**
122 		 * Overloaded assignment operator
123 		 */
124 		virtual domModifier &operator=( const domModifier &cpy ) { (void)cpy; return *this; }
125 
126 	public: // STATIC METHODS
127 		/**
128 		 * Creates an instance of this class and returns a daeElementRef referencing it.
129 		 * @return a daeElementRef referencing an instance of this object.
130 		 */
131 		static DLLSPEC daeElementRef create(DAE& dae);
132 		/**
133 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
134 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
135 		 * @return A daeMetaElement describing this COLLADA element.
136 		 */
137 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
138 	};
139 
140 
141 protected:  // Attribute
142 	domGlsl_identifier attrSid;
143 
144 protected:  // Elements
145 	domFx_annotate_common_Array elemAnnotate_array;
146 	domSemanticRef elemSemantic;
147 	domModifierRef elemModifier;
148 	domGlsl_param_typeRef elemGlsl_param_type;
149 	domGlsl_newarray_typeRef elemArray;
150 	/**
151 	 * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
152 	 */
153 	daeElementRefArray _contents;
154 	/**
155 	 * Used to preserve order in elements that have a complex content model.
156 	 */
157 	daeUIntArray       _contentsOrder;
158 
159 	/**
160 	 * Used to store information needed for some content model objects.
161 	 */
162 	daeTArray< daeCharArray * > _CMData;
163 
164 
165 public:	//Accessors and Mutators
166 	/**
167 	 * Gets the sid attribute.
168 	 * @return Returns a domGlsl_identifier of the sid attribute.
169 	 */
getSid()170 	domGlsl_identifier getSid() const { return attrSid; }
171 	/**
172 	 * Sets the sid attribute.
173 	 * @param atSid The new value for the sid attribute.
174 	 */
setSid(domGlsl_identifier atSid)175 	void setSid( domGlsl_identifier atSid ) { attrSid = atSid; }
176 
177 	/**
178 	 * Gets the annotate element array.
179 	 * @return Returns a reference to the array of annotate elements.
180 	 */
getAnnotate_array()181 	domFx_annotate_common_Array &getAnnotate_array() { return elemAnnotate_array; }
182 	/**
183 	 * Gets the annotate element array.
184 	 * @return Returns a constant reference to the array of annotate elements.
185 	 */
getAnnotate_array()186 	const domFx_annotate_common_Array &getAnnotate_array() const { return elemAnnotate_array; }
187 	/**
188 	 * Gets the semantic element.
189 	 * @return a daeSmartRef to the semantic element.
190 	 */
getSemantic()191 	const domSemanticRef getSemantic() const { return elemSemantic; }
192 	/**
193 	 * Gets the modifier element.
194 	 * @return a daeSmartRef to the modifier element.
195 	 */
getModifier()196 	const domModifierRef getModifier() const { return elemModifier; }
197 	/**
198 	 * Gets the glsl_param_type element.
199 	 * @return a daeSmartRef to the glsl_param_type element.
200 	 */
getGlsl_param_type()201 	const domGlsl_param_typeRef getGlsl_param_type() const { return elemGlsl_param_type; }
202 	/**
203 	 * Gets the array element.
204 	 * @return a daeSmartRef to the array element.
205 	 */
getArray()206 	const domGlsl_newarray_typeRef getArray() const { return elemArray; }
207 	/**
208 	 * Gets the _contents array.
209 	 * @return Returns a reference to the _contents element array.
210 	 */
getContents()211 	daeElementRefArray &getContents() { return _contents; }
212 	/**
213 	 * Gets the _contents array.
214 	 * @return Returns a constant reference to the _contents element array.
215 	 */
getContents()216 	const daeElementRefArray &getContents() const { return _contents; }
217 
218 protected:
219 	/**
220 	 * Constructor
221 	 */
domGlsl_newparam_complexType(DAE & dae,daeElement * elt)222 	domGlsl_newparam_complexType(DAE& dae, daeElement* elt) : attrSid(), elemAnnotate_array(), elemSemantic(), elemModifier(), elemGlsl_param_type(), elemArray() {}
223 	/**
224 	 * Destructor
225 	 */
~domGlsl_newparam_complexType()226 	virtual ~domGlsl_newparam_complexType() { daeElement::deleteCMDataArray(_CMData); }
227 	/**
228 	 * Overloaded assignment operator
229 	 */
230 	virtual domGlsl_newparam_complexType &operator=( const domGlsl_newparam_complexType &cpy ) { (void)cpy; return *this; }
231 };
232 
233 /**
234  * An element of type domGlsl_newparam_complexType.
235  */
236 class domGlsl_newparam : public daeElement, public domGlsl_newparam_complexType
237 {
238 public:
getElementType()239 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GLSL_NEWPARAM; }
ID()240 	static daeInt ID() { return 110; }
typeID()241 	virtual daeInt typeID() const { return ID(); }
242 
243 public:	//Accessors and Mutators
244 	/**
245 	 * Gets the sid attribute.
246 	 * @return Returns a domGlsl_identifier of the sid attribute.
247 	 */
getSid()248 	domGlsl_identifier getSid() const { return attrSid; }
249 	/**
250 	 * Sets the sid attribute.
251 	 * @param atSid The new value for the sid attribute.
252 	 */
setSid(domGlsl_identifier atSid)253 	void setSid( domGlsl_identifier atSid ) { attrSid = atSid; _validAttributeArray[0] = true; }
254 
255 protected:
256 	/**
257 	 * Constructor
258 	 */
domGlsl_newparam(DAE & dae)259 	domGlsl_newparam(DAE& dae) : daeElement(dae), domGlsl_newparam_complexType(dae, this) {}
260 	/**
261 	 * Destructor
262 	 */
~domGlsl_newparam()263 	virtual ~domGlsl_newparam() {}
264 	/**
265 	 * Overloaded assignment operator
266 	 */
267 	virtual domGlsl_newparam &operator=( const domGlsl_newparam &cpy ) { (void)cpy; return *this; }
268 
269 public: // STATIC METHODS
270 	/**
271 	 * Creates an instance of this class and returns a daeElementRef referencing it.
272 	 * @return a daeElementRef referencing an instance of this object.
273 	 */
274 	static DLLSPEC daeElementRef create(DAE& dae);
275 	/**
276 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
277 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
278 	 * @return A daeMetaElement describing this COLLADA element.
279 	 */
280 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
281 };
282 
283 
284 #endif
285