Template Class LoggedValue
Defined in File channel.hpp
Class Documentation
-
template<typename T>
class LoggedValue The LoggedValue class is a container of a variable that automatically register/unregister to a Channel when created/destroyed.
Setting and getting values is thread-safe.
Public Functions
-
inline LoggedValue()
-
inline ~LoggedValue()
-
LoggedValue(LoggedValue const &other) = delete
-
LoggedValue &operator=(LoggedValue const &other) = delete
-
LoggedValue(LoggedValue &&other) = default
-
LoggedValue &operator=(LoggedValue &&other) = default
-
inline void set(const T &value, bool auto_enable = true)
set the value of the variable.
- Parameters:
value – new value
auto_enable – if true and the current instance is disabled, call setEnabled(true)
-
inline void setEnabled(bool enabled)
Disabling a LoggedValue means that we will not record it in the snapshot.
-
inline bool isEnabled() const
Protected Functions
Protected Attributes
- friend LogChannel
-
inline LoggedValue()