Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
/* $XConsortium: CC_Stack.h /main/4 1996/10/08 19:23:19 cde-hal $ */
#ifndef _Stack_hh
#define _Stack_hh
#include "Exceptions.hh"
#include "CC_Slist.h"
template <class T> class Stack: public Destructable
{
public:
Stack (); /* This is a value stack, ie an assignment operator
* for T is assumed */
~Stack ();
public:
T pop ();
void push (const T);
T& top () const;
int entries() const
{
return( Items->entries() ); //ie no. of elements in the stack
}
int empty() const {
return( Items->entries() == 0 );
}
private:
CC_TValSlist<T> *Items;
};
#endif