adtf_file_library
0.13.1
|
#include <reader.h>
Public Member Functions | |
virtual std::string | getReaderIdentifier () const =0 |
Get the Reader Identifier of the Reader. More... | |
virtual void | open (const std::string &filename, std::shared_ptr< SampleFactory > sample_factory, std::shared_ptr< StreamTypeFactory > stream_type_factory)=0 |
opens a file by the given filename. The given factories must be used to create samples and streamtypes for the getNextItem call More... | |
virtual FileItem | getNextItem ()=0 |
virtual uint32_t | getFileVersion () const |
virtual std::string | getDescription () const |
virtual std::vector< Extension > | getExtensions () const |
Get the Extensions if any. More... | |
virtual std::vector< Stream > | getStreams () const |
Get the Streams. More... | |
virtual std::optional< uint64_t > | getItemCount () const |
Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of all streams. More... | |
virtual std::optional< double > | getProgress () const |
Get the Progress, a relative file position between 0.0 and 1.0. More... | |
Public Member Functions inherited from adtf_file::Configurable | |
virtual | ~Configurable ()=default |
DTOR. | |
virtual const Configuration & | getConfiguration () const |
virtual void | setConfiguration (const Configuration &configuration) |
This is the base class for implementing a file reader.
Please take a look at the trigonomerty reader example to get an idea on how to implement your own.
|
inlinevirtual |
Reimplemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::OffsetReaderWrapper, and adtf_file::ADTFDatFileReader.
|
inlinevirtual |
Get the Extensions if any.
Reimplemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::OffsetReaderWrapper, and adtf_file::ADTFDatFileReader.
|
inlinevirtual |
The file version with respect to ADTF DAT Format. When implementing a reader yourself
ifhd::v201_v301::version_id
if you do not explicitly create trigger items.ifhd::v500::version_id
otherwise. Reimplemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::OffsetReaderWrapper, and adtf_file::ADTFDatFileReader.
|
inlinevirtual |
Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of all streams.
Reimplemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::MultiFileReader, and adtf_file::ADTFDatFileReader.
|
pure virtual |
Returns the next item of the file and increase the item index to the next one. These can be samples, streamtypes or trigger.
exceptions::EndOfFile | if end of file was reached |
std::exception | based exception for any other implementation dependent case to identify error on getNextItem call |
Implemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::MultiFileReader, and adtf_file::ADTFDatFileReader.
|
inlinevirtual |
Get the Progress, a relative file position between 0.0 and 1.0.
Reimplemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::MultiFileReader, and adtf_file::ADTFDatFileReader.
|
pure virtual |
Get the Reader Identifier of the Reader.
Implemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::ReferencedFilesReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::MultiFileReader, and adtf_file::ADTFDatFileReader.
|
inlinevirtual |
Get the Streams.
Reimplemented in adtfdat_processing::TimeExtensionReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::MultiFileReader, and adtf_file::ADTFDatFileReader.
|
pure virtual |
opens a file by the given filename. The given factories must be used to create samples and streamtypes for the getNextItem call
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. |
std::exception | based exception for any other implementation dependent case to identify error on open call |
Implemented in adtf_file::ADTFDatFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::TimeExtensionReader, adtfdat_processing::ReferencedFilesReader, and adtfdat_processing::MultiFileReader.