21 #ifndef OBJECTREACTOR_HH_INCLUDED
22 #define OBJECTREACTOR_HH_INCLUDED
34 template <
typename DestType>
44 for (
const auto& p : rhs.m_actions)
45 m_actions.insert(std::make_pair(p.first, ReactorPtr(p.second->Clone())));
49 m_actions(std::move(rhs.m_actions)),
55 ObjectReactor& Map(
const std::string& key, T DestType::*member)
71 auto i = m_actions.find(std::string(data,len)) ;
72 m_next = (i != m_actions.end() ? i->second.get() :
nullptr);
74 else if (m_next !=
nullptr)
83 m_next->On(s, event, data, len);
97 typedef std::unique_ptr<Reactor> ReactorPtr;
99 std::map<std::string, ReactorPtr> m_actions;
Literal value "false".
Definition: JSON_checker.h:36
Definition: JSON_checker.h:30
Definition: Reactor.hh:49
Literal value "null".
Definition: JSON_checker.h:34
Start of a JSON object.
Definition: JSON_checker.h:25
Definition: JSON_checker.h:32
Literal value "true".
Definition: JSON_checker.h:35
JSON_event
Definition: JSON_checker.h:21
Definition: Reactor.hh:42
Definition: JSON_checker.h:26
Definition: ObjectReactor.hh:35
Definition: Reactor.hh:35