Go to the documentation of this file.
18 #ifndef ABSTRACTQUEUE_H_
19 #define ABSTRACTQUEUE_H_
46 template<
typename E >
61 virtual bool add(
const E& value) {
63 if (this->
offer(value )) {
68 __FILE__, __LINE__,
"Unable to add specified element to the Queue." );
80 if (
this == &collection) {
82 __FILE__, __LINE__,
"A Queue cannot be added to itself." );
98 if (this->
poll(result) ==
true) {
103 __FILE__, __LINE__,
"Unable to remove specified element from the Queue." );
115 if (this->
peek( result ) ==
true) {
120 __FILE__, __LINE__,
"Unable to remove specified element from the Queue." );
135 bool successful =
true;
138 successful = this->
poll(result);