XMLDeclaration.hpp 1018 B

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