next up previous contents
Next: The simulation class Up: The process-oriented approach Previous: The entity philosopher

The entity class

The interface of the entity class. It is derived from event and adds the phase of the entity to event.

   interface entity : public event 
   {
   public :
     virtual ~entity();           // destructor
     int phase();                 // return phase
     void phase(int p);           // adjust phase
   protected :
     entity(int ph=0,int qp=0,int sp=0,int kf = FALSE); // constructor
   };

The constructor takes the phase, queuing priority and scheduling priority and the kill flag of the entity (default FALSE), The function phase adjust or returns this phase. Furthermore, the class entity inherits every function of the class event, so these functions can also be invoked for an entity.



A Eliens
Tue Oct 31 09:27:21 MET 1995