domInputLocal.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. * Copyright 2006 Sony Computer Entertainment Inc.
  3. *
  4. * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this
  5. * file except in compliance with the License. You may obtain a copy of the License at:
  6. * http://research.scea.com/scea_shared_source_license.html
  7. *
  8. * Unless required by applicable law or agreed to in writing, software distributed under the License
  9. * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  10. * implied. See the License for the specific language governing permissions and limitations under the
  11. * License.
  12. */
  13. #ifndef __domInputLocal_h__
  14. #define __domInputLocal_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. class DAE;
  19. /**
  20. * The InputLocal type is used to represent inputs that can only reference
  21. * resources declared in the same document.
  22. */
  23. class domInputLocal_complexType
  24. {
  25. protected: // Attributes
  26. /**
  27. * The semantic attribute is the user-defined meaning of the input connection.
  28. * Required attribute.
  29. */
  30. xsNMTOKEN attrSemantic;
  31. /**
  32. * The source attribute indicates the location of the data source. Required
  33. * attribute.
  34. */
  35. domURIFragmentType attrSource;
  36. public: //Accessors and Mutators
  37. /**
  38. * Gets the semantic attribute.
  39. * @return Returns a xsNMTOKEN of the semantic attribute.
  40. */
  41. xsNMTOKEN getSemantic() const { return attrSemantic; }
  42. /**
  43. * Sets the semantic attribute.
  44. * @param atSemantic The new value for the semantic attribute.
  45. */
  46. void setSemantic( xsNMTOKEN atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic;}
  47. /**
  48. * Gets the source attribute.
  49. * @return Returns a domURIFragmentType reference of the source attribute.
  50. */
  51. domURIFragmentType &getSource() { return attrSource; }
  52. /**
  53. * Gets the source attribute.
  54. * @return Returns a constant domURIFragmentType reference of the source attribute.
  55. */
  56. const domURIFragmentType &getSource() const { return attrSource; }
  57. /**
  58. * Sets the source attribute.
  59. * @param atSource The new value for the source attribute.
  60. */
  61. void setSource( const domURIFragmentType &atSource ) { attrSource = atSource; }
  62. /**
  63. * Sets the source attribute.
  64. * @param atSource The new value for the source attribute.
  65. */
  66. void setSource( xsString atSource ) { attrSource = atSource; }
  67. protected:
  68. /**
  69. * Constructor
  70. */
  71. domInputLocal_complexType(DAE& dae, daeElement* elt) : attrSemantic(), attrSource(dae, *elt) {}
  72. /**
  73. * Destructor
  74. */
  75. virtual ~domInputLocal_complexType() {}
  76. /**
  77. * Overloaded assignment operator
  78. */
  79. virtual domInputLocal_complexType &operator=( const domInputLocal_complexType &cpy ) { (void)cpy; return *this; }
  80. };
  81. /**
  82. * An element of type domInputLocal_complexType.
  83. */
  84. class domInputLocal : public daeElement, public domInputLocal_complexType
  85. {
  86. public:
  87. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INPUTLOCAL; }
  88. static daeInt ID() { return 1; }
  89. virtual daeInt typeID() const { return ID(); }
  90. public: //Accessors and Mutators
  91. /**
  92. * Gets the semantic attribute.
  93. * @return Returns a xsNMTOKEN of the semantic attribute.
  94. */
  95. xsNMTOKEN getSemantic() const { return attrSemantic; }
  96. /**
  97. * Sets the semantic attribute.
  98. * @param atSemantic The new value for the semantic attribute.
  99. */
  100. void setSemantic( xsNMTOKEN atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic; _validAttributeArray[0] = true; }
  101. /**
  102. * Gets the source attribute.
  103. * @return Returns a domURIFragmentType reference of the source attribute.
  104. */
  105. domURIFragmentType &getSource() { return attrSource; }
  106. /**
  107. * Gets the source attribute.
  108. * @return Returns a constant domURIFragmentType reference of the source attribute.
  109. */
  110. const domURIFragmentType &getSource() const { return attrSource; }
  111. /**
  112. * Sets the source attribute.
  113. * @param atSource The new value for the source attribute.
  114. */
  115. void setSource( const domURIFragmentType &atSource ) { attrSource = atSource; _validAttributeArray[1] = true; }
  116. /**
  117. * Sets the source attribute.
  118. * @param atSource The new value for the source attribute.
  119. */
  120. void setSource( xsString atSource ) { attrSource = atSource; _validAttributeArray[1] = true; }
  121. protected:
  122. /**
  123. * Constructor
  124. */
  125. domInputLocal(DAE& dae) : daeElement(dae), domInputLocal_complexType(dae, this) {}
  126. /**
  127. * Destructor
  128. */
  129. virtual ~domInputLocal() {}
  130. /**
  131. * Overloaded assignment operator
  132. */
  133. virtual domInputLocal &operator=( const domInputLocal &cpy ) { (void)cpy; return *this; }
  134. public: // STATIC METHODS
  135. /**
  136. * Creates an instance of this class and returns a daeElementRef referencing it.
  137. * @return a daeElementRef referencing an instance of this object.
  138. */
  139. static DLLSPEC daeElementRef create(DAE& dae);
  140. /**
  141. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  142. * If a daeMetaElement already exists it will return that instead of creating a new one.
  143. * @return A daeMetaElement describing this COLLADA element.
  144. */
  145. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  146. };
  147. #endif