libcdoc 0.1.8
libcdoc::MultiDataSource Struct Referenceabstract

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

#include <Io.h>

Inherits libcdoc::DataSource.

Inherited by 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
 
virtual result_t read (uint8_t *dst, size_t size)
 read bytes from input object
 
virtual bool isError ()
 check whether DataConsumer is in error state
 
virtual bool isEof ()
 check whether DataConsumer is reached to the end of data
 
virtual std::string getLastErrorStr (result_t code) const
 get textual description of the last error
 
result_t skip (size_t size)
 skip specified number of bytes
 
result_t readAll (DataConsumer &dst)
 read all data and writes to output object
 
 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]

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

◆ next() [2/2]

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

Implemented in libcdoc::FileListSource.


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