#ifndef GNUGPP
 #ifndef BOOL_DEFN
  #include "bool.h"
 #endif
#endif

#define MAX_WAIT 10.0

//----------------------------------------------------------------------
// Events--the general class on which the specific event types are based
//----------------------------------------------------------------------

class eventClass {
        double localTime;
public:
        eventClass (double T=0.0);
        inline double whatTime (); // when it happens
        inline void setTime (const double newTime = 0);
        virtual void makeItHappen (); // the event routine
        virtual const char * blurb (); // an identifier for the event
};

//---------------------------------------------------------------------------
// Entities: clients 
//---------------------------------------------------------------------------
enum wait_status { WAITING, BALKED, SERVED };

class earlier {
public:
 static bool lt(eventClass, eventClass);
 static bool lt(eventClass*, eventClass*);
}; 

class clientClass {
private:
        double localArrivalTime;
        double localBalkTime;
public:
        wait_status wstatus;
        clientClass();
        void setTimes (double T);
        double getArrivalTime ();
        double getBalkTime ();

        // generate the length of time between successive arrivals.
        double interArrivalTime ();
};


