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-04-23
  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 Class
  16. {
  17. public:
  18. explicit XMLDeclaration(std::string _version);
  19. ~XMLDeclaration() override = default;
  20. std::string getEncoding();
  21. std::string getStandalone();
  22. std::string getVersion();
  23. void setEncoding(std::string _encoding);
  24. void setStandalone(std::string _standalone);
  25. void setVersion(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