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 |
341 :
const std::string _name
The name of the monitor.
Definition monitor.hh:328
std::shared_ptr< MonitorManager > _mtr_mgr
The monitor manager.
Definition monitor.hh:331
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
◆ 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()
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()
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()
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 |
409 {
411 {
413 }
414 else
415 {
417 }
418 }
void set_by_value(const std::string key, Value const &v)
Provide a new entry to the monitor manager.
Definition monitor.hh:385
void set_by_func(const std::string key, Func &&f)
Provide a new entry to the monitor manager.
Definition monitor.hh:369
static constexpr bool value
Definition monitor.hh:58
◆ _mtr_mgr
◆ _name
const std::string Utopia::DataIO::Monitor::_name |
|
private |
The documentation for this class was generated from the following file: