34#ifndef SOMAIO_IO_READERALGORITHM_H
35#define SOMAIO_IO_READERALGORITHM_H
39#include <cartobase/config/cartobase_config.h>
40#include <cartobase/algorithm/algorithm.h>
std::map< std::string, ProcFunc > _execs
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.
const std::map< std::string, ProcFunc > & algorithmTypes() const
Query registered process types.
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.