15 std::cout <<
"Error: " << std::endl;
38 return ptr->second.maker(module_instance_name, process);
43 std::cout <<
"[ ProcessorFactory ]: Loading library " << libname << std::endl;
48 void* handle = dlopen(libname.c_str(), RTLD_NOW);
50 std::cout << dlerror() << std::endl;
51 throw std::runtime_error(
"[ ProcessorFactory ]: Error loading library " + libname +
": " + dlerror());
Class which provides a singleton module factory that creates Processor objects.
Processor * ProcessorMaker(const std::string &name, Process &process)
void loadLibrary(const std::string &libname)
Load a library.
std::map< std::string, ProcessorInfo > module_info_
std::set< std::string > libs_loaded_
void registerProcessor(const std::string &classname, ProcessorMaker *maker)
Register the event processor.
Processor * createProcessor(const std::string &classname, const std::string &module_instance_name, Process &process)
Make an event processor.
Base class for all event processing components.
Processor info container to hold classname, class type and maker.