58 using size_type = BaseBuffer::size_type;
59 using pos_type = BaseBuffer::pos_type;
60 using offset_type = BaseBuffer::offset_type;
64 ReadBuffer(std::byte
const* data, size_type count);
69 return read(&t,
sizeof(t));
74 ReadBuffer& read(std::ostream& out, size_type count);
77 void readAt(pos_type pos, T& t)
const
79 readAt(pos, &t,
sizeof(t));
82 void readAt(pos_type pos,
void* dest, size_type count)
const;
84 void readAt(pos_type pos, std::ostream& out, size_type count)
const;
87 void readAt(offset_type off, IODir dir, T& t)
const
89 readAt(off, dir, &t,
sizeof(t));
92 void readAt(offset_type off, IODir dir,
void* dest, size_type count)
const;
94 void readAt(offset_type off, IODir dir, std::ostream& out, size_type count)
const;
96 bool readLine(std::string& line);
98 [[nodiscard]] pos_type readPos()
const noexcept;
102 ReadBuffer& readSeek(offset_type off, IODir dir)
noexcept;
105 ReadBuffer& readSeek(T
const& t, pos_type count)
noexcept
107 return readSeek(
sizeof(t) * count);
111 ReadBuffer& readSeek(T
const& t, offset_type count_signed, IODir dir)
noexcept
113 return readSeek(
sizeof(t) * count_signed, dir);
116 [[nodiscard]] size_type readLeft()
const noexcept;