FACT++  1.0
StateMachine.h
Go to the documentation of this file.
1 #ifndef FACT_StateMachine
2 #define FACT_StateMachine
3 
4 #include "StateMachineImp.h"
5 
7 {
8 protected:
9  EventImp *CreateEvent(const std::string &name, const std::string &fmt);
10 
11 public:
12  StateMachine(std::ostream &out, const std::string &name="") :
13  StateMachineImp(out, name)
14  {
15  }
16 
17  bool ProcessCommand(const std::string &str, const char *ptr, size_t siz);
18  bool ProcessCommand(const EventImp &evt);
19  bool ProcessCommand(const std::string &str) { return ProcessCommand(str, 0, 0); }
20 
21 };
22 
23 #endif
A general base-class describing events issues in a state machine.
Definition: EventImp.h:11
Base class for a state machine implementation.
Class for a state machine implementation just on the console.
Definition: StateMachine.h:6
bool ProcessCommand(const std::string &str, const char *ptr, size_t siz)
Definition: StateMachine.cc:63
char str[80]
Definition: test_client.c:7
StateMachine(std::ostream &out, const std::string &name="")
Definition: StateMachine.h:12
EventImp * CreateEvent(const std::string &name, const std::string &fmt)
Definition: StateMachine.cc:39
bool ProcessCommand(const std::string &str)
Definition: StateMachine.h:19