Class IterableQueue

Synopsis

#include <src/easylogging++.h>

template<typename T, typename Container = std::deque<T>>
class IterableQueue : public IterableContainer<T, Container>, public std::queue<T, Container>

Description

Implements IterableContainer and provides iterable std::queue class.

Inheritance

Ancestors: std::queue< T, std::deque< T > >, IterableContainer

Methods

IterableQueue

Source

Lines 2832-2846 in src/easylogging++.h.

template<typename T, typename Container = std::deque<T>>
class IterableQueue : public IterableContainer<T, Container>, public std::queue<T, Container> {
 public:
  IterableQueue(std::queue<T, Container> queue_) {
    std::size_t count_ = 0;
    while (++count_ < base::consts::kMaxLogPerContainer && !queue_.empty()) {
      this->push(queue_.front());
      queue_.pop();
    }
  }
 private:
  inline Container& getContainer(void) {
    return this->c;
  }
};





Add Discussion

Log in to comment