libopenraw
Public Types | Public Member Functions | Protected Member Functions | List of all members
OpenRaw::IO::Stream Class Referenceabstract

base virtual class for IO More...

#include <stream.h>

Inheritance diagram for OpenRaw::IO::Stream:
OpenRaw::IO::File OpenRaw::IO::MemStream OpenRaw::IO::StreamClone

Public Types

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 () throw (Internals::IOException)
 

Protected Member Functions

void set_error (Error error)
 

Detailed Description

base virtual class for IO

Definition at line 40 of file stream.h.

Member Typedef Documentation

typedef ::or_error OpenRaw::IO::Stream::Error

Error type.

See Also
or_error

Definition at line 52 of file stream.h.

Constructor & Destructor Documentation

OpenRaw::IO::Stream::Stream ( const char *  filename)

Construct the file

Parameters
filenamethe full uri for the file

Definition at line 28 of file stream.cpp.

Member Function Documentation

virtual int OpenRaw::IO::Stream::close ( )
pure virtual
const std::string& OpenRaw::IO::Stream::get_path ( ) const
inline

get the uri path of the file

Definition at line 73 of file stream.h.

Referenced by OpenRaw::IO::File::open().

virtual Error OpenRaw::IO::Stream::open ( )
pure virtual
virtual int OpenRaw::IO::Stream::read ( void *  buf,
size_t  count 
)
pure virtual
virtual int OpenRaw::IO::Stream::seek ( off_t  offset,
int  whence 
)
pure virtual

The documentation for this class was generated from the following files: