title
Graph Drawing Toolkit

An object-oriented C++ library for handling and drawing graphs

gdtstack.h

Go to the documentation of this file.
00001 
00003 #ifndef __gdtstack__
00004 #define __gdtstack__
00005 
00006 #include <GDT/gdtlist.h>
00007 
00008 namespace gdt {
00009 
00010 template<class E>
00011 class gdtstack : private gdtlist<E> {
00012 
00013         private:
00014 
00015                 typedef gdtlist<E> base;
00016 
00017         public:
00018 
00019                 gdtstack() {}
00020 
00021                 gdtstack(const gdtstack<E>& s) : base(s) {}
00022                 
00023                 ~gdtstack() { clear(); }
00024 
00025                 gdtstack<E>& operator = (const gdtstack<E>& s) 
00026                 { base::operator=(s); return *this; }
00027 
00028                 const E& top() const { return base::head(); }
00029 
00030                 void push(const E& x) { base::push(x); }
00031 
00032                 const E& pop() { return base::pop(); }
00033 
00034                 int size() const { return base::length(); }
00035 
00036                 bool empty() const { return base::empty(); }
00037 
00038                 void clear() { base::clear(); }
00039 };
00040 
00041 }
00042 
00043 #endif
00044 
00045 

Generated on Thu Jan 10 14:48:01 2008 for GDToolkit GAPI by  doxygen 1.5.3