2 #ifndef vil_stream_fstream_h_ 3 #define vil_stream_fstream_h_ 6 #ifdef VIL_USE_FSTREAM64 8 #endif //VIL_USE_FSTREAM64 17 # include <vcl_msvc_warnings.h> 20 #include <vxl_config.h> 28 #if defined(_WIN32) && VXL_USE_WIN_WCHAR_T 33 bool ok()
const override {
return f_.good(); }
48 mutable std::fstream
f_;
53 #endif // vil_stream_fstream_h_ Stream interface for VIL image loaders.
std::ios::openmode flags_
vil_streampos file_size() const override
Amount of data in the stream.
vil_streampos write(void const *buf, vil_streampos n) override
Write n bytes from buf. Returns number of bytes written.
vil_streampos tell() const override
Return file pointer.
A vil_stream implementation using std::fstream.
vil_streampos read(void *buf, vil_streampos n) override
Read n bytes into buf. Returns number of bytes read.
Stream interface for VIL image loaders.
bool ok() const override
Return false if the stream is broken.
~vil_stream_fstream() override
void seek(vil_streampos position) override
Goto file pointer.
std::fstream & underlying_stream()
vil_stream_fstream(char const *filename, char const *mode)