blob: 02600cf59f1a3b5b2d45c3fdccad290d2d128b1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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__
|