|
libopenraw
0.3.7
|
base virtual class for IO More...
#include <stream.hpp>
Public Types | |
| typedef std::shared_ptr< Stream > | Ptr |
| typedef ::or_error | Error |
| Error type. More... | |
Public Member Functions | |
| Stream (const char *filename) | |
| Construct the stream. More... | |
| Stream (const Stream &f)=delete | |
| Stream & | operator= (const Stream &)=delete |
| virtual Error | open ()=0 |
| open the file | |
| virtual int | close ()=0 |
| close the file | |
| virtual int | seek (off_t offset, int whence)=0 |
| seek in the file. Semantics are similar to POSIX lseek() | |
| virtual int | read (void *buf, size_t count)=0 |
| read in the file. Semantics are similar to POSIX read() | |
| virtual off_t | filesize ()=0 |
| Return the filesize. | |
| Error | get_error () const |
| Obtain the last error. | |
| const std::string & | get_path () const |
| Get the uri path of the file. | |
| uint8_t | readByte () noexcept(false) |
| Read a single byte. | |
Protected Member Functions | |
| void | set_error (Error error) |
| Set the error. This is calld by implementations. | |
base virtual class for IO
Definition at line 43 of file stream.hpp.
| typedef ::or_error OpenRaw::IO::Stream::Error |
| typedef std::shared_ptr<Stream> OpenRaw::IO::Stream::Ptr |
Shared Ptr stream type
Definition at line 47 of file stream.hpp.
| OpenRaw::IO::Stream::Stream | ( | const char * | filename | ) |
Construct the stream.
| filename | the full uri for the file |
Definition at line 30 of file stream.cpp.