XMLDocument.hpp 964 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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_DOCUMENT_HPP
  10. #define LS_STD_XML_DOCUMENT_HPP
  11. #include <memory>
  12. #include <ls_std/base/Class.hpp>
  13. #include "XMLNode.hpp"
  14. #include "XMLDeclaration.hpp"
  15. namespace ls_std
  16. {
  17. class XMLDocument : public Class
  18. {
  19. public:
  20. XMLDocument();
  21. ~XMLDocument() override = default;
  22. std::shared_ptr<ls_std::XMLDeclaration> getDeclaration();
  23. std::shared_ptr<ls_std::XMLNode> getRootElement();
  24. void setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration> &_declaration);
  25. void setRootElement(const std::shared_ptr<ls_std::XMLNode> &_root);
  26. std::string toXML();
  27. private:
  28. std::shared_ptr<ls_std::XMLDeclaration> declaration{};
  29. std::shared_ptr<ls_std::XMLNode> rootElement{};
  30. };
  31. }
  32. #endif