
/*
**  This file forms part of the GOBLIN C++ Class Library.
**
**  Written by Christian Fremuth-Paeger, September 1998.
**  
**  Copying, compiling, distribution and modification
**  of this source code is permitted only in accordance
**  with the GOBLIN general licence information.
*/             


#if !defined(_STATQ_H_)

#define _STATQ_H_

#include <queue.h>


template <class TItem,class TKey>
class staticQueue : public goblinQueue<TItem,TKey>
{
private:

    TItem*          next;
    TItem           first;         
    TItem           last;
    TItem           n;
    TItem           length;
    bool            master;

public:

    staticQueue(TItem nn,goblinController &thisContext) throw();
    staticQueue(staticQueue<TItem,TKey> &Q) throw();
    ~staticQueue() throw();
    
    unsigned long   Size() throw();
    unsigned long   Allocated() throw();
    char*           Display() throw();

    void            Insert(TItem w,TKey alpha = 0) throw(ERRange,ERCheck);
    TItem           Delete() throw(ERRejected);
    TItem           Peek() throw(ERRejected);
    bool            Empty() throw() {return (first==n);};
    TItem           Cardinality() throw() {return length;};

};


#endif
