XMLElement.pkg 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. $#include "XMLElement.h"
  2. class XMLElement
  3. {
  4. XMLElement CreateChild(const String name);
  5. bool RemoveChild(const XMLElement& element);
  6. bool RemoveChild(const String name);
  7. bool RemoveChildren(const String name = String::EMPTY);
  8. bool RemoveAttribute(const String name = String::EMPTY);
  9. bool SetValue(const String value);
  10. bool SetAttribute(const String name, const String value);
  11. bool SetBool(const String name, bool value);
  12. bool SetBoundingBox(const BoundingBox& value);
  13. bool SetColor(const String name, const Color& value);
  14. bool SetFloat(const String name, float value);
  15. bool SetUInt(const String name, unsigned value);
  16. bool SetInt(const String name, int value);
  17. bool SetIntRect(const String name, const IntRect& value);
  18. bool SetIntVector2(const String name, const IntVector2& value);
  19. bool SetRect(const String name, const Rect& value);
  20. bool SetQuaternion(const String name, const Quaternion& value);
  21. bool SetString(const String name, const String value);
  22. bool SetVariant(const Variant& value);
  23. bool SetVariantValue(const Variant& value);
  24. bool SetResourceRef(const ResourceRef& value);
  25. bool SetResourceRefList(const ResourceRefList& value);
  26. bool SetVector2(const String name, const Vector2& value);
  27. bool SetVector3(const String name, const Vector3& value);
  28. bool SetVector4(const String name, const Vector4& value);
  29. bool SetVectorVariant(const String name, const Variant& value);
  30. bool SetMatrix3(const String name, const Matrix3& value);
  31. bool SetMatrix3x4(const String name, const Matrix3x4& value);
  32. bool SetMatrix4(const String name, const Matrix4& value);
  33. bool IsNull() const;
  34. bool NotNull() const;
  35. operator bool () const;
  36. String GetName() const;
  37. bool HasChild(const String name) const;
  38. XMLElement GetChild(const String name = String::EMPTY) const;
  39. XMLElement GetNext(const String name = String::EMPTY) const;
  40. XMLElement GetParent() const;
  41. unsigned GetNumAttributes() const;
  42. bool HasAttribute(const String name) const;
  43. bool GetBool(const String name) const;
  44. BoundingBox GetBoundingBox() const;
  45. String GetValue() const;
  46. Color GetColor(const String name) const;
  47. float GetFloat(const String name) const;
  48. unsigned GetUInt(const String name) const;
  49. int GetInt(const String name) const;
  50. IntRect GetIntRect(const String name) const;
  51. IntVector2 GetIntVector2(const String name) const;
  52. Rect GetRect(const String name) const;
  53. Quaternion GetQuaternion(const String name) const;
  54. Variant GetVariant() const;
  55. Variant GetVariantValue(VariantType type) const;
  56. ResourceRef GetResourceRef() const;
  57. ResourceRefList GetResourceRefList() const;
  58. VariantMap GetVariantMap() const;
  59. Vector2 GetVector2(const String name) const;
  60. Vector3 GetVector3(const String name) const;
  61. Vector4 GetVector4(const String name) const;
  62. Vector4 GetVector(const String name) const;
  63. Matrix3 GetMatrix3(const String name) const;
  64. Matrix3x4 GetMatrix3x4(const String name) const;
  65. Matrix4 GetMatrix4(const String name) const;
  66. XMLFile* GetFile() const;
  67. static const XMLElement EMPTY;
  68. tolua_readonly tolua_property__is_set bool null;
  69. tolua_readonly tolua_property__get_set String name;
  70. tolua_readonly tolua_property__get_set String value;
  71. tolua_readonly tolua_property__get_set XMLElement parent;
  72. tolua_readonly tolua_property__get_set unsigned numAttributes;
  73. tolua_readonly tolua_property__get_set XMLFile* file;
  74. };