XmlDeclaration.hpp 1.0 KB

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