FileReader.hpp 897 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-17
  6. * Changed: 2022-05-19
  7. *
  8. * */
  9. #ifndef LS_STD_FILE_READER_HPP
  10. #define LS_STD_FILE_READER_HPP
  11. #include <ls_std/core/Class.hpp>
  12. #include "File.hpp"
  13. #include <ls_std/core/interface/IReader.hpp>
  14. namespace ls
  15. {
  16. namespace std
  17. {
  18. namespace io
  19. {
  20. class FileReader : public ls::std::core::Class, public ls::std::core::interface_type::IReader
  21. {
  22. public:
  23. explicit FileReader(ls::std::io::File &_file);
  24. ~FileReader() override = default;
  25. ls::std::core::type::byte_field read() override;
  26. void reset(ls::std::io::File &_file);
  27. private:
  28. ls::std::io::File file;
  29. static void _init(ls::std::io::File &_file);
  30. };
  31. }
  32. }
  33. }
  34. #endif