• 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 __domInputGlobal_h__
10 #define __domInputGlobal_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 InputGlobal type is used to represent inputs that can reference external
20  * resources.
21  */
22 class domInputGlobal_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 	xsAnyURI attrSource;
35 
36 
37 public:	//Accessors and Mutators
38 	/**
39 	 * Gets the semantic attribute.
40 	 * @return Returns a xsNMTOKEN of the semantic attribute.
41 	 */
getSemantic()42 	xsNMTOKEN getSemantic() const { return attrSemantic; }
43 	/**
44 	 * Sets the semantic attribute.
45 	 * @param atSemantic The new value for the semantic attribute.
46 	 */
setSemantic(xsNMTOKEN atSemantic)47 	void setSemantic( xsNMTOKEN atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic;}
48 
49 	/**
50 	 * Gets the source attribute.
51 	 * @return Returns a xsAnyURI reference of the source attribute.
52 	 */
getSource()53 	xsAnyURI &getSource() { return attrSource; }
54 	/**
55 	 * Gets the source attribute.
56 	 * @return Returns a constant xsAnyURI reference of the source attribute.
57 	 */
getSource()58 	const xsAnyURI &getSource() const { return attrSource; }
59 	/**
60 	 * Sets the source attribute.
61 	 * @param atSource The new value for the source attribute.
62 	 */
setSource(const xsAnyURI & atSource)63 	void setSource( const xsAnyURI &atSource ) { attrSource = atSource; }
64 	/**
65 	 * Sets the source attribute.
66 	 * @param atSource The new value for the source attribute.
67 	 */
setSource(xsString atSource)68 	void setSource( xsString atSource ) { attrSource = atSource; }
69 
70 protected:
71 	/**
72 	 * Constructor
73 	 */
domInputGlobal_complexType(DAE & dae,daeElement * elt)74 	domInputGlobal_complexType(DAE& dae, daeElement* elt) : attrSemantic(), attrSource(dae, *elt) {}
75 	/**
76 	 * Destructor
77 	 */
~domInputGlobal_complexType()78 	virtual ~domInputGlobal_complexType() {}
79 	/**
80 	 * Overloaded assignment operator
81 	 */
82 	virtual domInputGlobal_complexType &operator=( const domInputGlobal_complexType &cpy ) { (void)cpy; return *this; }
83 };
84 
85 /**
86  * An element of type domInputGlobal_complexType.
87  */
88 class domInputGlobal : public daeElement, public domInputGlobal_complexType
89 {
90 public:
getElementType()91 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INPUTGLOBAL; }
ID()92 	static daeInt ID() { return 0; }
typeID()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 	 */
getSemantic()100 	xsNMTOKEN getSemantic() const { return attrSemantic; }
101 	/**
102 	 * Sets the semantic attribute.
103 	 * @param atSemantic The new value for the semantic attribute.
104 	 */
setSemantic(xsNMTOKEN atSemantic)105 	void setSemantic( xsNMTOKEN atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic; _validAttributeArray[0] = true; }
106 
107 	/**
108 	 * Gets the source attribute.
109 	 * @return Returns a xsAnyURI reference of the source attribute.
110 	 */
getSource()111 	xsAnyURI &getSource() { return attrSource; }
112 	/**
113 	 * Gets the source attribute.
114 	 * @return Returns a constant xsAnyURI reference of the source attribute.
115 	 */
getSource()116 	const xsAnyURI &getSource() const { return attrSource; }
117 	/**
118 	 * Sets the source attribute.
119 	 * @param atSource The new value for the source attribute.
120 	 */
setSource(const xsAnyURI & atSource)121 	void setSource( const xsAnyURI &atSource ) { attrSource = atSource; _validAttributeArray[1] = true; }
122 	/**
123 	 * Sets the source attribute.
124 	 * @param atSource The new value for the source attribute.
125 	 */
setSource(xsString atSource)126 	void setSource( xsString atSource ) { attrSource = atSource; _validAttributeArray[1] = true; }
127 
128 protected:
129 	/**
130 	 * Constructor
131 	 */
domInputGlobal(DAE & dae)132 	domInputGlobal(DAE& dae) : daeElement(dae), domInputGlobal_complexType(dae, this) {}
133 	/**
134 	 * Destructor
135 	 */
~domInputGlobal()136 	virtual ~domInputGlobal() {}
137 	/**
138 	 * Overloaded assignment operator
139 	 */
140 	virtual domInputGlobal &operator=( const domInputGlobal &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