xentara-plugin v2.0.4
The Xentara Plugin Framework
|
A function object used to iterate over all the events of an element. More...
#include <xentara/model/ForEachEventFunction.hpp>
Public Types | |
using | result_type = bool |
The result type. | |
Public Member Functions | |
template<std::invocable< const utils::core::Uuid &, std::string_view, const std::shared_ptr< process::Event > & > Callable> | |
ForEachEventFunction (Callable &&callable) | |
Constructor that sets the callable to be called. | |
auto | operator() (const utils::core::Uuid &uuid, std::string_view name, const std::shared_ptr< process::Event > &event) const -> bool |
Function call operator. | |
auto | operator() (const process::Event::Role &role, const std::shared_ptr< process::Event > &event) const -> bool |
Function call operator that takes an event role instead of an explicit UUID and name. | |
auto | operator() (const model::Attribute &attribute, const std::shared_ptr< process::Event > &event) const -> bool |
Function call operator for an attribute change event. | |
auto | operator() (const model::Attribute::Role &attributeRole, const std::shared_ptr< process::Event > &event) const -> bool |
Function call operator for an attribute change event using an attribute role. | |
A function object used to iterate over all the events of an element.
using xentara::model::ForEachEventFunction::result_type = bool |
The result type.
xentara::model::ForEachEventFunction::ForEachEventFunction | ( | Callable && | callable | ) |
Constructor that sets the callable to be called.
callable | The callable to be called for each event. The return type must be bool, and must evaluate to true to stop iterating over the events, or to false to continue iterating. |
auto xentara::model::ForEachEventFunction::operator() | ( | const model::Attribute & | attribute, |
const std::shared_ptr< process::Event > & | event | ||
) | const -> bool |
Function call operator for an attribute change event.
attribute | The attribute whose change the event signals. |
event | The event itself. |
auto xentara::model::ForEachEventFunction::operator() | ( | const model::Attribute::Role & | attributeRole, |
const std::shared_ptr< process::Event > & | event | ||
) | const -> bool |
Function call operator for an attribute change event using an attribute role.
attributeRole | The role of the attribute whose change the event signals. |
event | The event itself. |
auto xentara::model::ForEachEventFunction::operator() | ( | const process::Event::Role & | role, |
const std::shared_ptr< process::Event > & | event | ||
) | const -> bool |
Function call operator that takes an event role instead of an explicit UUID and name.
role | The role of the event. |
event | The event itself. |
auto xentara::model::ForEachEventFunction::operator() | ( | const utils::core::Uuid & | uuid, |
std::string_view | name, | ||
const std::shared_ptr< process::Event > & | event | ||
) | const -> bool |
Function call operator.
uuid | The UUID of the event. |
name | The name of the event. |
event | The event itself. |