XmlDeclaration.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-09-27
  6. * Changed: 2022-07-03
  7. *
  8. * */
  9. #ifndef LS_STD_XML_DECLARATION_HPP
  10. #define LS_STD_XML_DECLARATION_HPP
  11. #include <ls_std/core/Class.hpp>
  12. #include "XmlAttribute.hpp"
  13. #include <ls_std/os/dynamic_goal.hpp>
  14. namespace ls
  15. {
  16. namespace std
  17. {
  18. namespace io
  19. {
  20. class LS_STD_DYNAMIC_GOAL XmlDeclaration : public ls::std::core::Class
  21. {
  22. public:
  23. explicit XmlDeclaration(const ::std::string &_version);
  24. ~XmlDeclaration() override = default;
  25. ::std::string getEncoding();
  26. ::std::string getStandalone();
  27. ::std::string getVersion();
  28. void setEncoding(const ::std::string &_encoding);
  29. void setStandalone(const ::std::string &_standalone);
  30. void setVersion(const ::std::string &_version);
  31. ::std::string toXml();
  32. private:
  33. ls::std::io::XmlAttribute encoding{"encoding"};
  34. ls::std::io::XmlAttribute standalone{"standalone"};
  35. ls::std::io::XmlAttribute version{"version"};
  36. static ::std::string _toXmlAttribute(ls::std::io::XmlAttribute _attribute);
  37. };
  38. }
  39. }
  40. }
  41. #endif