1: // A state in an RS flip flip state graph.  05/25/98 rj@elilabs.com

  3: #ifndef __rs_ff_state__H__
  4: #define __rs_ff_state__H__

  6: class rs_ff_session;

  8: #include "mytypes.H"
  9: #include "state.H"

 11: class rs_ff_state : public state {

 13: public:

 15:   rs_ff_state();

 17:   ~rs_ff_state();

 19:   // The entry action.
 20:   //
 21:   boolean my_Q;
 22:   boolean my_Qbar;
 23:   virtual void entry_action(rs_ff_session* current_session);


 26:   // The event sub-handlers.

 28:   // event S
 29:   //
 30:   boolean S__guard_value;
 31:   rs_ff_state* S__next_value;
 32:   virtual boolean S__guard(session* current_session);
 33:   virtual void S__exit_action(session* current_session);
 34:   virtual rs_ff_state* S__next_state(void);

 36:   // event Sbar
 37:   //
 38:   boolean Sbar__guard_value;
 39:   rs_ff_state* Sbar__next_value;
 40:   virtual boolean Sbar__guard(session* current_session);
 41:   virtual void Sbar__exit_action(session* current_session);
 42:   virtual rs_ff_state* Sbar__next_state(void);

 44:   // event R
 45:   //
 46:   boolean R__guard_value;
 47:   rs_ff_state* R__next_value;
 48:   virtual boolean R__guard(session* current_session);
 49:   virtual void R__exit_action(session* current_session);
 50:   virtual rs_ff_state* R__next_state(void);

 52:   // event Rbar
 53:   //
 54:   boolean Rbar__guard_value;
 55:   rs_ff_state* Rbar__next_value;
 56:   virtual boolean Rbar__guard(session* current_session);
 57:   virtual void Rbar__exit_action(session* current_session);
 58:   virtual rs_ff_state* Rbar__next_state(void);

 60:   // Initializer.
 61:   //
 62:   void set(
 63:       // output
 64:       boolean Q,
 65:       boolean Qbar,
 66:       // guard
 67:       boolean gS,
 68:       boolean gSbar,
 69:       boolean gR,
 70:       boolean gRbar,
 71:       // next state
 72:       rs_ff_state* S,
 73:       rs_ff_state* Sbar,
 74:       rs_ff_state* R,
 75:       rs_ff_state* Rbar
 76:       );

 78: };

 80: #endif // __rs_ff_state__H__