44 virtual void PushBack (
const Elem &Item);
45 virtual void PushFront (
const Elem &Item);
48 virtual const Elem&
PeekBack (
int count = 0)
const;
49 virtual const Elem&
PeekFront (
int count = 0)
const;
53 virtual void Clear (
void);
54 virtual inline bool IsEmpty ()
const;
55 virtual inline bool IsFull ()
const;
81 virtual Elem&
PeekBack (
int count = 0);
95 inline virtual void PushBack (
const Elem &Item);
96 inline virtual void PushFront (
const Elem &Item);
102 template <
class Elem>
104 Capacity( capacity ), Beginning(0), End(0), ElemCount(0)
111 template <
class Elem>
114 DestructArray<Elem>(Data, Capacity);
118 template <
class Elem>
125 DestructArray<Elem>(Data, Capacity);
126 ConstructArray<Elem>(Data, Capacity);
130 template <
class Elem>
137 Data[ End++ ] = Item;
145 template <
class Elem>
155 Beginning += Capacity;
157 Data[ Beginning ] = Item;
162 template <
class Elem>
168 Elem ReturnValue = Data[ Beginning ];
169 Destruct<Elem>(&Data[ Beginning ]);
170 Construct<Elem>(&Data[ Beginning ]);
176 if (Beginning >= Capacity)
177 Beginning -= Capacity;
182 template <
class Elem>
195 Elem ReturnValue = Data[ End ];
196 Destruct<Elem>(&Data[ End ]);
197 Construct<Elem>(&Data[ End ]);
203 template <
class Elem>
209 int idx = Beginning + count;
215 template <
class Elem>
221 int idx = End - count - 1;
228 template <
class Elem>
240 template <
class Elem>
252 template <
class Elem>
258 template <
class Elem>
264 template <
class Elem>
270 template <
class Elem>
278 template <
class Elem>
286 template <
class Elem>
virtual const Elem & PeekFront(int count=0) const
InPlaceMutableDeque(int capacity=Deque< Elem >::DefaultCapacity)
virtual bool IsFull() const
CircularBuffer(int MaxSize=Deque< Elem >::DefaultCapacity)
virtual const Elem & PeekBack(int count=0) const
virtual Elem PopBack(void)
Deque & operator=(const Deque &q)
virtual UPInt GetCapacity(void) const
Deque(const Deque< Elem > &OtherDeque)
virtual void PushBack(const Elem &Item)
virtual bool IsEmpty() const
virtual void PushBack(const Elem &Item)
virtual void PushFront(const Elem &Item)
virtual UPInt GetSize(void) const
Deque(int capacity=DefaultCapacity)
virtual Elem & PeekFront(int count=0)
virtual Elem PopFront(void)
virtual Elem & PeekBack(int count=0)
virtual ~InPlaceMutableDeque()
virtual void PushFront(const Elem &Item)