next up previous contents
Next: Gathering and analyzing Up: Queuing events Previous: The resource class

The queue class

The class queue has the following interface :

   interface queue 
      queue();                    // constructor
      virtual ~queue();           // destructor
      void reset();               // reset queue
      int reportsize(histogram* h,double interval = 0);    
      int reportwaiting(histogram* h,double interval = 0,int qp = 0);
      int reportwaitingall(histogram* h,double interval = 0);
      int prepend(event* e);      // add to front
      int append(event* e);       // add to back
      event* removefront();       // remove front
      event* front();             // return front
      event* removeback();        // remove back
      event* back();              // return back
      int extract(event* e);      // extract e
      int terminatefront();       // terminate front
      int terminateback();        // terminate back

      int cancel();               // cancel specified events
      int size();                 // return size
      int empty();                // is empty ?
      friend ostream& operator<<(ostream& os,queue& q);

The reports fill the given histogram with data of the size of the queue or with data of the waiting times. The latter regardless of the queuing priorities.

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