Abstract base class for a multi reader. To use this class you need to override MultiFileReader::getFactories.
More...
#include <multi_file_reader.h>
Abstract base class for a multi reader. To use this class you need to override MultiFileReader::getFactories.
◆ addFile()
Adds a file to the multi file reader and opens the file if supported.
- Parameters
-
file_name | the file path of the file |
sample_factory | the sample factory to use for open call |
stream_type_factory | the stream type factory for open call |
- Returns
- std::shared_ptr<adtf_file::Reader> a valid reader if file is supported.
- Exceptions
-
std::runtime_error | if no capable reader found for the given file_name . |
◆ getFactories()
◆ getItemCount()
std::optional<uint64_t> adtfdat_processing::MultiFileReader::getItemCount |
( |
| ) |
const |
|
overridevirtual |
Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of all streams.
- Returns
- std::optional<uint64_t>
Reimplemented from adtf_file::Reader.
◆ getNextItem()
Returns the next item of the file and increase the item index to the next one. These can be samples, streamtypes or trigger.
- Returns
- The next item.
- Exceptions
-
exceptions::EndOfFile | if end of file was reached |
std::exception | based exception for any other implementation dependent case to identify error on getNextItem call |
Implements adtf_file::Reader.
◆ getProgress()
std::optional<double> adtfdat_processing::MultiFileReader::getProgress |
( |
| ) |
const |
|
overridevirtual |
Get the Progress, a relative file position between 0.0 and 1.0.
- Returns
- std::optional<double> The relative value between 0.0 and 1.0 where internal file position is.
Reimplemented from adtf_file::Reader.
◆ getReaderIdentifier()
std::string adtfdat_processing::MultiFileReader::getReaderIdentifier |
( |
| ) |
const |
|
overridevirtual |
◆ getStreams()
std::vector<adtf_file::Stream> adtfdat_processing::MultiFileReader::getStreams |
( |
| ) |
const |
|
overridevirtual |
Get the Streams.
- Returns
- std::vector<Stream> A vector of all available streams.
Reimplemented from adtf_file::Reader.
◆ open()
opens a file by the given filename. The given factories must be used to create samples and streamtypes for the getNextItem call
- Parameters
-
filename | The file to open |
sample_factory | The sample factory to create samples for the getNextItem call. |
stream_type_factory | The stream type factory to create streamtype for the getNextItem call. |
- Exceptions
-
std::exception | based exception for any other implementation dependent case to identify error on open call |
Implements adtf_file::Reader.
Reimplemented in adtfdat_processing::ReferencedFilesReader.
The documentation for this class was generated from the following file: