XmlDeclaration.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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::std::io
  15. {
  16. class LS_STD_DYNAMIC_GOAL XmlDeclaration : public ls::std::core::Class
  17. {
  18. public:
  19. explicit XmlDeclaration(const ::std::string &_version);
  20. ~XmlDeclaration() override = default;
  21. ::std::string getEncoding();
  22. ::std::string getStandalone();
  23. ::std::string getVersion();
  24. void setEncoding(const ::std::string &_encoding);
  25. void setStandalone(const ::std::string &_standalone);
  26. void setVersion(const ::std::string &_version);
  27. ::std::string toXml();
  28. private:
  29. ls::std::io::XmlAttribute encoding{"encoding"};
  30. ls::std::io::XmlAttribute standalone{"standalone"};
  31. ls::std::io::XmlAttribute version{"version"};
  32. static ::std::string _toXmlAttribute(ls::std::io::XmlAttribute _attribute);
  33. };
  34. }
  35. #endif