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 __domCg_setuser_type_h__
     10 #define __domCg_setuser_type_h__
     11 
     12 #include <dae/daeDocument.h>
     13 #include <dom/domTypes.h>
     14 #include <dom/domElements.h>
     15 
     16 #include <dom/domCg_param_type.h>
     17 #include <dom/domCg_setarray_type.h>
     18 #include <dom/domCg_setuser_type.h>
     19 #include <dom/domCg_connect_param.h>
     20 #include <dom/domCg_setparam.h>
     21 class DAE;
     22 
     23 /**
     24  * Creates an instance of a structured class.
     25  */
     26 class domCg_setuser_type_complexType
     27 {
     28 protected:  // Attributes
     29 	domCg_identifier attrName;
     30 /**
     31  *  Reference a code or include element which defines the usertype
     32  */
     33 	xsNCName attrSource;
     34 
     35 protected:  // Elements
     36 	domCg_param_type_Array elemCg_param_type_array;
     37 	domCg_setarray_type_Array elemArray_array;
     38 	domCg_setuser_type_Array elemUsertype_array;
     39 	domCg_connect_param_Array elemConnect_param_array;
     40 /**
     41  * Use a series of these to set the members by name.  The ref attribute will
     42  * be relative to the usertype you are in right now. @see domSetparam
     43  */
     44 	domCg_setparam_Array elemSetparam_array;
     45 	/**
     46 	 * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
     47 	 */
     48 	daeElementRefArray _contents;
     49 	/**
     50 	 * Used to preserve order in elements that have a complex content model.
     51 	 */
     52 	daeUIntArray       _contentsOrder;
     53 
     54 	/**
     55 	 * Used to store information needed for some content model objects.
     56 	 */
     57 	daeTArray< daeCharArray * > _CMData;
     58 
     59 
     60 public:	//Accessors and Mutators
     61 	/**
     62 	 * Gets the name attribute.
     63 	 * @return Returns a domCg_identifier of the name attribute.
     64 	 */
     65 	domCg_identifier getName() const { return attrName; }
     66 	/**
     67 	 * Sets the name attribute.
     68 	 * @param atName The new value for the name attribute.
     69 	 */
     70 	void setName( domCg_identifier atName ) { attrName = atName; }
     71 
     72 	/**
     73 	 * Gets the source attribute.
     74 	 * @return Returns a xsNCName of the source attribute.
     75 	 */
     76 	xsNCName getSource() const { return attrSource; }
     77 	/**
     78 	 * Sets the source attribute.
     79 	 * @param atSource The new value for the source attribute.
     80 	 */
     81 	void setSource( xsNCName atSource ) { *(daeStringRef*)&attrSource = atSource;}
     82 
     83 	/**
     84 	 * Gets the cg_param_type element array.
     85 	 * @return Returns a reference to the array of cg_param_type elements.
     86 	 */
     87 	domCg_param_type_Array &getCg_param_type_array() { return elemCg_param_type_array; }
     88 	/**
     89 	 * Gets the cg_param_type element array.
     90 	 * @return Returns a constant reference to the array of cg_param_type elements.
     91 	 */
     92 	const domCg_param_type_Array &getCg_param_type_array() const { return elemCg_param_type_array; }
     93 	/**
     94 	 * Gets the array element array.
     95 	 * @return Returns a reference to the array of array elements.
     96 	 */
     97 	domCg_setarray_type_Array &getArray_array() { return elemArray_array; }
     98 	/**
     99 	 * Gets the array element array.
    100 	 * @return Returns a constant reference to the array of array elements.
    101 	 */
    102 	const domCg_setarray_type_Array &getArray_array() const { return elemArray_array; }
    103 	/**
    104 	 * Gets the usertype element array.
    105 	 * @return Returns a reference to the array of usertype elements.
    106 	 */
    107 	domCg_setuser_type_Array &getUsertype_array() { return elemUsertype_array; }
    108 	/**
    109 	 * Gets the usertype element array.
    110 	 * @return Returns a constant reference to the array of usertype elements.
    111 	 */
    112 	const domCg_setuser_type_Array &getUsertype_array() const { return elemUsertype_array; }
    113 	/**
    114 	 * Gets the connect_param element array.
    115 	 * @return Returns a reference to the array of connect_param elements.
    116 	 */
    117 	domCg_connect_param_Array &getConnect_param_array() { return elemConnect_param_array; }
    118 	/**
    119 	 * Gets the connect_param element array.
    120 	 * @return Returns a constant reference to the array of connect_param elements.
    121 	 */
    122 	const domCg_connect_param_Array &getConnect_param_array() const { return elemConnect_param_array; }
    123 	/**
    124 	 * Gets the setparam element array.
    125 	 * @return Returns a reference to the array of setparam elements.
    126 	 */
    127 	domCg_setparam_Array &getSetparam_array() { return elemSetparam_array; }
    128 	/**
    129 	 * Gets the setparam element array.
    130 	 * @return Returns a constant reference to the array of setparam elements.
    131 	 */
    132 	const domCg_setparam_Array &getSetparam_array() const { return elemSetparam_array; }
    133 	/**
    134 	 * Gets the _contents array.
    135 	 * @return Returns a reference to the _contents element array.
    136 	 */
    137 	daeElementRefArray &getContents() { return _contents; }
    138 	/**
    139 	 * Gets the _contents array.
    140 	 * @return Returns a constant reference to the _contents element array.
    141 	 */
    142 	const daeElementRefArray &getContents() const { return _contents; }
    143 
    144 protected:
    145 	/**
    146 	 * Constructor
    147 	 */
    148 	domCg_setuser_type_complexType(DAE& dae, daeElement* elt) : attrName(), attrSource(), elemCg_param_type_array(), elemArray_array(), elemUsertype_array(), elemConnect_param_array(), elemSetparam_array() {}
    149 	/**
    150 	 * Destructor
    151 	 */
    152 	virtual ~domCg_setuser_type_complexType() { daeElement::deleteCMDataArray(_CMData); }
    153 	/**
    154 	 * Overloaded assignment operator
    155 	 */
    156 	virtual domCg_setuser_type_complexType &operator=( const domCg_setuser_type_complexType &cpy ) { (void)cpy; return *this; }
    157 };
    158 
    159 /**
    160  * An element of type domCg_setuser_type_complexType.
    161  */
    162 class domCg_setuser_type : public daeElement, public domCg_setuser_type_complexType
    163 {
    164 public:
    165 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CG_SETUSER_TYPE; }
    166 	static daeInt ID() { return 136; }
    167 	virtual daeInt typeID() const { return ID(); }
    168 
    169 public:	//Accessors and Mutators
    170 	/**
    171 	 * Gets the name attribute.
    172 	 * @return Returns a domCg_identifier of the name attribute.
    173 	 */
    174 	domCg_identifier getName() const { return attrName; }
    175 	/**
    176 	 * Sets the name attribute.
    177 	 * @param atName The new value for the name attribute.
    178 	 */
    179 	void setName( domCg_identifier atName ) { attrName = atName; _validAttributeArray[0] = true; }
    180 
    181 	/**
    182 	 * Gets the source attribute.
    183 	 * @return Returns a xsNCName of the source attribute.
    184 	 */
    185 	xsNCName getSource() const { return attrSource; }
    186 	/**
    187 	 * Sets the source attribute.
    188 	 * @param atSource The new value for the source attribute.
    189 	 */
    190 	void setSource( xsNCName atSource ) { *(daeStringRef*)&attrSource = atSource; _validAttributeArray[1] = true; }
    191 
    192 protected:
    193 	/**
    194 	 * Constructor
    195 	 */
    196 	domCg_setuser_type(DAE& dae) : daeElement(dae), domCg_setuser_type_complexType(dae, this) {}
    197 	/**
    198 	 * Destructor
    199 	 */
    200 	virtual ~domCg_setuser_type() {}
    201 	/**
    202 	 * Overloaded assignment operator
    203 	 */
    204 	virtual domCg_setuser_type &operator=( const domCg_setuser_type &cpy ) { (void)cpy; return *this; }
    205 
    206 public: // STATIC METHODS
    207 	/**
    208 	 * Creates an instance of this class and returns a daeElementRef referencing it.
    209 	 * @return a daeElementRef referencing an instance of this object.
    210 	 */
    211 	static DLLSPEC daeElementRef create(DAE& dae);
    212 	/**
    213 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    214 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
    215 	 * @return A daeMetaElement describing this COLLADA element.
    216 	 */
    217 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    218 };
    219 
    220 
    221 #endif
    222