aboutsummaryrefslogtreecommitdiff
path: root/PDContainer/include/HDeque.h
diff options
context:
space:
mode:
authorGeorg Holzmann <grholzi@users.sourceforge.net>2005-10-21 11:56:32 +0000
committerGeorg Holzmann <grholzi@users.sourceforge.net>2005-10-21 11:56:32 +0000
commit1d6d1e8c73193f57a9c98387ea42eb91eb4d21d1 (patch)
tree8d0853fe30b12c73774c786f02f3d3011b147d4c /PDContainer/include/HDeque.h
parentdf8ac7c52ff0dfc8e2ba828c4226ed34b0e9ebfc (diff)
only moving to a new directory
svn path=/trunk/externals/grh/; revision=3740
Diffstat (limited to 'PDContainer/include/HDeque.h')
-rwxr-xr-xPDContainer/include/HDeque.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/PDContainer/include/HDeque.h b/PDContainer/include/HDeque.h
new file mode 100755
index 0000000..02600cf
--- /dev/null
+++ b/PDContainer/include/HDeque.h
@@ -0,0 +1,80 @@
+// *********************(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
+//
+// HDeque.h
+
+#ifndef _h_deque_h__
+#define _h_deque_h__
+
+
+#include "include/SequBase.h"
+#include <deque>
+
+using std::deque;
+
+
+//---------------------------------------------------
+/* this is the class of the deque
+ */
+class HDeque :
+public SequBase< deque<Element>, deque<Element>::iterator >
+{
+
+ private:
+
+ /* Copy Construction is not allowed
+ */
+ HDeque(const HDeque &src)
+ { }
+
+ /* assignement operator is not allowed
+ */
+ const HDeque& operator = (const HDeque&)
+ { return *this; }
+
+ public:
+
+ /* Standard Constructor
+ * no namespace
+ */
+ HDeque()
+ { dataname_ = "h_deque"; }
+
+ /* Constructor
+ * with a namespace
+ */
+ HDeque(string h_namespace)
+ {
+ dataname_ = "h_deque";
+ setNamespace(h_namespace);
+ }
+
+ /* Destructor
+ */
+ virtual ~HDeque() { }
+
+ /* inserts an element at the front of
+ * the container (so then the size
+ * increases by one !!!)
+ */
+ virtual void pushFront(Element value)
+ { data_[h_namespace_].push_front(value); }
+
+ /* removes the element from the front of
+ * the container (so then the size
+ * decreases by one !!!)
+ */
+ virtual void popFront()
+ { data_[h_namespace_].pop_front(); }
+};
+
+
+
+#endif //_h_deque_h__