29 #ifndef AGS_SHARED_UTIL_BUFFEREDSTREAM_H 30 #define AGS_SHARED_UTIL_BUFFEREDSTREAM_H 32 #include "common/std/vector.h" 33 #include "ags/shared/util/file_stream.h" 34 #include "ags/shared/util/file.h" 43 static const size_t BufferSize = 1024u * 8;
50 BufferedStream(
const String &file_name, FileOpenMode open_mode, FileWorkMode work_mode, DataEndianess stream_endianess = kLittleEndian);
54 bool EOS()
const override;
56 soff_t GetLength()
const override;
58 soff_t GetPosition()
const override;
60 void Close()
override;
61 bool Flush()
override;
63 size_t Read(
void *buffer,
size_t size)
override;
64 int32_t ReadByte()
override;
65 size_t Write(
const void *buffer,
size_t size)
override;
66 int32_t WriteByte(uint8_t b)
override;
68 bool Seek(soff_t offset, StreamSeek origin)
override;
76 void FillBufferFromPosition(soff_t position);
78 void FlushBuffer(soff_t position);
81 soff_t _bufferPosition = 0;
90 FileOpenMode open_mode, FileWorkMode work_mode, DataEndianess stream_endianess = kLittleEndian);
Definition: achievements_tables.h:27
Definition: file_stream.h:35
Definition: buffered_stream.h:40
Definition: buffered_stream.h:87