15 : _stream(path, std::ios::binary)
33 std::ios::seekdir nativeOrigin = std::ios::beg;
35 nativeOrigin = std::ios::beg;
37 nativeOrigin = std::ios::cur;
39 nativeOrigin = std::ios::end;
41 return (
bool)
_stream.seekg((std::streamsize)offset, nativeOrigin);
46 std::streamsize pos =
_stream.tellg();
47 _stream.seekg(0, std::ios::end);
49 _stream.seekg(pos, std::ios::beg);
54 : _stream(path, std::ios::binary)
60 size_t offsetBefore = (size_t)
_stream.tellp();
61 _stream.write(
static_cast<const char*
>(buffer), (std::streamsize)
size);
62 size_t offsetAfter = (size_t)
_stream.tellp();
63 return offsetAfter - offsetBefore;
73 std::ios::seekdir nativeOrigin = std::ios::beg;
75 nativeOrigin = std::ios::beg;
77 nativeOrigin = std::ios::cur;
79 nativeOrigin = std::ios::end;
81 return (
bool)
_stream.seekp((std::streamsize)offset, nativeOrigin);
SLIOReaderNative(std::string path)
bool seek(size_t offset, Origin origin)
size_t read(void *buffer, size_t size)
size_t write(const void *buffer, size_t size)
bool seek(size_t offset, Origin origin)
SLIOWriterNative(std::string path)