adtffile  v0.7.1
adtf::dat::ant::Reader Class Referenceabstract

#include <reader.h>

Inheritance diagram for adtf::dat::ant::Reader:
Collaboration diagram for adtf::dat::ant::Reader:

Public Member Functions

virtual std::string getReaderIdentifier () const =0
 
virtual std::pair< bool, std::string > isCompatible (const std::string &url) const =0
 
virtual void open (const std::string &url)=0
 
virtual std::vector< adtf_file::StreamgetStreams () const =0
 
virtual double getProgress () const =0
 
virtual adtf_file::FileItem getNextItem ()=0
 
- Public Member Functions inherited from adtf::dat::ant::Configurable
virtual Configuration getConfiguration () const
 
virtual void setConfiguration (const Configuration &new_configuration)
 

Detailed Description

Base class for readers.

A reader provides streams of StreamTypes, Samples and Triggers.

Member Function Documentation

◆ getNextItem()

virtual adtf_file::FileItem adtf::dat::ant::Reader::getNextItem ( )
pure virtual
Returns
The next item from the source.

Implemented in adtf::dat::ant::ReaderWrapper, adtf::dat::ant::OffsetReaderWrapper, and CsvReader.

◆ getProgress()

virtual double adtf::dat::ant::Reader::getProgress ( ) const
pure virtual
Returns
The current progress in the range [0.0, 1.0].

Implemented in adtf::dat::ant::ReaderWrapper, adtf::dat::ant::OffsetReaderWrapper, and CsvReader.

◆ getReaderIdentifier()

virtual std::string adtf::dat::ant::Reader::getReaderIdentifier ( ) const
pure virtual
Returns
The name of reader implementation.

Implemented in adtf::dat::ant::ReaderWrapper, adtf::dat::ant::OffsetReaderWrapper, and CsvReader.

◆ getStreams()

virtual std::vector<adtf_file::Stream> adtf::dat::ant::Reader::getStreams ( ) const
pure virtual
Returns
All available streams in the opened source.

Implemented in adtf::dat::ant::ReaderWrapper, adtf::dat::ant::OffsetReaderWrapper, and CsvReader.

◆ isCompatible()

virtual std::pair<bool, std::string> adtf::dat::ant::Reader::isCompatible ( const std::string &  url) const
pure virtual

This is called to check, whether a reader can handle a given URL.

Parameters
[in]urlThe URL, i.e. a filename.
Returns
The first value describes whether the reader can handle the url or not, the second is an error message in case that it can't.

Implemented in adtf::dat::ant::ReaderWrapper, adtf::dat::ant::OffsetReaderWrapper, and CsvReader.

◆ open()

virtual void adtf::dat::ant::Reader::open ( const std::string &  url)
pure virtual

Called to open the given URL.

Parameters
[in]urlThe URL, what else.

Implemented in adtf::dat::ant::ReaderWrapper, adtf::dat::ant::OffsetReaderWrapper, and CsvReader.


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