OpenRaw::IO::Stream Class Reference

base virtual class for IO More...

#include <stream.h>

Inheritance diagram for OpenRaw::IO::Stream:

OpenRaw::IO::File OpenRaw::IO::StreamClone List of all members.

Public Types

typedef ::or_error Error

Public Member Functions

 Stream (const char *filename)
virtual ~Stream ()
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

Protected Member Functions

void set_error (Error error)

Detailed Description

base virtual class for IO

Definition at line 38 of file stream.h.


Member Typedef Documentation

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

Error type.

See also:
or_error

Definition at line 50 of file stream.h.


Constructor & Destructor Documentation

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

Construct the file

Parameters:
filename the full uri for the file

Definition at line 28 of file stream.cpp.


Member Function Documentation

virtual int OpenRaw::IO::Stream::close (  )  [pure virtual]

close the file

Implemented in OpenRaw::IO::File, and OpenRaw::IO::StreamClone.

Referenced by OpenRaw::Internals::RawContainer::~RawContainer().

const std::string& OpenRaw::IO::Stream::get_path (  )  const [inline]

get the uri path of the file

Definition at line 71 of file stream.h.

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

virtual Error OpenRaw::IO::Stream::open (  )  [pure virtual]

open the file

Implemented in OpenRaw::IO::File, and OpenRaw::IO::StreamClone.

Referenced by OpenRaw::Internals::RawContainer::RawContainer().

virtual int OpenRaw::IO::Stream::read ( void *  buf,
size_t  count 
) [pure virtual]

read in the file. Semantics are similar to POSIX

Implemented in OpenRaw::IO::File, and OpenRaw::IO::StreamClone.

Referenced by OpenRaw::Internals::RawContainer::fetchData(), OpenRaw::Internals::JFIFContainer::j_fill_input_buffer(), OpenRaw::Internals::IFDDir::load(), OpenRaw::IO::StreamClone::read(), OpenRaw::Internals::CIFF::HeapFileHeader::readFrom(), OpenRaw::Internals::RawContainer::readInt16(), OpenRaw::Internals::RawContainer::readInt32(), OpenRaw::Internals::RawContainer::readUInt16(), and OpenRaw::Internals::RawContainer::readUInt32().

virtual int OpenRaw::IO::Stream::seek ( off_t  offset,
int  whence 
) [pure virtual]

seek in the file. Semantics are similar to POSIX

Implemented in OpenRaw::IO::File, and OpenRaw::IO::StreamClone.

Referenced by OpenRaw::Internals::RawContainer::fetchData(), OpenRaw::Internals::IFDFileContainer::getDirectoryDataSize(), OpenRaw::Internals::IFDDir::load(), OpenRaw::Internals::IFDDir::nextIFD(), OpenRaw::IO::StreamClone::open(), OpenRaw::Internals::RawContainer::RawContainer(), and OpenRaw::IO::StreamClone::seek().


The documentation for this class was generated from the following files:
Generated on Sat Jan 27 11:36:14 2007 for libopenraw by  doxygen 1.4.7