dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hdsd / scd / fsm / scd_cont_state.h
1 #ifndef SCD_CONT_STATE_H
2 #define SCD_CONT_STATE_H
3
4 #include <string>
5
6 #include "scd_simulator.h"
7 #include "fsm/scd_cont_fsm_if.h"
8
9
10 /* forward declaration */
11 class scd_simulator;
12
13
14 /**
15  * Base class of all FSM states.
16  */
17 class scd_cont_state : public scd_cont_fsm_if
18 {
19 public:
20     /**
21      * Constructor.
22      * \param sim the simulation environment
23      */
24     scd_cont_state(scd_simulator& sim): _sim(sim) {}
25
26     virtual ~scd_cont_state() {}
27
28     /**
29      * Returns the name of the state.
30      */
31     const std::string& get_name() const { return _name; }
32
33 protected:
34     scd_simulator& _sim;
35     std::string _name;
36 };
37
38 #endif