- struct Exception : std::runtime_error
- {
- explicit Exception(const std::string& what_arg) :
- std::runtime_error(what_arg) {}
- };
+ // set this machine in motion
+ void run();
+
+ Dispatch::Handler addHandler(const std::string& event,
+ const Dispatch::Function& callback);
+ Dispatch::Handler addHandler(const std::string& event,
+ const Dispatch::Function& callback, Dispatch::Handler handler);
+
+ void dispatch(const std::string& event,
+ const Dispatch::Message* message = 0);