2 #include "ErrorHandler/MessageAnalyzer/ma_action.h"
4 using namespace novadaq::errorhandler;
10 void ma_action_factory::reg(std::string
const& func_name, gen_act_t f)
12 get_map().insert(std::make_pair(func_name, f));
16 ma_action_factory::create_instance(std::string
const& func_name,
ma_rule const* rule, pset_t
const& pset)
18 gen_map_t::iterator it = get_map().find(func_name);
20 if (it != get_map().end())
21 return it->second(rule, pset);
23 throw std::runtime_error(
"unknown action name while creating instance of ma_action");
base class - all customized fucntions are inherited from it