FileWriter.hpp 719 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-17
  6. * Changed: 2020-11-26
  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. class FileWriter : public Class, public IWriter {
  16. public:
  17. explicit FileWriter(ls_std::File& _file);
  18. ~FileWriter() override = default;
  19. void reset(ls_std::File& _file);
  20. bool write(const ls_std::byte_field& _data) override;
  21. private:
  22. ls_std::File file;
  23. static void _init(ls_std::File& _file);
  24. };
  25. }
  26. #endif