From 1d6d1e8c73193f57a9c98387ea42eb91eb4d21d1 Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Fri, 21 Oct 2005 11:56:32 +0000 Subject: only moving to a new directory svn path=/trunk/externals/grh/; revision=3740 --- PDContainer/include/HQueue.h | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100755 PDContainer/include/HQueue.h (limited to 'PDContainer/include/HQueue.h') diff --git a/PDContainer/include/HQueue.h b/PDContainer/include/HQueue.h new file mode 100755 index 0000000..025fe52 --- /dev/null +++ b/PDContainer/include/HQueue.h @@ -0,0 +1,77 @@ +// *********************(c)*2004*********************> +// -holzilib--holzilib--holzilib--holzilib--holzilib-> +// ++++PD-External++by+Georg+Holzmann++grh@gmx.at++++> +// +// PDContainer: +// this is a port of the containers from the C++ STL +// (Standard Template Library) +// for usage see the documentation and PD help files +// for license see readme.txt +// +// HQueue.h + +#ifndef _h_queue_h__ +#define _h_queue_h__ + + +#include "include/QueueStack.h" +#include + +using std::queue; + + +//--------------------------------------------------- +/* this is the class of the queue + */ +class HQueue : +public QueueStack< queue, int > +{ + + private: + + /* Copy Construction is not allowed + */ + HQueue(const HQueue &src) + { } + + /* assignement operator is not allowed + */ + const HQueue& operator = (const HQueue&) + { return *this; } + + public: + + /* Standard Constructor + * no namespace + */ + HQueue() + { dataname_ = "h_queue"; } + + /* Constructor + * with a namespace + */ + HQueue(string h_namespace) + { + dataname_ = "h_queue"; + setNamespace(h_namespace); + } + + /* Destructor + */ + virtual ~HQueue() { } + + /* inserts an element in the container + */ + virtual void push(Element value) + { data_[h_namespace_].push(value); } + + /* returns the element from the top of + * the stack + */ + virtual Element &front() const + { return data_[h_namespace_].front(); } +}; + + + +#endif //_h_queue_h__ -- cgit v1.2.1