SLIOStream implementation for writing to native files.
More...
#include <SLIONative.h>
SLIOStream implementation for writing to native files.
Definition at line 32 of file SLIONative.h.
◆ SLIOWriterNative()
SLIOWriterNative::SLIOWriterNative |
( |
std::string |
path | ) |
|
◆ flush()
void SLIOWriterNative::flush |
( |
| ) |
|
|
virtual |
◆ seek()
bool SLIOWriterNative::seek |
( |
size_t |
offset, |
|
|
Origin |
origin |
|
) |
| |
|
virtual |
Reimplemented from SLIOStream.
Definition at line 71 of file SLIONative.cpp.
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);
◆ tell()
size_t SLIOWriterNative::tell |
( |
| ) |
|
|
virtual |
◆ write()
size_t SLIOWriterNative::write |
( |
const void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
virtual |
Reimplemented from SLIOStream.
Definition at line 58 of file SLIONative.cpp.
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;
◆ _stream
std::ofstream SLIOWriterNative::_stream |
|
private |
The documentation for this class was generated from the following files: