1: // A class for an R-S flip-flop session.  05/25/98  rj@elilabs.com

  3: #ifndef __rs_ff_session__H__
  4: #define __rs_ff_session__H__

  6: class rs_ff_state;

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

 11: class rs_ff_session : public session {

 13:  public:

 15:   rs_ff_state* current_state;        // the state we are in

 17:   boolean Q, Qbar;                // the output values

 19:   rs_ff_session(rs_ff_state* initial_state); // this is the only valid constructor


 22:   // Do this when we enter a new state
 23:   //
 24:   virtual void entry_action(void);


 27:   // event handlers

 29:   // event S
 30:   //
 31:   virtual void S(void);

 33:   // event Sbar
 34:   //
 35:   virtual void Sbar(void);

 37:   // event R
 38:   //
 39:   virtual void R(void);

 41:   // event Rbar
 42:   //
 43:   virtual void Rbar(void);

 45: };

 47: #endif // __rs_ff_session__H__