XMLDocument.hpp 964 B

1234567891011121314151617181920212223242526272829303132333435363738
  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-26
  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. class XMLDocument : public Class {
  17. public:
  18. XMLDocument();
  19. ~XMLDocument() override = default;
  20. std::shared_ptr<ls_std::XMLDeclaration> getDeclaration();
  21. std::shared_ptr<ls_std::XMLNode> getRootElement();
  22. void setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration>& _declaration);
  23. void setRootElement(const std::shared_ptr<ls_std::XMLNode>& _root);
  24. std::string toXML();
  25. private:
  26. std::shared_ptr<ls_std::XMLDeclaration> declaration {};
  27. std::shared_ptr<ls_std::XMLNode> rootElement {};
  28. };
  29. }
  30. #endif