34 #ifndef GTEST_SAMPLES_SAMPLE3_INL_H_ 35 #define GTEST_SAMPLES_SAMPLE3_INL_H_ 79 Queue() : head_(NULL), last_(NULL), size_(0) {}
98 if (node == NULL) {
break; }
104 head_ = last_ = NULL;
110 size_t Size()
const {
return size_; }
130 head_ = last_ = new_node;
136 last_->
next_ = new_node;
152 head_ = head_->
next_;
169 template <
typename F>
176 new_queue->
Enqueue(
function(node->element()));
192 #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