XmlDeclaration.hpp 1.2 KB

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