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 __domInputLocal_h__
     10 #define __domInputLocal_h__
     11 
     12 #include <dae/daeDocument.h>
     13 #include <dom/domTypes.h>
     14 #include <dom/domElements.h>
     15 
     16 class DAE;
     17 
     18 /**
     19  * The InputLocal type is used to represent inputs that can only reference
     20  * resources declared in the same document.
     21  */
     22 class domInputLocal_complexType
     23 {
     24 protected:  // Attributes
     25 /**
     26  *  The semantic attribute is the user-defined meaning of the input connection.
     27  * Required attribute.
     28  */
     29 	xsNMTOKEN attrSemantic;
     30 /**
     31  *  The source attribute indicates the location of the data source. Required
     32  * attribute.
     33  */
     34 	domURIFragmentType attrSource;
     35 
     36 
     37 public:	//Accessors and Mutators
     38 	/**
     39 	 * Gets the semantic attribute.
     40 	 * @return Returns a xsNMTOKEN of the semantic attribute.
     41 	 */
     42 	xsNMTOKEN getSemantic() const { return attrSemantic; }
     43 	/**
     44 	 * Sets the semantic attribute.
     45 	 * @param atSemantic The new value for the semantic attribute.
     46 	 */
     47 	void setSemantic( xsNMTOKEN atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic;}
     48 
     49 	/**
     50 	 * Gets the source attribute.
     51 	 * @return Returns a domURIFragmentType reference of the source attribute.
     52 	 */
     53 	domURIFragmentType &getSource() { return attrSource; }
     54 	/**
     55 	 * Gets the source attribute.
     56 	 * @return Returns a constant domURIFragmentType reference of the source attribute.
     57 	 */
     58 	const domURIFragmentType &getSource() const { return attrSource; }
     59 	/**
     60 	 * Sets the source attribute.
     61 	 * @param atSource The new value for the source attribute.
     62 	 */
     63 	void setSource( const domURIFragmentType &atSource ) { attrSource = atSource; }
     64 	/**
     65 	 * Sets the source attribute.
     66 	 * @param atSource The new value for the source attribute.
     67 	 */
     68 	void setSource( xsString atSource ) { attrSource = atSource; }
     69 
     70 protected:
     71 	/**
     72 	 * Constructor
     73 	 */
     74 	domInputLocal_complexType(DAE& dae, daeElement* elt) : attrSemantic(), attrSource(dae, *elt) {}
     75 	/**
     76 	 * Destructor
     77 	 */
     78 	virtual ~domInputLocal_complexType() {}
     79 	/**
     80 	 * Overloaded assignment operator
     81 	 */
     82 	virtual domInputLocal_complexType &operator=( const domInputLocal_complexType &cpy ) { (void)cpy; return *this; }
     83 };
     84 
     85 /**
     86  * An element of type domInputLocal_complexType.
     87  */
     88 class domInputLocal : public daeElement, public domInputLocal_complexType
     89 {
     90 public:
     91 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INPUTLOCAL; }
     92 	static daeInt ID() { return 1; }
     93 	virtual daeInt typeID() const { return ID(); }
     94 
     95 public:	//Accessors and Mutators
     96 	/**
     97 	 * Gets the semantic attribute.
     98 	 * @return Returns a xsNMTOKEN of the semantic attribute.
     99 	 */
    100 	xsNMTOKEN getSemantic() const { return attrSemantic; }
    101 	/**
    102 	 * Sets the semantic attribute.
    103 	 * @param atSemantic The new value for the semantic attribute.
    104 	 */
    105 	void setSemantic( xsNMTOKEN atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic; _validAttributeArray[0] = true; }
    106 
    107 	/**
    108 	 * Gets the source attribute.
    109 	 * @return Returns a domURIFragmentType reference of the source attribute.
    110 	 */
    111 	domURIFragmentType &getSource() { return attrSource; }
    112 	/**
    113 	 * Gets the source attribute.
    114 	 * @return Returns a constant domURIFragmentType reference of the source attribute.
    115 	 */
    116 	const domURIFragmentType &getSource() const { return attrSource; }
    117 	/**
    118 	 * Sets the source attribute.
    119 	 * @param atSource The new value for the source attribute.
    120 	 */
    121 	void setSource( const domURIFragmentType &atSource ) { attrSource = atSource; _validAttributeArray[1] = true; }
    122 	/**
    123 	 * Sets the source attribute.
    124 	 * @param atSource The new value for the source attribute.
    125 	 */
    126 	void setSource( xsString atSource ) { attrSource = atSource; _validAttributeArray[1] = true; }
    127 
    128 protected:
    129 	/**
    130 	 * Constructor
    131 	 */
    132 	domInputLocal(DAE& dae) : daeElement(dae), domInputLocal_complexType(dae, this) {}
    133 	/**
    134 	 * Destructor
    135 	 */
    136 	virtual ~domInputLocal() {}
    137 	/**
    138 	 * Overloaded assignment operator
    139 	 */
    140 	virtual domInputLocal &operator=( const domInputLocal &cpy ) { (void)cpy; return *this; }
    141 
    142 public: // STATIC METHODS
    143 	/**
    144 	 * Creates an instance of this class and returns a daeElementRef referencing it.
    145 	 * @return a daeElementRef referencing an instance of this object.
    146 	 */
    147 	static DLLSPEC daeElementRef create(DAE& dae);
    148 	/**
    149 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    150 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
    151 	 * @return A daeMetaElement describing this COLLADA element.
    152 	 */
    153 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    154 };
    155 
    156 
    157 #endif
    158