xentara-plugin v2.0.4
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::process::Event::Role Class Referencefinal

A built-in event role. More...

#include <xentara/process/Event.hpp>

+ Inheritance diagram for xentara::process::Event::Role:

Public Member Functions

constexpr Role (const utils::core::Uuid &uuid, std::string_view name, io::Directions ioDirections={})
 Constructor.
 
constexpr auto name () const -> const std::string_view &
 Gets the name.
 
constexpr auto uuid () const -> const utils::core::Uuid &
 Gets the UUID.
 
constexpr auto ioDirections () const -> io::Directions
 Gets the relevant I/O directions.
 
template<utils::tools::EqualityComparableWithExcept< std::string_view, Role > String>
auto operator== (const String &rhs) const -> bool
 Checks the name of the event role.
 
template<utils::tools::EqualityComparableWithExcept< utils::core::Uuid, Role > Uuid>
auto operator== (const Uuid &rhs) const -> bool
 Checks the UUID of the event role.
 

Detailed Description

A built-in event role.

Event roles are used for events whose meaning is the same across elements.

Constructor & Destructor Documentation

◆ Role()

constexpr xentara::process::Event::Role::Role ( const utils::core::Uuid uuid,
std::string_view  name,
io::Directions  ioDirections = {} 
)
constexpr

Constructor.

Parameters
uuidThe UUID of the events with this role
nameThe name of the event with this role, in UTF-8 encoding. The string data the view references to is not copied. It must remain valid for the lifetime of the plugin.
ioDirections

The relevant I/O directions.

The I/O directions are used for I/O events to specify whether a data point should inherit the event from its attached input and/or output. If the directions contain the flag io::Direction::Input, then the data point will inherit the event from its input. If the directions contain the flag io::Direction::Output, then the data point will inherit the event from its output. If you do not set either flag (the default), then the event will not be considered an I/O event and will not be inherited by any data points.

Member Function Documentation

◆ ioDirections()

constexpr auto xentara::process::Event::Role::ioDirections ( ) const -> io::Directions
constexpr

Gets the relevant I/O directions.

Returns
The I/O directions. The I/O directions are used for I/O events to specify whether a data point should inherit this event from its attached input and/or output.

◆ name()

constexpr auto xentara::process::Event::Role::name ( ) const -> const std::string_view &
constexpr

Gets the name.

Returns
The name, in UTF-8 encoding

◆ operator==() [1/2]

template<utils::tools::EqualityComparableWithExcept< std::string_view, Role > String>
auto xentara::process::Event::Role::operator== ( const String &  rhs) const -> bool

Checks the name of the event role.

This is a convenience operator you can use to check the name of an event role. It is equivalent to name() == rhs.

Returns
Returns true if the event role has the given name.

◆ operator==() [2/2]

template<utils::tools::EqualityComparableWithExcept< utils::core::Uuid, Role > Uuid>
auto xentara::process::Event::Role::operator== ( const Uuid &  rhs) const -> bool

Checks the UUID of the event role.

This is a convenience operator you can use to check the UUID of an event role. It is equivalent to uuid() == rhs.

Returns
Returns true if the event role has the given UUID.

◆ uuid()

constexpr auto xentara::process::Event::Role::uuid ( ) const -> const utils::core::Uuid &
constexpr

Gets the UUID.