
/*
**  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(_STATSTAQ_H_)

#define _STATSTAQ_H_

#include <queue.h>


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

    TItem *         prev;
    TItem           top;         
    TItem           n;
    TItem           depth;
    bool            master;

public:

    staticStack(TItem nn,goblinController &thisContext) throw();
    staticStack(staticStack<TItem,TKey> &S) throw();
    ~staticStack() 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 (top==n);};
    TItem           Cardinality() throw() {return depth;};

};
    

#endif
