home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / g++ / gen / Deque.hP < prev    next >
Text File  |  1993-06-29  |  2KB  |  58 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2. /* 
  3. Copyright (C) 1988 Free Software Foundation
  4.     written by Doug Lea (dl@rocky.oswego.edu)
  5.     based on code by Marc Shapiro (shapiro@sor.inria.fr)
  6.  
  7. This file is part of the GNU C++ Library.  This library is free
  8. software; you can redistribute it and/or modify it under the terms of
  9. the GNU Library General Public License as published by the Free
  10. Software Foundation; either version 2 of the License, or (at your
  11. option) any later version.  This library is distributed in the hope
  12. that it will be useful, but WITHOUT ANY WARRANTY; without even the
  13. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  14. PURPOSE.  See the GNU Library General Public License for more details.
  15. You should have received a copy of the GNU Library General Public
  16. License along with this library; if not, write to the Free Software
  17. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20.  
  21. #ifndef _<T>Deque_h
  22. #ifdef __GNUG__
  23. #pragma interface
  24. #endif
  25. #define _<T>Deque_h
  26.  
  27. #include <builtin.h>
  28.  
  29. #include "<T>.defs.h"
  30.  
  31. class <T>Deque
  32. {
  33. public:
  34.                         <T>Deque() { }
  35.   virtual              ~<T>Deque();
  36.  
  37.   virtual void          push(<T&> item) = 0; // insert at front
  38.   virtual void          enq(<T&> item) = 0;  // insert at rear
  39.  
  40.   virtual <T>&          front() = 0;
  41.   virtual <T>&          rear() = 0;
  42.  
  43.   virtual <T>           deq() = 0;
  44.   virtual void          del_front() = 0;
  45.   virtual void          del_rear() = 0;               
  46.  
  47.   virtual int           empty() = 0;
  48.   virtual int           full() = 0;
  49.   virtual int           length() = 0;
  50.   virtual void          clear() = 0;
  51.   
  52.   virtual int           OK() = 0;
  53.  
  54.   void                  error(const char*);
  55. };
  56.  
  57. #endif
  58.