ADTF File Library
Loading...
Searching...
No Matches
adtfdat_processing::ProcessorFactories Class Reference

#include <processor.h>

Public Member Functions

void add (const std::shared_ptr< const ProcessorFactory > &factory)
 
std::shared_ptr< ProcessormakeProcessor (const std::string &processor_id) const
 make a processor with the given processor_id
 
void getCapableProcessors (const adtf_file::Stream &stream, const std::function< bool(const std::shared_ptr< Processor > &)> callback_processor, const adtf_file::Configuration &configuration={}) const
 Get the capable and compatible processors for the given stream. It will make all capable processors and return it to the callback_processor. As long as the callback_processor return true further processors may be created.
 
const std::unordered_map< std::string, std::shared_ptr< const ProcessorFactory > > & getFactories () const
 Get the Factories.
 

Detailed Description

A container for processor factories.

Member Function Documentation

◆ add()

void adtfdat_processing::ProcessorFactories::add ( const std::shared_ptr< const ProcessorFactory > & factory)
inline

Adds the given factory to the container-

Parameters
[in]factoryThe factory to add.

◆ getCapableProcessors()

void adtfdat_processing::ProcessorFactories::getCapableProcessors ( const adtf_file::Stream & stream,
const std::function< bool(const std::shared_ptr< Processor > &)> callback_processor,
const adtf_file::Configuration & configuration = {} ) const
inline

Get the capable and compatible processors for the given stream. It will make all capable processors and return it to the callback_processor. As long as the callback_processor return true further processors may be created.

Remarks
If no processor is compatible with stream no callback is made!
Parameters
[in]streamThe stream.
callback_processorThe callback to return the created and compatible processors.
configurationThe processors configuration to set before check compatibility.

◆ getFactories()

const std::unordered_map< std::string, std::shared_ptr< const ProcessorFactory > > & adtfdat_processing::ProcessorFactories::getFactories ( ) const
inline

Get the Factories.

Returns
const std::unordered_map<std::string, std::shared_ptr<const ProcessorFactory>>&

◆ makeProcessor()

std::shared_ptr< Processor > adtfdat_processing::ProcessorFactories::makeProcessor ( const std::string & processor_id) const
inline

make a processor with the given processor_id

Parameters
processor_idThe id to create the processor for
Returns
std::shared_ptr<Processor>

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