The monitorable interface is implemented by those SAGA objects which can be monitored, i.e. which have one or more associated metrics. More...
#include <monitorable.hpp>
Public Types | |
typedef unsigned int | cookie_handle |
Brief description starts here. | |
Public Member Functions | |
monitorable (saga::object rhs) | |
Brief description starts here. | |
monitorable (saga::impl::object *impl) | |
Brief description starts here. | |
virtual | ~monitorable (void) |
Brief description starts here. | |
virtual std::vector< saga::metric > | list_metrics (void) const |
Brief description starts here. | |
virtual saga::metric | get_metric (std::string name) const |
Returns a metric instance, identified by name. | |
virtual cookie_handle | add_callback (std::string name, saga::callback cb) |
Adds a callback to the specified metric. | |
virtual void | remove_callback (std::string name, cookie_handle cookie) |
Removes a callback from the specified metric. |
The monitorable interface is implemented by those SAGA objects which can be monitored, i.e. which have one or more associated metrics.
The interface allows introspection of these metrics, and allows to add callbacks to these metrics which get called if these metrics change. Several methods of this interface reflect similar methods on the metric class
Definition at line 41 of file monitorable.hpp.
typedef unsigned int saga::monitorable::cookie_handle |
Brief description starts here.
Definition at line 57 of file monitorable.hpp.
saga::monitorable::monitorable | ( | saga::object | rhs | ) |
Brief description starts here.
Definition at line 16 of file monitorable.cpp.
saga::monitorable::monitorable | ( | saga::impl::object * | impl | ) | [explicit] |
Brief description starts here.
Definition at line 21 of file monitorable.cpp.
saga::monitorable::~monitorable | ( | void | ) | [virtual] |
Brief description starts here.
Definition at line 26 of file monitorable.cpp.
std::vector< saga::metric > saga::monitorable::list_metrics | ( | void | ) | const [virtual] |
Brief description starts here.
Definition at line 40 of file monitorable.cpp.
saga::metric saga::monitorable::get_metric | ( | std::string | name | ) | const [virtual] |
Returns a metric instance, identified by name.
name | Name of the metric to be returned. |
Definition at line 45 of file monitorable.cpp.
saga::monitorable::cookie_handle saga::monitorable::add_callback | ( | std::string | name, | |
saga::callback | cb | |||
) | [virtual] |
Adds a callback to the specified metric.
name | Identifies the metric to which the cb is to be added | |
cb | Reference to callback class instance to be registered |
Definition at line 52 of file monitorable.cpp.
void saga::monitorable::remove_callback | ( | std::string | name, | |
cookie_handle | cookie | |||
) | [virtual] |
Removes a callback from the specified metric.
name | Identifies the metric for which cb is to be removed | |
cookie | Identifies the cb to be removed. |
Definition at line 57 of file monitorable.cpp.