1 #ifndef FACT_DimLoggerCheck 2 #define FACT_DimLoggerCheck 15 typedef std::function<int(const std::map<const std::string, const int> &)>
callback;
20 std::map<const std::string, const int>
list;
29 map<string, int> vsubs;
30 for (
auto it=ltxt.begin(); it!=ltxt.end(); it++)
34 if (col.size()==2 && col[0].substr(0, name.size()+1)==name+
"/")
35 vsubs[col[0]] = atoi(col[1].c_str());
39 for (
auto it=vserv.begin(); it!=vserv.end(); it++)
41 const auto is = vsubs.find(*it);
42 list.insert(make_pair(it->substr(name.size()+1), is==vsubs.end() ? -2 : is->second));
45 list.erase(
"STATE_LIST");
61 imp.
Subscribe(
"DATA_LOGGER/SUBSCRIPTIONS")
70 const std::map<const std::string, const int> &
GetList()
const {
return list; }
void SetCallback(const callback &cb)
static const std::set< std::string > & GetServices()
A general base-class describing events issues in a state machine.
Base class for a state machine implementation.
std::string GetString() const
std::function< int(const std::map< const std::string, const int > &)> callback
std::map< const std::string, const int > list
virtual ~DimLoggerCheck()
const std::map< const std::string, const int > & GetList() const
DimLoggerCheck(const std::string &n)
EventImp & Subscribe(const std::string &name)
virtual void Subscribe(StateMachineImp &imp)
virtual int Handler(const EventImp &evt)
std::function< int(const EventImp &)> Wrap(const std::function< int(const EventImp &)> &func)