Home | History | Annotate | Download | only in dom
      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 __domCommon_newparam_type_h__
     10 #define __domCommon_newparam_type_h__
     11 
     12 #include <dae/daeDocument.h>
     13 #include <dom/domTypes.h>
     14 #include <dom/domElements.h>
     15 
     16 #include <dom/domFx_surface_common.h>
     17 #include <dom/domFx_sampler2D_common.h>
     18 class DAE;
     19 
     20 class domCommon_newparam_type_complexType
     21 {
     22 public:
     23 	class domSemantic;
     24 
     25 	typedef daeSmartRef<domSemantic> domSemanticRef;
     26 	typedef daeTArray<domSemanticRef> domSemantic_Array;
     27 
     28 	class domSemantic : public daeElement
     29 	{
     30 	public:
     31 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SEMANTIC; }
     32 		static daeInt ID() { return 121; }
     33 		virtual daeInt typeID() const { return ID(); }
     34 
     35 	protected:  // Value
     36 		/**
     37 		 * The xsNCName value of the text data of this element.
     38 		 */
     39 		xsNCName _value;
     40 
     41 	public:	//Accessors and Mutators
     42 		/**
     43 		 * Gets the value of this element.
     44 		 * @return Returns a xsNCName of the value.
     45 		 */
     46 		xsNCName getValue() const { return _value; }
     47 		/**
     48 		 * Sets the _value of this element.
     49 		 * @param val The new value for this element.
     50 		 */
     51 		void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; }
     52 
     53 	protected:
     54 		/**
     55 		 * Constructor
     56 		 */
     57 		domSemantic(DAE& dae) : daeElement(dae), _value() {}
     58 		/**
     59 		 * Destructor
     60 		 */
     61 		virtual ~domSemantic() {}
     62 		/**
     63 		 * Overloaded assignment operator
     64 		 */
     65 		virtual domSemantic &operator=( const domSemantic &cpy ) { (void)cpy; return *this; }
     66 
     67 	public: // STATIC METHODS
     68 		/**
     69 		 * Creates an instance of this class and returns a daeElementRef referencing it.
     70 		 * @return a daeElementRef referencing an instance of this object.
     71 		 */
     72 		static DLLSPEC daeElementRef create(DAE& dae);
     73 		/**
     74 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
     75 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
     76 		 * @return A daeMetaElement describing this COLLADA element.
     77 		 */
     78 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
     79 	};
     80 
     81 	class domFloat;
     82 
     83 	typedef daeSmartRef<domFloat> domFloatRef;
     84 	typedef daeTArray<domFloatRef> domFloat_Array;
     85 
     86 	class domFloat : public daeElement
     87 	{
     88 	public:
     89 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT; }
     90 		static daeInt ID() { return 122; }
     91 		virtual daeInt typeID() const { return ID(); }
     92 
     93 	protected:  // Value
     94 		/**
     95 		 * The ::domFloat value of the text data of this element.
     96 		 */
     97 		::domFloat _value;
     98 
     99 	public:	//Accessors and Mutators
    100 		/**
    101 		 * Gets the value of this element.
    102 		 * @return a ::domFloat of the value.
    103 		 */
    104 		::domFloat 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( ::domFloat val ) { _value = val; }
    110 
    111 	protected:
    112 		/**
    113 		 * Constructor
    114 		 */
    115 		domFloat(DAE& dae) : daeElement(dae), _value() {}
    116 		/**
    117 		 * Destructor
    118 		 */
    119 		virtual ~domFloat() {}
    120 		/**
    121 		 * Overloaded assignment operator
    122 		 */
    123 		virtual domFloat &operator=( const domFloat &cpy ) { (void)cpy; return *this; }
    124 
    125 	public: // STATIC METHODS
    126 		/**
    127 		 * Creates an instance of this class and returns a daeElementRef referencing it.
    128 		 * @return a daeElementRef referencing an instance of this object.
    129 		 */
    130 		static DLLSPEC daeElementRef create(DAE& dae);
    131 		/**
    132 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    133 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
    134 		 * @return A daeMetaElement describing this COLLADA element.
    135 		 */
    136 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    137 	};
    138 
    139 	class domFloat2;
    140 
    141 	typedef daeSmartRef<domFloat2> domFloat2Ref;
    142 	typedef daeTArray<domFloat2Ref> domFloat2_Array;
    143 
    144 	class domFloat2 : public daeElement
    145 	{
    146 	public:
    147 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT2; }
    148 		static daeInt ID() { return 123; }
    149 		virtual daeInt typeID() const { return ID(); }
    150 
    151 	protected:  // Value
    152 		/**
    153 		 * The ::domFloat2 value of the text data of this element.
    154 		 */
    155 		::domFloat2 _value;
    156 
    157 	public:	//Accessors and Mutators
    158 		/**
    159 		 * Gets the _value array.
    160 		 * @return Returns a ::domFloat2 reference of the _value array.
    161 		 */
    162 		::domFloat2 &getValue() { return _value; }
    163 		/**
    164 		 * Gets the _value array.
    165 		 * @return Returns a constant ::domFloat2 reference of the _value array.
    166 		 */
    167 		const ::domFloat2 &getValue() const { return _value; }
    168 		/**
    169 		 * Sets the _value array.
    170 		 * @param val The new value for the _value array.
    171 		 */
    172 		void setValue( const ::domFloat2 &val ) { _value = val; }
    173 
    174 	protected:
    175 		/**
    176 		 * Constructor
    177 		 */
    178 		domFloat2(DAE& dae) : daeElement(dae), _value() {}
    179 		/**
    180 		 * Destructor
    181 		 */
    182 		virtual ~domFloat2() {}
    183 		/**
    184 		 * Overloaded assignment operator
    185 		 */
    186 		virtual domFloat2 &operator=( const domFloat2 &cpy ) { (void)cpy; return *this; }
    187 
    188 	public: // STATIC METHODS
    189 		/**
    190 		 * Creates an instance of this class and returns a daeElementRef referencing it.
    191 		 * @return a daeElementRef referencing an instance of this object.
    192 		 */
    193 		static DLLSPEC daeElementRef create(DAE& dae);
    194 		/**
    195 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    196 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
    197 		 * @return A daeMetaElement describing this COLLADA element.
    198 		 */
    199 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    200 	};
    201 
    202 	class domFloat3;
    203 
    204 	typedef daeSmartRef<domFloat3> domFloat3Ref;
    205 	typedef daeTArray<domFloat3Ref> domFloat3_Array;
    206 
    207 	class domFloat3 : public daeElement
    208 	{
    209 	public:
    210 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT3; }
    211 		static daeInt ID() { return 124; }
    212 		virtual daeInt typeID() const { return ID(); }
    213 
    214 	protected:  // Value
    215 		/**
    216 		 * The ::domFloat3 value of the text data of this element.
    217 		 */
    218 		::domFloat3 _value;
    219 
    220 	public:	//Accessors and Mutators
    221 		/**
    222 		 * Gets the _value array.
    223 		 * @return Returns a ::domFloat3 reference of the _value array.
    224 		 */
    225 		::domFloat3 &getValue() { return _value; }
    226 		/**
    227 		 * Gets the _value array.
    228 		 * @return Returns a constant ::domFloat3 reference of the _value array.
    229 		 */
    230 		const ::domFloat3 &getValue() const { return _value; }
    231 		/**
    232 		 * Sets the _value array.
    233 		 * @param val The new value for the _value array.
    234 		 */
    235 		void setValue( const ::domFloat3 &val ) { _value = val; }
    236 
    237 	protected:
    238 		/**
    239 		 * Constructor
    240 		 */
    241 		domFloat3(DAE& dae) : daeElement(dae), _value() {}
    242 		/**
    243 		 * Destructor
    244 		 */
    245 		virtual ~domFloat3() {}
    246 		/**
    247 		 * Overloaded assignment operator
    248 		 */
    249 		virtual domFloat3 &operator=( const domFloat3 &cpy ) { (void)cpy; return *this; }
    250 
    251 	public: // STATIC METHODS
    252 		/**
    253 		 * Creates an instance of this class and returns a daeElementRef referencing it.
    254 		 * @return a daeElementRef referencing an instance of this object.
    255 		 */
    256 		static DLLSPEC daeElementRef create(DAE& dae);
    257 		/**
    258 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    259 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
    260 		 * @return A daeMetaElement describing this COLLADA element.
    261 		 */
    262 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    263 	};
    264 
    265 	class domFloat4;
    266 
    267 	typedef daeSmartRef<domFloat4> domFloat4Ref;
    268 	typedef daeTArray<domFloat4Ref> domFloat4_Array;
    269 
    270 	class domFloat4 : public daeElement
    271 	{
    272 	public:
    273 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FLOAT4; }
    274 		static daeInt ID() { return 125; }
    275 		virtual daeInt typeID() const { return ID(); }
    276 
    277 	protected:  // Value
    278 		/**
    279 		 * The ::domFloat4 value of the text data of this element.
    280 		 */
    281 		::domFloat4 _value;
    282 
    283 	public:	//Accessors and Mutators
    284 		/**
    285 		 * Gets the _value array.
    286 		 * @return Returns a ::domFloat4 reference of the _value array.
    287 		 */
    288 		::domFloat4 &getValue() { return _value; }
    289 		/**
    290 		 * Gets the _value array.
    291 		 * @return Returns a constant ::domFloat4 reference of the _value array.
    292 		 */
    293 		const ::domFloat4 &getValue() const { return _value; }
    294 		/**
    295 		 * Sets the _value array.
    296 		 * @param val The new value for the _value array.
    297 		 */
    298 		void setValue( const ::domFloat4 &val ) { _value = val; }
    299 
    300 	protected:
    301 		/**
    302 		 * Constructor
    303 		 */
    304 		domFloat4(DAE& dae) : daeElement(dae), _value() {}
    305 		/**
    306 		 * Destructor
    307 		 */
    308 		virtual ~domFloat4() {}
    309 		/**
    310 		 * Overloaded assignment operator
    311 		 */
    312 		virtual domFloat4 &operator=( const domFloat4 &cpy ) { (void)cpy; return *this; }
    313 
    314 	public: // STATIC METHODS
    315 		/**
    316 		 * Creates an instance of this class and returns a daeElementRef referencing it.
    317 		 * @return a daeElementRef referencing an instance of this object.
    318 		 */
    319 		static DLLSPEC daeElementRef create(DAE& dae);
    320 		/**
    321 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    322 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
    323 		 * @return A daeMetaElement describing this COLLADA element.
    324 		 */
    325 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    326 	};
    327 
    328 
    329 protected:  // Attribute
    330 /**
    331  *  The sid attribute is a text string value containing the sub-identifier
    332  * of this element.  This value must be unique within the scope of the parent
    333  * element. Optional attribute.
    334  */
    335 	xsNCName attrSid;
    336 
    337 protected:  // Elements
    338 	domSemanticRef elemSemantic;
    339 	domFloatRef elemFloat;
    340 	domFloat2Ref elemFloat2;
    341 	domFloat3Ref elemFloat3;
    342 	domFloat4Ref elemFloat4;
    343 	domFx_surface_commonRef elemSurface;
    344 	domFx_sampler2D_commonRef elemSampler2D;
    345 	/**
    346 	 * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
    347 	 */
    348 	daeElementRefArray _contents;
    349 	/**
    350 	 * Used to preserve order in elements that have a complex content model.
    351 	 */
    352 	daeUIntArray       _contentsOrder;
    353 
    354 	/**
    355 	 * Used to store information needed for some content model objects.
    356 	 */
    357 	daeTArray< daeCharArray * > _CMData;
    358 
    359 
    360 public:	//Accessors and Mutators
    361 	/**
    362 	 * Gets the sid attribute.
    363 	 * @return Returns a xsNCName of the sid attribute.
    364 	 */
    365 	xsNCName getSid() const { return attrSid; }
    366 	/**
    367 	 * Sets the sid attribute.
    368 	 * @param atSid The new value for the sid attribute.
    369 	 */
    370 	void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid;}
    371 
    372 	/**
    373 	 * Gets the semantic element.
    374 	 * @return a daeSmartRef to the semantic element.
    375 	 */
    376 	const domSemanticRef getSemantic() const { return elemSemantic; }
    377 	/**
    378 	 * Gets the float element.
    379 	 * @return a daeSmartRef to the float element.
    380 	 */
    381 	const domFloatRef getFloat() const { return elemFloat; }
    382 	/**
    383 	 * Gets the float2 element.
    384 	 * @return a daeSmartRef to the float2 element.
    385 	 */
    386 	const domFloat2Ref getFloat2() const { return elemFloat2; }
    387 	/**
    388 	 * Gets the float3 element.
    389 	 * @return a daeSmartRef to the float3 element.
    390 	 */
    391 	const domFloat3Ref getFloat3() const { return elemFloat3; }
    392 	/**
    393 	 * Gets the float4 element.
    394 	 * @return a daeSmartRef to the float4 element.
    395 	 */
    396 	const domFloat4Ref getFloat4() const { return elemFloat4; }
    397 	/**
    398 	 * Gets the surface element.
    399 	 * @return a daeSmartRef to the surface element.
    400 	 */
    401 	const domFx_surface_commonRef getSurface() const { return elemSurface; }
    402 	/**
    403 	 * Gets the sampler2D element.
    404 	 * @return a daeSmartRef to the sampler2D element.
    405 	 */
    406 	const domFx_sampler2D_commonRef getSampler2D() const { return elemSampler2D; }
    407 	/**
    408 	 * Gets the _contents array.
    409 	 * @return Returns a reference to the _contents element array.
    410 	 */
    411 	daeElementRefArray &getContents() { return _contents; }
    412 	/**
    413 	 * Gets the _contents array.
    414 	 * @return Returns a constant reference to the _contents element array.
    415 	 */
    416 	const daeElementRefArray &getContents() const { return _contents; }
    417 
    418 protected:
    419 	/**
    420 	 * Constructor
    421 	 */
    422 	domCommon_newparam_type_complexType(DAE& dae, daeElement* elt) : attrSid(), elemSemantic(), elemFloat(), elemFloat2(), elemFloat3(), elemFloat4(), elemSurface(), elemSampler2D() {}
    423 	/**
    424 	 * Destructor
    425 	 */
    426 	virtual ~domCommon_newparam_type_complexType() { daeElement::deleteCMDataArray(_CMData); }
    427 	/**
    428 	 * Overloaded assignment operator
    429 	 */
    430 	virtual domCommon_newparam_type_complexType &operator=( const domCommon_newparam_type_complexType &cpy ) { (void)cpy; return *this; }
    431 };
    432 
    433 /**
    434  * An element of type domCommon_newparam_type_complexType.
    435  */
    436 class domCommon_newparam_type : public daeElement, public domCommon_newparam_type_complexType
    437 {
    438 public:
    439 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::COMMON_NEWPARAM_TYPE; }
    440 	static daeInt ID() { return 126; }
    441 	virtual daeInt typeID() const { return ID(); }
    442 
    443 public:	//Accessors and Mutators
    444 	/**
    445 	 * Gets the sid attribute.
    446 	 * @return Returns a xsNCName of the sid attribute.
    447 	 */
    448 	xsNCName getSid() const { return attrSid; }
    449 	/**
    450 	 * Sets the sid attribute.
    451 	 * @param atSid The new value for the sid attribute.
    452 	 */
    453 	void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
    454 
    455 protected:
    456 	/**
    457 	 * Constructor
    458 	 */
    459 	domCommon_newparam_type(DAE& dae) : daeElement(dae), domCommon_newparam_type_complexType(dae, this) {}
    460 	/**
    461 	 * Destructor
    462 	 */
    463 	virtual ~domCommon_newparam_type() {}
    464 	/**
    465 	 * Overloaded assignment operator
    466 	 */
    467 	virtual domCommon_newparam_type &operator=( const domCommon_newparam_type &cpy ) { (void)cpy; return *this; }
    468 
    469 public: // STATIC METHODS
    470 	/**
    471 	 * Creates an instance of this class and returns a daeElementRef referencing it.
    472 	 * @return a daeElementRef referencing an instance of this object.
    473 	 */
    474 	static DLLSPEC daeElementRef create(DAE& dae);
    475 	/**
    476 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    477 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
    478 	 * @return A daeMetaElement describing this COLLADA element.
    479 	 */
    480 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    481 };
    482 
    483 
    484 #endif
    485