XmlReader.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-10-08
  6. * Changed: 2022-05-12
  7. *
  8. * */
  9. #ifndef LS_STD_XML_READER_HPP
  10. #define LS_STD_XML_READER_HPP
  11. #include <ls_std/core/Class.hpp>
  12. #include "XmlDocument.hpp"
  13. #include <ls_std/core/interface/IReader.hpp>
  14. #include <ls_std/io/File.hpp>
  15. #include "XmlParseMode.hpp"
  16. #include "XmlParseParameter.hpp"
  17. #include <list>
  18. namespace ls
  19. {
  20. namespace std
  21. {
  22. namespace io
  23. {
  24. class XmlReader : public ls::std::core::Class, public ls::std::core::IReader
  25. {
  26. public:
  27. explicit XmlReader(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document, const ::std::string &_absolutePath);
  28. ~XmlReader() override = default;
  29. // implementation
  30. ls::std::core::type::byte_field read() override;
  31. // additional functionality
  32. ::std::shared_ptr<ls::std::io::XmlDocument> getDocument();
  33. void setDocument(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document);
  34. void setFile(const ls::std::io::File &_xmlFile);
  35. private:
  36. ::std::shared_ptr<ls::std::io::XmlDocument> document{};
  37. ls::std::io::File xmlFile;
  38. void _assignDocument(const ::std::shared_ptr<ls::std::io::XmlDocument> &_document);
  39. void _assignFile(ls::std::io::File _xmlFile);
  40. };
  41. }
  42. }
  43. }
  44. #endif