home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / source / Chap02 / queue / queue.h < prev   
Encoding:
C/C++ Source or Header  |  1996-10-23  |  602 b   |  32 lines

  1. #ifndef QUEUE_H
  2. #define QUEUE_H
  3.  
  4. class Queue
  5. {
  6.      public:
  7.           Queue();
  8.           ~Queue();
  9.           void add(T theData);
  10.           T remove();
  11.  
  12.      class QueueEmpty
  13.           {
  14.           };     
  15.  
  16.      private:
  17.           class listNode
  18.           {
  19.                friend class Queue;
  20.                static listNode* kNull;
  21.                public:
  22.                     listNode();
  23.                     T fData;
  24.                     listNode* fPrevious;
  25.                     listNode* fNext;
  26.           };
  27.           listNode* fHead;
  28.           listNode* fTail;
  29. };
  30. #endif
  31.  
  32.