domInstance_camera.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 __domInstance_camera_h__
  14. #define __domInstance_camera_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. #include <dom/domInstanceWithExtra.h>
  19. class DAE;
  20. /**
  21. * The instance_camera element declares the instantiation of a COLLADA camera
  22. * resource.
  23. */
  24. class domInstance_camera : public daeElement, public domInstanceWithExtra_complexType
  25. {
  26. public:
  27. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INSTANCE_CAMERA; }
  28. static daeInt ID() { return 688; }
  29. virtual daeInt typeID() const { return ID(); }
  30. /**
  31. * Gets the url attribute.
  32. * @return Returns a xsAnyURI reference of the url attribute.
  33. */
  34. xsAnyURI &getUrl() { return attrUrl; }
  35. /**
  36. * Gets the url attribute.
  37. * @return Returns a constant xsAnyURI reference of the url attribute.
  38. */
  39. const xsAnyURI &getUrl() const { return attrUrl; }
  40. /**
  41. * Sets the url attribute.
  42. * @param atUrl The new value for the url attribute.
  43. */
  44. void setUrl( const xsAnyURI &atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; }
  45. /**
  46. * Sets the url attribute.
  47. * @param atUrl The new value for the url attribute.
  48. */
  49. void setUrl( xsString atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; }
  50. /**
  51. * Gets the sid attribute.
  52. * @return Returns a xsNCName of the sid attribute.
  53. */
  54. xsNCName getSid() const { return attrSid; }
  55. /**
  56. * Sets the sid attribute.
  57. * @param atSid The new value for the sid attribute.
  58. */
  59. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; }
  60. /**
  61. * Gets the name attribute.
  62. * @return Returns a xsNCName of the name attribute.
  63. */
  64. xsNCName getName() const { return attrName; }
  65. /**
  66. * Sets the name attribute.
  67. * @param atName The new value for the name attribute.
  68. */
  69. void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[2] = true; }
  70. protected:
  71. /**
  72. * Constructor
  73. */
  74. domInstance_camera(DAE& dae) : daeElement(dae), domInstanceWithExtra_complexType(dae, this) {}
  75. /**
  76. * Destructor
  77. */
  78. virtual ~domInstance_camera() {}
  79. /**
  80. * Overloaded assignment operator
  81. */
  82. virtual domInstance_camera &operator=( const domInstance_camera &cpy ) { (void)cpy; return *this; }
  83. public: // STATIC METHODS
  84. /**
  85. * Creates an instance of this class and returns a daeElementRef referencing it.
  86. * @return a daeElementRef referencing an instance of this object.
  87. */
  88. static DLLSPEC daeElementRef create(DAE& dae);
  89. /**
  90. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  91. * If a daeMetaElement already exists it will return that instead of creating a new one.
  92. * @return A daeMetaElement describing this COLLADA element.
  93. */
  94. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  95. };
  96. #endif