34 #ifndef SOMAIO_IO_READERALGORITHM_H
35 #define SOMAIO_IO_READERALGORITHM_H
Link mechanism between a data source or file and an algorithm operating on arbitrary data types.
std::map< std::string, ProcFunc > _execs
const std::map< std::string, ProcFunc > & algorithmTypes() const
Query registered process types.
void registerAlgorithmType(const std::string &objectType, ProcFunc procFunc)
Registers the algo function to call on a given object type (just fills the map)
ReaderAlgorithm(const std::string &algoname)
bool execute(carto::Object header, carto::rc_ptr< DataSource > source)
Same as above but the header has already been read (or hand-made to fake it!)
virtual ~ReaderAlgorithm()
bool execute(const std::string &filename)
Executes the algo on the object type found in the given file.
bool(* ProcFunc)(ReaderAlgorithm &, carto::Object header, carto::rc_ptr< DataSource > source)
Algorithm function type.
bool execute(carto::rc_ptr< DataSource > stream)
same as above but uses a DataSource as input
bool execute(carto::rc_ptr< DataSourceInfo > dsi)
same as above but uses DataSourceInfo as input.