Function operator<<

Summary

#include <src/easylogging++.h>

(1) MessageBuilder & operator<<(const std::string &msg)

(2) MessageBuilder & operator<<(const wchar_t *msg)

(3) MessageBuilder & operator<<(std::ostream &(*OStreamMani)(std::ostream &))

(4) template <class T, class Container>
    MessageBuilder & operator<<(const std::stack< T, Container > &stack_)

(5) template <class T, class Container, class Comparator>
    MessageBuilder & operator<<(const std::priority_queue< T, Container, Comparator > &priorityQueue_)

(6) template <class First, class Second>
    MessageBuilder & operator<<(const std::pair< First, Second > &pair_)

(7) template <std::size_t Size>
    MessageBuilder & operator<<(const std::bitset< Size > &bitset_)

(8) template <class T, std::size_t Size>
    MessageBuilder & operator<<(const std::array< T, Size > &array)

(9) MessageBuilder & operator<<(const QByteArray &msg)

(10) MessageBuilder & operator<<(const QStringRef &msg)

(11) MessageBuilder & operator<<(qint64 msg)

(12) MessageBuilder & operator<<(quint64 msg)

(13) MessageBuilder & operator<<(QChar msg)

(14) MessageBuilder & operator<<(const QLatin1String &msg)

(15) Second MessageBuilder & operator<<(const QPair< First, Second > &pair_)

(16) template <typename K, typename V>
     MessageBuilder & operator<<(const QMap< K, V > &map_)

(17) template <typename K, typename V>
     MessageBuilder & operator<<(const QMultiMap< K, V > &map_)

(18) template <typename K, typename V>
     MessageBuilder & operator<<(const QHash< K, V > &hash_)

(19) template <typename K, typename V>
     MessageBuilder & operator<<(const QMultiHash< K, V > &multiHash_)

Function overload

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(const std::string &msg)

Description

No description yet.

Source

Lines 2880-2882 in src/easylogging++.h.

inline MessageBuilder& operator<<(const std::string& msg) {
  return operator<<(msg.c_str());
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(const wchar_t *msg)

Description

No description yet.

Source

Lines 2515-2531 in src/easylogging++.cc. Line 2900 in src/easylogging++.h.

MessageBuilder& MessageBuilder::operator<<(const wchar_t* msg) {
  if (msg == nullptr) {
    m_logger->stream() << base::consts::kNullPointer;
    return *this;
  }
#  if defined(ELPP_UNICODE)
  m_logger->stream() << msg;
#  else
  char* buff_ = base::utils::Str::wcharPtrToCharPtr(msg);
  m_logger->stream() << buff_;
  free(buff_);
#  endif
  if (ELPP->hasFlag(LoggingFlag::AutoSpacing)) {
    m_logger->stream() << " ";
  }
  return *this;
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(std::ostream &(*OStreamMani)(std::ostream &))

Description

ostream manipulators

Source

Lines 2902-2905 in src/easylogging++.h.

inline MessageBuilder& operator<<(std::ostream& (*OStreamMani)(std::ostream&)) {
  m_logger->stream() << OStreamMani;
  return *this;
}

Synopsis

#include <src/easylogging++.h>

template <class T, class Container>
MessageBuilder & operator<<(const std::stack< T, Container > &stack_)

Description

No description yet.

Source

Lines 2946-2951 in src/easylogging++.h.

template <class T, class Container>
inline MessageBuilder& operator<<(const std::stack<T, Container>& stack_) {
  base::workarounds::IterableStack<T, Container> iterableStack_ =
    static_cast<base::workarounds::IterableStack<T, Container> >(stack_);
  return writeIterator(iterableStack_.begin(), iterableStack_.end(), iterableStack_.size());
}

Synopsis

#include <src/easylogging++.h>

template <class T, class Container, class Comparator>
MessageBuilder & operator<<(const std::priority_queue< T, Container, Comparator > &priorityQueue_)

Description

No description yet.

Source

Lines 2952-2957 in src/easylogging++.h.

template <class T, class Container, class Comparator>
inline MessageBuilder& operator<<(const std::priority_queue<T, Container, Comparator>& priorityQueue_) {
  base::workarounds::IterablePriorityQueue<T, Container, Comparator> iterablePriorityQueue_ =
    static_cast<base::workarounds::IterablePriorityQueue<T, Container, Comparator> >(priorityQueue_);
  return writeIterator(iterablePriorityQueue_.begin(), iterablePriorityQueue_.end(), iterablePriorityQueue_.size());
}

Synopsis

#include <src/easylogging++.h>

template <class First, class Second>
MessageBuilder & operator<<(const std::pair< First, Second > &pair_)

Description

No description yet.

Source

Lines 2958-2966 in src/easylogging++.h.

template <class First, class Second>
MessageBuilder& operator<<(const std::pair<First, Second>& pair_) {
  m_logger->stream() << ELPP_LITERAL("(");
  operator << (static_cast<First>(pair_.first));
  m_logger->stream() << ELPP_LITERAL(", ");
  operator << (static_cast<Second>(pair_.second));
  m_logger->stream() << ELPP_LITERAL(")");
  return *this;
}

Synopsis

#include <src/easylogging++.h>

template <std::size_t Size>
MessageBuilder & operator<<(const std::bitset< Size > &bitset_)

Description

No description yet.

Source

Lines 2967-2973 in src/easylogging++.h.

template <std::size_t Size>
MessageBuilder& operator<<(const std::bitset<Size>& bitset_) {
  m_logger->stream() << ELPP_LITERAL("[");
  operator << (bitset_.to_string());
  m_logger->stream() << ELPP_LITERAL("]");
  return *this;
}

Synopsis

#include <src/easylogging++.h>

template <class T, std::size_t Size>
MessageBuilder & operator<<(const std::array< T, Size > &array)

Description

No description yet.

Source

Lines 2975-2978 in src/easylogging++.h.

template <class T, std::size_t Size>
inline MessageBuilder& operator<<(const std::array<T, Size>& array) {
  return writeIterator(array.begin(), array.end(), array.size());
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(const QByteArray &msg)

Description

No description yet.

Source

Lines 2998-3000 in src/easylogging++.h.

inline MessageBuilder& operator<<(const QByteArray& msg) {
  return operator << (QString(msg));
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(const QStringRef &msg)

Description

No description yet.

Source

Lines 3001-3003 in src/easylogging++.h.

inline MessageBuilder& operator<<(const QStringRef& msg) {
  return operator<<(msg.toString());
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(qint64 msg)

Description

No description yet.

Source

Lines 3004-3011 in src/easylogging++.h.

inline MessageBuilder& operator<<(qint64 msg) {
 if defined(ELPP_UNICODE)
  m_logger->stream() << QString::number(msg).toStdWString();
 else
  m_logger->stream() << QString::number(msg).toStdString();
 endif  // defined(ELPP_UNICODE)
  return *this;
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(quint64 msg)

Description

No description yet.

Source

Lines 3012-3019 in src/easylogging++.h.

inline MessageBuilder& operator<<(quint64 msg) {
 if defined(ELPP_UNICODE)
  m_logger->stream() << QString::number(msg).toStdWString();
 else
  m_logger->stream() << QString::number(msg).toStdString();
 endif  // defined(ELPP_UNICODE)
  return *this;
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(QChar msg)

Description

No description yet.

Source

Lines 3020-3023 in src/easylogging++.h.

inline MessageBuilder& operator<<(QChar msg) {
  m_logger->stream() << msg.toLatin1();
  return *this;
}

Synopsis

#include <src/easylogging++.h>

MessageBuilder & operator<<(const QLatin1String &msg)

Description

No description yet.

Source

Lines 3024-3027 in src/easylogging++.h.

inline MessageBuilder& operator<<(const QLatin1String& msg) {
  m_logger->stream() << msg.latin1();
  return *this;
}

Synopsis

#include <src/easylogging++.h>

Second MessageBuilder & operator<<(const QPair< First, Second > &pair_)

Description

No description yet.

Source

Lines 3028-3042 in src/easylogging++.h.

ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QList)
ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QVector)
ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QQueue)
ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QSet)
ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QLinkedList)
ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QStack)
template <typename First, typename Second>
MessageBuilder& operator<<(const QPair<First, Second>& pair_) {
  m_logger->stream() << ELPP_LITERAL("(");
  operator << (static_cast<First>(pair_.first));
  m_logger->stream() << ELPP_LITERAL(", ");
  operator << (static_cast<Second>(pair_.second));
  m_logger->stream() << ELPP_LITERAL(")");
  return *this;
}

Synopsis

#include <src/easylogging++.h>

template <typename K, typename V>
MessageBuilder & operator<<(const QMap< K, V > &map_)

Description

No description yet.

Source

Lines 3043-3063 in src/easylogging++.h.

template <typename K, typename V>
MessageBuilder& operator<<(const QMap<K, V>& map_) {
  m_logger->stream() << ELPP_LITERAL("[");
  QList<K> keys = map_.keys();
  typename QList<K>::const_iterator begin = keys.begin();
  typename QList<K>::const_iterator end = keys.end();
  int max_ = static_cast<int>(base::consts::kMaxLogPerContainer);  // to prevent warning
  for (int index_ = 0; begin != end && index_ < max_; ++index_, ++begin) {
    m_logger->stream() << ELPP_LITERAL("(");
    operator << (static_cast<K>(*begin));
    m_logger->stream() << ELPP_LITERAL(", ");
    operator << (static_cast<V>(map_.value(*begin)));
    m_logger->stream() << ELPP_LITERAL(")");
    m_logger->stream() << ((index_ < keys.size() -1) ? m_containerLogSeparator : ELPP_LITERAL(""));
  }
  if (begin != end) {
    m_logger->stream() << ELPP_LITERAL("...");
  }
  m_logger->stream() << ELPP_LITERAL("]");
  return *this;
}

Synopsis

#include <src/easylogging++.h>

template <typename K, typename V>
MessageBuilder & operator<<(const QMultiMap< K, V > &map_)

Description

No description yet.

Source

Lines 3064-3068 in src/easylogging++.h.

template <typename K, typename V>
inline MessageBuilder& operator<<(const QMultiMap<K, V>& map_) {
  operator << (static_cast<QMap<K, V>>(map_));
  return *this;
}

Synopsis

#include <src/easylogging++.h>

template <typename K, typename V>
MessageBuilder & operator<<(const QHash< K, V > &hash_)

Description

No description yet.

Source

Lines 3069-3089 in src/easylogging++.h.

template <typename K, typename V>
MessageBuilder& operator<<(const QHash<K, V>& hash_) {
  m_logger->stream() << ELPP_LITERAL("[");
  QList<K> keys = hash_.keys();
  typename QList<K>::const_iterator begin = keys.begin();
  typename QList<K>::const_iterator end = keys.end();
  int max_ = static_cast<int>(base::consts::kMaxLogPerContainer);  // prevent type warning
  for (int index_ = 0; begin != end && index_ < max_; ++index_, ++begin) {
    m_logger->stream() << ELPP_LITERAL("(");
    operator << (static_cast<K>(*begin));
    m_logger->stream() << ELPP_LITERAL(", ");
    operator << (static_cast<V>(hash_.value(*begin)));
    m_logger->stream() << ELPP_LITERAL(")");
    m_logger->stream() << ((index_ < keys.size() -1) ? m_containerLogSeparator : ELPP_LITERAL(""));
  }
  if (begin != end) {
    m_logger->stream() << ELPP_LITERAL("...");
  }
  m_logger->stream() << ELPP_LITERAL("]");
  return *this;
}

Synopsis

#include <src/easylogging++.h>

template <typename K, typename V>
MessageBuilder & operator<<(const QMultiHash< K, V > &multiHash_)

Description

No description yet.

Source

Lines 3090-3094 in src/easylogging++.h.

template <typename K, typename V>
inline MessageBuilder& operator<<(const QMultiHash<K, V>& multiHash_) {
  operator << (static_cast<QHash<K, V>>(multiHash_));
  return *this;
}





Add Discussion

Log in to comment