libopenraw
Public Member Functions | List of all members
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.

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.

◆ open()

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

open the file

Implements OpenRaw::IO::Stream.

Definition at line 48 of file streamclone.cpp.

◆ 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.

◆ 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.


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