Class Callback

Synopsis

#include <src/easylogging++.h>

template <typename T>
class Callback : protected base::threading::ThreadSafe

Description

No description yet.

Mentioned in

Methods

Callback
enabled
handle
setEnabled

Mentioned in

Source

Lines 2147-2162 in src/easylogging++.h.

template <typename T>
class Callback : protected base::threading::ThreadSafe {
 public:
  Callback(void) : m_enabled(true) {}
  inline bool enabled(void) const {
    return m_enabled;
  }
  inline void setEnabled(bool enabled) {
    base::threading::ScopedLock scopedLock(lock());
    m_enabled = enabled;
  }
 protected:
  virtual void handle(const T* handlePtr) = 0;
 private:
  bool m_enabled;
};





Add Discussion

Log in to comment