1// This may look like C code, but it is really -*- C++ -*- 2/* 3Copyright (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 7This file is part of GNU CC. 8 9GNU CC is distributed in the hope that it will be useful, 10but WITHOUT ANY WARRANTY. No author or distributor 11accepts responsibility to anyone for the consequences of using it 12or for whether it serves any particular purpose or works at all, 13unless he says so in writing. Refer to the GNU CC General Public 14License for full details. 15 16Everyone is granted permission to copy, modify and redistribute 17GNU CC, but only under the conditions described in the 18GNU CC General Public License. A copy of this license is 19supposed to have been given to you along with GNU CC so you 20can know your rights and responsibilities. It should be in a 21file named COPYING. Among other things, the copyright notice 22and this notice must be preserved on all copies. 23*/ 24 25 26#ifndef _<T>Deque_h 27#ifdef __GNUG__ 28#pragma once 29#pragma interface 30#endif 31#define _<T>Deque_h 32 33#include <builtin.h> 34 35#include "<T>.defs.h" 36 37class <T>Deque 38{ 39public: 40 <T>Deque(); 41 ~<T>Deque(); 42 43 virtual void push(<T&> item) = 0; // insert at front 44 virtual void enq(<T&> item) = 0; // insert at rear 45 46 virtual <T>& front() = 0; 47 virtual <T>& rear() = 0; 48 49 virtual <T> deq() = 0; 50 virtual void del_front() = 0; 51 virtual void del_rear() = 0; 52 53 virtual int empty() = 0; 54 virtual int full() = 0; 55 virtual int length() = 0; 56 virtual void clear() = 0; 57 58 virtual int OK() = 0; 59 60 void error(const char*); 61}; 62 63#if defined(__OPTIMIZE__) || defined(USE_LIBGXX_INLINES) 64inline <T>Deque::<T>Deque() {} 65#endif 66 67#endif 68