home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 6.ddi / MWHC.006 / J2 < prev    next >
Encoding:
Text File  |  1992-06-07  |  1.1 KB  |  52 lines

  1. #ifndef __RWTQUEUE_H__
  2. #define __RWTQUEUE_H__
  3. pragma push_align_members(64);
  4.  
  5. /*
  6.  * Parameterized queue of T's, implemented using class C.
  7.  *
  8.  * $Header:   E:/vcs/rw/tqueue.h_v   1.2   15 Mar 1992 12:47:32   KEFFER  $
  9.  *
  10.  ****************************************************************************
  11.  *
  12.  * Rogue Wave Software, Inc.
  13.  * P.O. Box 2328
  14.  * Corvallis, OR 97339
  15.  *
  16.  * Copyright (C) 1992. This software is subject to copyright 
  17.  * protection under the laws of the United States and other countries.
  18.  *
  19.  ***************************************************************************
  20.  *
  21.  * $Log:   E:/vcs/rw/tqueue.h_v  $
  22.  * 
  23.  *    Rev 1.2   15 Mar 1992 12:47:32   KEFFER
  24.  * 
  25.  *    Rev 1.0   02 Mar 1992 16:10:52   KEFFER
  26.  * Initial revision.
  27.  */
  28.  
  29. //$DECLARE_TEMPLATE
  30.  
  31. #ifndef __RWDEFS_H__
  32. #  include "rw/defs.h"
  33. #endif
  34.  
  35. template <class T, class C> class RWExport RWTQueue : private C {
  36.  
  37. public:
  38.  
  39.   RWTQueue() { }
  40.  
  41.   C::clear;
  42.   C::entries;
  43.   C::first;
  44.   T        get()        {return C::removeFirst();}
  45.   C::isEmpty;
  46.   void        insert(T a)    {C::append(a);}
  47.   C::last;
  48. };
  49.  
  50. pragma pop_align_members();
  51. #endif    /* __RWTQUEUE_H__ */
  52.