libopenraw
OpenRaw::IO::StreamClone Class Reference

cloned stream. Allow reading from a different offset More...

#include <streamclone.hpp>

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

Public Member Functions

 StreamClone (const Stream::Ptr &clone, off_t offset)
 StreamClone (const StreamClone &f)=delete
StreamCloneoperator= (const StreamClone &)=delete
virtual Error open () override
virtual int close () override
virtual int seek (off_t offset, int whence) override
virtual int read (void *buf, size_t count) override
virtual off_t filesize () override
Public Member Functions inherited from OpenRaw::IO::Stream
 Stream (const char *filename)
Error get_error ()
const std::string & get_path () const
uint8_t readByte () noexcept(false)

Additional Inherited Members

Public Types inherited from OpenRaw::IO::Stream
typedef std::shared_ptr< StreamPtr
typedef ::or_error Error
Protected Member Functions inherited from OpenRaw::IO::Stream
void set_error (Error error)

Detailed Description

cloned stream. Allow reading from a different offset

Definition at line 36 of file streamclone.hpp.

Constructor & Destructor Documentation

◆ StreamClone()

OpenRaw::IO::StreamClone::StreamClone ( const Stream::Ptr & clone,
off_t offset )

Definition at line 35 of file streamclone.cpp.

◆ ~StreamClone()

OpenRaw::IO::StreamClone::~StreamClone ( )
virtual

Definition at line 43 of file streamclone.cpp.

Member Function Documentation

◆ close()

int OpenRaw::IO::StreamClone::close ( )
overridevirtual

close the file

Implements OpenRaw::IO::Stream.

Definition at line 61 of file streamclone.cpp.

References close().

Referenced by close().

◆ filesize()

off_t OpenRaw::IO::StreamClone::filesize ( )
overridevirtual

Implements OpenRaw::IO::Stream.

Definition at line 93 of file streamclone.cpp.

◆ open()

Stream::Error OpenRaw::IO::StreamClone::open ( )
overridevirtual

open the file

Implements OpenRaw::IO::Stream.

Definition at line 48 of file streamclone.cpp.

References open().

Referenced by open().

◆ read()

int OpenRaw::IO::StreamClone::read ( void * buf,
size_t count )
overridevirtual

read in the file. Semantics are similar to POSIX read()

Implements OpenRaw::IO::Stream.

Definition at line 83 of file streamclone.cpp.

References read().

Referenced by read().

◆ seek()

int OpenRaw::IO::StreamClone::seek ( off_t offset,
int whence )
overridevirtual

seek in the file. Semantics are similar to POSIX lseek()

Implements OpenRaw::IO::Stream.

Definition at line 68 of file streamclone.cpp.

References seek().

Referenced by seek().


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