34 #ifndef GTEST_SAMPLES_SAMPLE3_INL_H_ 35 #define GTEST_SAMPLES_SAMPLE3_INL_H_ 77 Queue() : head_(NULL), last_(NULL), size_(0) {}
91 if (node == NULL)
break;
102 size_t Size()
const {
return size_; }
120 head_ = last_ = new_node;
123 last_->
next_ = new_node;
137 head_ = head_->
next_;
152 template <
typename F>
156 new_queue->
Enqueue(
function(node->element()));
172 #endif // GTEST_SAMPLES_SAMPLE3_INL_H_
const QueueNode & operator=(const QueueNode &)
const QueueNode * next() const
const E & element() const
void Enqueue(const E &element)
QueueNode(const E &an_element)
const QueueNode< E > * Last() const
const QueueNode< E > * Head() const
Queue * Map(F function) const