FileReader.hpp 895 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-17
  6. * Changed: 2024-05-25
  7. *
  8. * */
  9. #ifndef LS_STD_FILE_READER_HPP
  10. #define LS_STD_FILE_READER_HPP
  11. #include "File.hpp"
  12. #include <ls-std/core/Class.hpp>
  13. #include <ls-std/core/interface/IReader.hpp>
  14. #include <ls-std/os/dynamic-goal.hpp>
  15. /*
  16. * @class(name: 'FileReader', package: 'io')
  17. * */
  18. namespace ls::std::io
  19. {
  20. class LS_STD_DYNAMIC_GOAL FileReader : public ls::std::core::Class, public ls::std::core::interface_type::IReader
  21. {
  22. public:
  23. explicit FileReader(const ls::std::io::File &_file);
  24. ~FileReader() noexcept override;
  25. [[nodiscard]] ls::std::core::type::byte_field read() override;
  26. void reset(const ls::std::io::File &_file);
  27. private:
  28. ls::std::io::File file;
  29. };
  30. }
  31. #endif