The Monitor monitors entries that are emitted if a given time has passed.
More...
#include <monitor.hh>
The Monitor monitors entries that are emitted if a given time has passed.
◆ Monitor() [1/2]
Utopia::DataIO::Monitor::Monitor |
( |
std::shared_ptr< MonitorManager > |
root_mtr_mgr | ) |
|
|
inline |
Constructs a root monitor object.
A root monitor has no name and writes to the root level of the monitor entries tree.
- Parameters
-
root_mtr_mgr | The monitor manager to associate this monitor with |
◆ Monitor() [2/2]
Utopia::DataIO::Monitor::Monitor |
( |
const std::string & |
name, |
|
|
const Monitor & |
parent_mtr |
|
) |
| |
|
inline |
Construct a monitor object within a hierarchy.
Construct a new Monitor object and names it such that it fits into the monitor hierarchy
- Parameters
-
name | The name of this monitor; to place it into the monitor hierarchy the parent's name is prepended to this given name, separated by the . character. |
parent_mtr | The parent monitor |
◆ get_monitor_manager()
std::shared_ptr< MonitorManager > Utopia::DataIO::Monitor::get_monitor_manager |
( |
| ) |
const |
|
inline |
◆ get_name()
std::string Utopia::DataIO::Monitor::get_name |
( |
| ) |
const |
|
inline |
Get the name of the monitor.
◆ set_by_func()
template<typename Func >
void Utopia::DataIO::Monitor::set_by_func |
( |
const std::string |
key, |
|
|
Func && |
f |
|
) |
| |
|
inline |
Provide a new entry to the monitor manager.
- Note
- An entry is set regardless of whether the emission is enabled.
- Template Parameters
-
Func | The type of the function (rvalue reference) |
- Parameters
-
key | The key of the new entry |
value | The value of the new entry |
◆ set_by_value()
template<typename Value >
void Utopia::DataIO::Monitor::set_by_value |
( |
const std::string |
key, |
|
|
Value const & |
v |
|
) |
| |
|
inline |
Provide a new entry to the monitor manager.
- Note
- An entry is set regardless of whether the emission is enabled.
- Template Parameters
-
Value | The type of the value (lvalue reference) |
- Parameters
-
key | The key of the new entry |
value | The value of the new entry |
◆ set_entry()
template<typename Arg >
void Utopia::DataIO::Monitor::set_entry |
( |
const std::string |
key, |
|
|
Arg |
arg |
|
) |
| |
|
inline |
Provide a new entry to the monitor manager.
This function tests whether the argument is callable like a std::function or a lambda excluding the operator(). If so, they are called and the return value is used for setting the entry.
(Without the exclusion of operator(), types such as int or double would also be classified callable.)
- Note
- An entry is set regardless of whether the emission is enabled!
- Template Parameters
-
Arg | The type of the argument |
- Parameters
-
key | The key of the new entry |
arg | The argument (value or function) that determines the value of the new entry |
◆ _mtr_mgr
◆ _name
const std::string Utopia::DataIO::Monitor::_name |
|
private |
The documentation for this class was generated from the following file: