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

A built-in task role. More...

#include <xentara/process/Task.hpp>

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

Public Member Functions

constexpr Role (const utils::core::Uuid &uuid, std::string_view name)
 Constructor.
 
constexpr auto name () const -> const std::string_view &
 Gets the name.
 
constexpr auto uuid () const -> const utils::core::Uuid &
 Gets the UUID.
 
template<utils::tools::EqualityComparableWithExcept< std::string_view, Role > String>
auto operator== (const String &rhs) const -> bool
 Checks the name of the task role.
 
template<utils::tools::EqualityComparableWithExcept< utils::core::Uuid, Role > Uuid>
auto operator== (const Uuid &rhs) const -> bool
 Checks the UUID of the task role.
 

Detailed Description

A built-in task role.

Task roles are used for tasks whose functionality is the same across elements.

Constructor & Destructor Documentation

◆ Role()

constexpr xentara::process::Task::Role::Role ( const utils::core::Uuid uuid,
std::string_view  name 
)
constexpr

Constructor.

Parameters
uuidThe UUID of the tasks with this role
nameThe name of the task 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.

Member Function Documentation

◆ name()

constexpr auto xentara::process::Task::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::Task::Role::operator== ( const String &  rhs) const -> bool

Checks the name of the task role.

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

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

◆ operator==() [2/2]

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

Checks the UUID of the task role.

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

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

◆ uuid()

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

Gets the UUID.