/* * Author: Patrick-Christopher Mattulat * Company: Lynar Studios * E-Mail: webmaster@lynarstudios.com * Created: 2020-09-27 * Changed: 2024-09-09 * * */ #ifndef LS_STD_XML_DOCUMENT_HPP #define LS_STD_XML_DOCUMENT_HPP #include "XmlDeclaration.hpp" #include "XmlNode.hpp" #include #include #include /* * @doc: class(name: 'XmlDocument', package: 'io') * */ namespace ls::std::io { class LS_STD_DYNAMIC_GOAL XmlDocument : public ls::std::core::Class { public: XmlDocument(); ~XmlDocument() noexcept override; [[nodiscard]] ::std::shared_ptr getDeclaration() const; [[nodiscard]] ::std::shared_ptr getRootElement() const; void setDeclaration(const ::std::shared_ptr &_declaration); void setRootElement(const ::std::shared_ptr &_rootElement); [[nodiscard]] ::std::string toXml() const; private: ::std::shared_ptr declaration{}; ::std::shared_ptr rootElement{}; void _assignDeclaration(const ::std::shared_ptr &_declaration); void _assignRootElement(const ::std::shared_ptr &_rootElement); }; } #endif