libopenraw
|
base virtual class for IO More...
#include <stream.hpp>
Public Types | |
typedef std::shared_ptr< Stream > | Ptr |
typedef ::or_error | Error |
Public Member Functions | |
Stream (const char *filename) | |
virtual Error | open ()=0 |
virtual int | close ()=0 |
virtual int | seek (off_t offset, int whence)=0 |
virtual int | read (void *buf, size_t count)=0 |
virtual off_t | filesize ()=0 |
Error | get_error () |
const std::string & | get_path () const |
uint8_t | readByte () noexcept(false) |
Protected Member Functions | |
void | set_error (Error error) |
base virtual class for IO
Definition at line 41 of file stream.hpp.
typedef ::or_error OpenRaw::IO::Stream::Error |
OpenRaw::IO::Stream::Stream | ( | const char * | filename | ) |
Construct the file
filename | the full uri for the file |
Definition at line 30 of file stream.cpp.
References read().
Referenced by get_path().
|
pure virtual |
close the file
Implemented in OpenRaw::IO::File, OpenRaw::IO::MemStream, and OpenRaw::IO::StreamClone.
|
inline |
get the uri path of the file
Definition at line 75 of file stream.hpp.
References Stream().
Referenced by OpenRaw::IO::File::open().
|
pure virtual |
open the file
Implemented in OpenRaw::IO::File, OpenRaw::IO::MemStream, and OpenRaw::IO::StreamClone.
|
pure virtual |
read in the file. Semantics are similar to POSIX read()
Implemented in OpenRaw::IO::File, OpenRaw::IO::MemStream, and OpenRaw::IO::StreamClone.
Referenced by Stream().
|
pure virtual |
seek in the file. Semantics are similar to POSIX lseek()
Implemented in OpenRaw::IO::File, OpenRaw::IO::MemStream, and OpenRaw::IO::StreamClone.
Referenced by OpenRaw::Internals::LJpegDecompressor::setSlices().