1 #include "knowrob/DataSourceHandler.h"
2 #include "knowrob/integration/python/utils.h"
12 if (dataSource->format().empty()) {
17 return it->second(dataSource);
32 class_<DataSourceHandler, std::shared_ptr<DataSourceHandler>>(
"DataSourceHandler", init<>())
33 .def(
"addDataHandler", +[]
39 return fn(dataSource);
void addDataHandler(const std::string &format, const DataSourceLoader &fn)
virtual bool loadDataSourceWithUnknownFormat(const DataSourcePtr &)
std::map< std::string, DataSourceLoader > dataSourceHandler_
bool loadDataSource(const DataSourcePtr &dataSource)
bool hasDataHandler(const DataSourcePtr &dataSource) const
FunctionRule & function()
void createType< DataSourceHandler >()
std::shared_ptr< DataSource > DataSourcePtr