FileWriter.hpp 737 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-17
  6. * Changed: 2021-05-01
  7. *
  8. * */
  9. #ifndef LS_STD_FILE_WRITER_HPP
  10. #define LS_STD_FILE_WRITER_HPP
  11. #include <ls_std/base/Class.hpp>
  12. #include "IWriter.hpp"
  13. #include "File.hpp"
  14. namespace ls_std
  15. {
  16. class FileWriter : public ls_std::Class, public ls_std::IWriter
  17. {
  18. public:
  19. explicit FileWriter(ls_std::File &_file);
  20. ~FileWriter() override = default;
  21. void reset(ls_std::File &_file);
  22. bool write(const ls_std::byte_field &_data) override;
  23. private:
  24. ls_std::File file;
  25. static void _init(ls_std::File &_file);
  26. };
  27. }
  28. #endif