libcdoc  0.1.8
libcdoc::MultiDataSource Struct Referenceabstract

An abstract base class for multi-stream sources. More...

#include <Io.h>

Inheritance diagram for libcdoc::MultiDataSource:
libcdoc::DataSource libcdoc::FileListSource

Public Member Functions

virtual result_t getNumComponents ()
 
virtual result_t next (std::string &name, int64_t &size)=0
 
result_t next (FileInfo &info)
 
- Public Member Functions inherited from libcdoc::DataSource
 DataSource ()=default
 
virtual ~DataSource ()=default
 
virtual result_t seek (size_t pos)
 set stream input pointer More...
 
virtual result_t read (uint8_t *dst, size_t size)
 read bytes from input object More...
 
virtual bool isError ()
 check whether DataConsumer is in error state More...
 
virtual bool isEof ()
 check whether DataConsumer is reached to the end of data More...
 
virtual std::string getLastErrorStr (result_t code) const
 get textual description of the last error More...
 
result_t skip (size_t size)
 skip specified number of bytes More...
 
result_t readAll (DataConsumer &dst)
 read all data and writes to output object More...
 
 DataSource (const DataSource &)=delete
 
DataSourceoperator= (const DataSource &)=delete
 

Detailed Description

An abstract base class for multi-stream sources.

A next sub-stream is made available by nextFile. The initial state of MultiDataSource does not have any sub-stream open (i.e. the to get the first one, nextFile has to be called).

Member Function Documentation

◆ getNumComponents()

virtual result_t libcdoc::MultiDataSource::getNumComponents ( )
inlinevirtual

Reimplemented in libcdoc::FileListSource.

References libcdoc::NOT_IMPLEMENTED.

◆ next() [1/2]

virtual result_t libcdoc::MultiDataSource::next ( std::string &  name,
int64_t &  size 
)
pure virtual

Implemented in libcdoc::FileListSource.

◆ next() [2/2]

result_t libcdoc::MultiDataSource::next ( FileInfo info)
inline

The documentation for this struct was generated from the following file: