home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia: Special Games / INFESPGAMES.mdf / os2 / ribble / support / cqueue.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-09  |  569 b   |  29 lines

  1. //  $Source: C:\logical\store\classes/RCS/CQUEUE.H,v $
  2. //  $Revision: 1.1 $
  3. //  $Date: 1993/08/25 16:31:01 $
  4. //  $Author: jason $
  5.  
  6. #include <CSupport.h>
  7. #include <CSList.h>
  8.  
  9. #ifndef _CQueue_h
  10. #define _CQueue_h
  11.  
  12. template <class T>
  13. class CSExport CQueue
  14. {
  15. public:
  16.   CQueue()            {  }
  17.   ~CQueue()           {  }
  18.   int isEmpty()       { return !queue; }
  19.   operator int()      { return !isEmpty(); }
  20.   T remove(void)      { return queue.remHead(); }
  21.   void push(T& item)  { queue.addTail(item); }
  22.  
  23. private:
  24.   CSList<T> queue;
  25. };
  26.  
  27. #endif
  28.  
  29.