xentara-plugin v2.0.4
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::skill::Element Class Referenceabstract

Base class for elements provided by a Xentara skill. More...

#include <xentara/skill/Element.hpp>

+ Inheritance diagram for xentara::skill::Element:

Classes

class  Class
 Meta-Information about an element class. More...
 
class  ConcreteClass
 Convenience subclass of Class that implements all callbacks. More...
 

Public Member Functions

virtual ~Element ()=0
 Virtual destructor.
 
Access to the properties
auto name () const -> utils::string::StringView
 Gets the name of the element.
 
auto primaryKey () const -> utils::string::StringView
 Gets the primary key of the element.
 
auto uuid () const -> utils::core::Uuid
 Gets the UUID of the element.
 
auto elementClass () const noexcept -> const Class &
 Gets the class of this element.
 
Callbacks for Accessing Children and Members
virtual auto createChildElement (const Class &elementClass, ElementFactory &factory) -> std::shared_ptr< Element >
 Called by the framework to create a new child element of this element.
 
virtual auto forEachAttribute (const model::ForEachAttributeFunction &function) const -> bool
 Called by the framework to iterate over all the attributes.
 
virtual auto forEachEvent (const model::ForEachEventFunction &function) -> bool
 Called by the framework to iterate over all the events.
 
virtual auto forEachTask (const model::ForEachTaskFunction &function) -> bool
 Called by the framework to iterate over all the tasks.
 
Data Access Callbacks
virtual auto makeReadHandle (const model::Attribute &attribute) const noexcept -> std::optional< data::ReadHandle >
 Called by the framework to get a read handle for a specific attribute.
 
virtual auto makeWriteHandle (const model::Attribute &attribute) noexcept -> std::optional< data::WriteHandle >
 Called by the framework to get a write handle for a specific attribute.
 
Callbacks for Optimized Member Lookup
virtual auto resolveAttributeByName (std::string_view name) const -> std::shared_ptr< const model::Attribute >
 Optional callback for optimized attribute lookup.
 
virtual auto resolveAttributeByUuid (const utils::core::Uuid &uuid) const -> std::shared_ptr< const model::Attribute >
 Optional callback for optimized attribute lookup.
 
virtual auto resolveEventByName (std::string_view name) -> std::shared_ptr< process::Event >
 Optional callback for optimized event lookup.
 
virtual auto resolveEventByUuid (const utils::core::Uuid &uuid) -> std::shared_ptr< process::Event >
 Optional callback for optimized event lookup.
 
virtual auto resolveTaskByName (std::string_view name) -> std::shared_ptr< process::Task >
 Optional callback for optimized task lookup.
 
virtual auto resolveTaskByUuid (const utils::core::Uuid &uuid) -> std::shared_ptr< process::Task >
 Optional callback for optimized task lookup.
 
Callbacks for meta information about the element
virtual auto category () const noexcept -> model::ElementCategory=0
 Callback for getting the element category.
 
Callbacks for handling dependencies during loading
virtual auto isAttributePending (std::string_view name) const noexcept -> bool
 Callback for determining whether an attribute is not available yet due to unresolved references.
 
virtual auto isAttributePending (const utils::core::Uuid &uuid) const noexcept -> bool
 Callback for determining whether an attribute is not available yet due to unresolved references.
 
virtual auto isEventPending (std::string_view name) const noexcept -> bool
 Callback for determining whether an event is not available yet due to unresolved references.
 
virtual auto isEventPending (const utils::core::Uuid &uuid) const noexcept -> bool
 Callback for determining whether an event is not available yet due to unresolved references.
 
virtual auto isTaskPending (std::string_view name) const noexcept -> bool
 Callback for determining whether a task is not available yet due to unresolved references.
 
virtual auto isTaskPending (const utils::core::Uuid &uuid) const noexcept -> bool
 Callback for determining whether a task is not available yet due to unresolved references.
 
virtual auto isMetadataPending () const noexcept -> bool
 Callback for determining whether meta information is not available yet due to unresolved references.
 
- Public Member Functions inherited from xentara::utils::tools::DisableCopy
constexpr DisableCopy () noexcept=default
 
 DisableCopy (const DisableCopy &)=delete
 
DisableCopyoperator= (const DisableCopy &)=delete
 

Protected Member Functions

Access to the Xentara Element
auto element () const noexcept -> const model::Element &
 Gets the Xentara element for this skill element.
 
auto element () noexcept -> model::Element &
 Gets the Xentara element for this skill element.
 
auto rootElement () const -> std::shared_ptr< const model::Element >
 Returns the invisible root element of the model this element belongs to.
 
auto rootElement () -> std::shared_ptr< model::Element >
 Returns the invisible root element of the model this element belongs to.
 
Global Lookup Functions
auto findAttribute (std::string_view primaryKey) -> model::ElementAttribute
 Finds the attribute with a specific primary key in the model this element belongs to.
 
auto findAttributeVerbose (std::string_view primaryKey) -> utils::eh::expected< model::ElementAttribute, std::string >
 Finds the attribute with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findEvent (std::string_view primaryKey) const -> std::shared_ptr< const process::Event >
 Finds the event with a specific primary key in the model this element belongs to.
 
auto findEvent (std::string_view primaryKey) -> std::shared_ptr< process::Event >
 Finds the event with a specific primary key in the model this element belongs to.
 
auto findEventVerbose (std::string_view primaryKey) const -> utils::eh::expected< std::shared_ptr< const process::Event >, std::string >
 Finds the event with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findEventVerbose (std::string_view primaryKey) -> utils::eh::expected< std::shared_ptr< process::Event >, std::string >
 Finds the event with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findExtendedEvent (std::string_view primaryKey) const -> process::ExtendedEvent
 Finds the extended event with a specific primary key in the model this element belongs to.
 
auto findExtendedEventVerbose (std::string_view primaryKey) const -> utils::eh::expected< process::ExtendedEvent, std::string >
 Finds the extended event with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findTask (std::string_view primaryKey) const -> std::shared_ptr< const process::Task >
 Finds the task with a specific primary key in the model this element belongs to.
 
auto findTask (std::string_view primaryKey) -> std::shared_ptr< process::Task >
 Finds the task with a specific primary key in the model this element belongs to.
 
auto findTaskVerbose (std::string_view primaryKey) const -> utils::eh::expected< std::shared_ptr< const process::Task >, std::string >
 Finds the task with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findTaskVerbose (std::string_view primaryKey) -> utils::eh::expected< std::shared_ptr< process::Task >, std::string >
 Finds the task with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findElement (std::string_view primaryKey) const -> std::shared_ptr< const model::Element >
 Finds the element with a specific primary key in the model this element belongs to.
 
auto findElement (std::string_view primaryKey) -> std::shared_ptr< model::Element >
 Finds the element with a specific primary key in the model this element belongs to.
 
auto findElementVerbose (std::string_view primaryKey) const -> utils::eh::expected< std::shared_ptr< const model::Element >, std::string >
 Finds the element with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findElementVerbose (std::string_view primaryKey) -> utils::eh::expected< std::shared_ptr< model::Element >, std::string >
 Finds the element with a specific primary key in the model this element belongs to, returning an error message on error.
 
auto findElement (const utils::core::Uuid &uuid) const -> std::shared_ptr< const model::Element >
 Finds the element with a specific UUID in the model this element belongs to.
 
auto findElement (const utils::core::Uuid &uuid) -> std::shared_ptr< model::Element >
 Finds the element with a specific UUID in the model this element belongs to.
 
Security Functions
auto securityContext () const -> const security::Context &
 Returns the security context of the element.
 
auto checkAccess (const security::Authorization &authorization, const security::Entitlement &entitlement) const -> bool
 Checks an authorization for a certain entitlement using the ACL for this element.
 

Private Member Functions

Element Lifetime Callbacks
virtual auto load (utils::json::decoder::Object &jsonObject, config::Context &context) -> void
 Called by the framework to load the element’s configuration from a JSON object.
 
virtual auto initSyntheticChild (const utils::json::decoder::Location &parentLocation, config::Context &context) -> void
 Called by the framework to initialize a synthetic element created using config::Context::createSyntheticChild().
 
virtual auto realize () -> void
 Called by the framework once all references have been resolved.
 
virtual auto postRealize () -> void
 Called by the framework after all subservices have been realized.
 
virtual auto prepare () -> void
 Called by the framework to prepare the element for operation.
 
virtual auto postPrepare () -> void
 Called by the framework after all subservices have been prepared.
 
virtual auto preCleanup () -> void
 Called by the framework before the subservices are cleaned up.
 
virtual auto cleanup () -> void
 Called by the framework to clean up the element after operation.
 

Detailed Description

Base class for elements provided by a Xentara skill.

Examples
LoadingElementConfig.cpp, and PublishingConfigAttributes.cpp.

Constructor & Destructor Documentation

◆ ~Element()

xentara::skill::Element::~Element ( )
pure virtualdefault

Virtual destructor.

Member Function Documentation

◆ category()

virtual auto xentara::skill::Element::category ( ) const -> model::ElementCategory
pure virtualnoexcept

Callback for getting the element category.

This callback returns the element category best suited for this element. In some cases it may be necessary to know the full configuration of the element before being able to determine the correct category. It is therefore permissible for the returned category to change until the element’s realize() and postRealize() callbacks have been called. After the realize() and postRealize() callbacks have returned, however, the element’s category must remain constant for the remaining lifetime of the element. It is not permissible to change the element’s category after the realize() and postRealize() callbacks.

Returns
The element category that best describes the element. Before the realize() and postRealize() callbacks have been called, the category can be a preliminary, non-authoritative category that will change in later calls.

Implemented in xentara::io::Component, xentara::io::IoBatch, xentara::process::Microservice, and xentara::skill::DataPoint.

Examples
LoadingElementConfig.cpp, and PublishingConfigAttributes.cpp.

◆ checkAccess()

auto xentara::skill::Element::checkAccess ( const security::Authorization authorization,
const security::Entitlement entitlement 
) const -> bool
protected

Checks an authorization for a certain entitlement using the ACL for this element.

◆ cleanup()

virtual auto xentara::skill::Element::cleanup ( ) -> void
privatevirtual

Called by the framework to clean up the element after operation.

This method is called by the framework after Xentara has completely shut down.

This method is called after the cleanup() method of any subservices. You can override preCleanup() if you need to perform actions before the subservices are cleaned up.

Default Implementation
The default implementation does nothing.

◆ createChildElement()

virtual auto xentara::skill::Element::createChildElement ( const Class elementClass,
ElementFactory factory 
) -> std::shared_ptr< Element >
virtual

Called by the framework to create a new child element of this element.

The implementation for this method must use the given factory to create a new element of the given element class:

return factory.makeShared<MyChildElement>();

If your driver requires access to the child element later, you must store an std::weak_ptr to it somewhere.

The framework will call load() on the newly created element.

Default Implementation
The default implementation returns nullptr, denoting that the element does not support subservices.
Parameters
elementClassThe class for the new element
factoryThe factory that must be used to create the element
Returns
The newly created element, or nullptr if the element does not support subservices of the given class
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
See also
Creating Skill Element Objects

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ element() [1/2]

auto xentara::skill::Element::element ( ) const -> const model::Element &
protectednoexcept

Gets the Xentara element for this skill element.

Returns
The model element that represents this skill element

◆ element() [2/2]

auto xentara::skill::Element::element ( ) -> model::Element &
protectednoexcept

Gets the Xentara element for this skill element.

Returns
The model element that represents this skill element

◆ elementClass()

auto xentara::skill::Element::elementClass ( ) const -> const Class &
noexcept

Gets the class of this element.

Returns
The element class. This is the class that was passed to the skill’s createElement() function or to the parent’s createChildElement() function when the element was created. the element was created.

◆ findAttribute()

auto xentara::skill::Element::findAttribute ( std::string_view  primaryKey) -> model::ElementAttribute
protected

Finds the attribute with a specific primary key in the model this element belongs to.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve attributes during loading. Specifically, this function must not be used from within load(). Within load(), use the supplied context to resolve attributes.
Parameters
primaryKeyThe primary key of desired attribute, in UTF-8 encoding.
Returns
A reference to the corresponding attribute, or a default constructed reference if no attribute with the specified primary key exists. You can use the [operator bool()]model::ElementAttribute::operator bool()) to check whether the returned reference is valid.

◆ findAttributeVerbose()

auto xentara::skill::Element::findAttributeVerbose ( std::string_view  primaryKey) -> utils::eh::expected< model::ElementAttribute, std::string >
protected

Finds the attribute with a specific primary key in the model this element belongs to, returning an error message on error.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve attributes during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve attributes.
Parameters
primaryKeyThe primary key of desired attribute, in UTF-8 encoding.
Returns
A pointer to the corresponding attribute, or an (English) error message if no attribute with the specified primary key exists.

◆ findElement() [1/4]

auto xentara::skill::Element::findElement ( const utils::core::Uuid uuid) -> std::shared_ptr< model::Element >
protected

Finds the element with a specific UUID in the model this element belongs to.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
uuidThe UUID of desired element.
Returns
A pointer to the corresponding element, or nullptr if no element with the UUID key exists.

◆ findElement() [2/4]

auto xentara::skill::Element::findElement ( const utils::core::Uuid uuid) const -> std::shared_ptr< const model::Element >
protected

Finds the element with a specific UUID in the model this element belongs to.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
uuidThe UUID of desired element.
Returns
A pointer to the corresponding element, or nullptr if no element with the specified UUID exists.

◆ findElement() [3/4]

auto xentara::skill::Element::findElement ( std::string_view  primaryKey) -> std::shared_ptr< model::Element >
protected

Finds the element with a specific primary key in the model this element belongs to.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired element, in UTF-8 encoding.
Returns
A pointer to the corresponding element, or nullptr if no element with the specified primary key exists.

◆ findElement() [4/4]

auto xentara::skill::Element::findElement ( std::string_view  primaryKey) const -> std::shared_ptr< const model::Element >
protected

Finds the element with a specific primary key in the model this element belongs to.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired element, in UTF-8 encoding.
Returns
A pointer to the corresponding element, or nullptr if no element with the specified primary key exists.

◆ findElementVerbose() [1/2]

auto xentara::skill::Element::findElementVerbose ( std::string_view  primaryKey) -> utils::eh::expected< std::shared_ptr< model::Element >, std::string >
protected

Finds the element with a specific primary key in the model this element belongs to, returning an error message on error.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired element, in UTF-8 encoding.
Returns
A pointer to the corresponding element, or an (English) error message if no element with the specified primary key exists.

◆ findElementVerbose() [2/2]

auto xentara::skill::Element::findElementVerbose ( std::string_view  primaryKey) const -> utils::eh::expected< std::shared_ptr< const model::Element >, std::string >
protected

Finds the element with a specific primary key in the model this element belongs to, returning an error message on error.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired element, in UTF-8 encoding.
Returns
A pointer to the corresponding element, or an (English) error message if no element with the specified primary key exists.

◆ findEvent() [1/2]

auto xentara::skill::Element::findEvent ( std::string_view  primaryKey) -> std::shared_ptr< process::Event >
protected

Finds the event with a specific primary key in the model this element belongs to.

This function only finds free-standing events of type process::Event. It does not find change events for attributes. To include change events for attributes in the search, use findExtendedEvent() instead.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired event, in UTF-8 encoding.
Returns
A pointer to the corresponding event, or nullptr if no event with the specified primary key exists.

◆ findEvent() [2/2]

auto xentara::skill::Element::findEvent ( std::string_view  primaryKey) const -> std::shared_ptr< const process::Event >
protected

Finds the event with a specific primary key in the model this element belongs to.

This function only finds free-standing events of type process::Event. It does not find change events for attributes. To include change events for attributes in the search, use findExtendedEvent() instead.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired event, in UTF-8 encoding.
Returns
A pointer to the corresponding event, or nullptr if no event with the specified primary key exists.

◆ findEventVerbose() [1/2]

auto xentara::skill::Element::findEventVerbose ( std::string_view  primaryKey) -> utils::eh::expected< std::shared_ptr< process::Event >, std::string >
protected

Finds the event with a specific primary key in the model this element belongs to, returning an error message on error.

This function only finds free-standing events of type process::Event. It does not find change events for attributes. To include change events for attributes in the search, use findExtendedEventVerbose() instead.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired event, in UTF-8 encoding.
Returns
A pointer to the corresponding event, or an (English) error message if no event with the specified primary key exists.

◆ findEventVerbose() [2/2]

auto xentara::skill::Element::findEventVerbose ( std::string_view  primaryKey) const -> utils::eh::expected< std::shared_ptr< const process::Event >, std::string >
protected

Finds the event with a specific primary key in the model this element belongs to, returning an error message on error.

This function only finds free-standing events of type process::Event. It does not find change events for attributes. To include change events for attributes in the search, use findExtendedEventVerbose() instead.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired event, in UTF-8 encoding.
Returns
A pointer to the corresponding event, or an (English) error message if no event with the specified primary key exists.

◆ findExtendedEvent()

auto xentara::skill::Element::findExtendedEvent ( std::string_view  primaryKey) const -> process::ExtendedEvent
protected

Finds the extended event with a specific primary key in the model this element belongs to.

This function will find any event with a specific name, including change events for attributes. This distuguished it from findEvent(), which only finds free-standing events of type process::Event.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired event, in UTF-8 encoding.
Returns
A reference to the corresponding event, or a default constructed reference if no event or attribute with the specified UUID was found. You can use the operator bool() to determine whether the returned reference is valid.

◆ findExtendedEventVerbose()

auto xentara::skill::Element::findExtendedEventVerbose ( std::string_view  primaryKey) const -> utils::eh::expected< process::ExtendedEvent, std::string >
protected

Finds the extended event with a specific primary key in the model this element belongs to, returning an error message on error.

This function will find any event with a specific name, including change events for attributes. This distuguished it from findEventVerbose(), which only finds free-standing events of type process::Event.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve events during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve events.
Parameters
primaryKeyThe primary key of desired event, in UTF-8 encoding.
Returns
A reference to the corresponding event, or a default constructed reference if no event or attribute with the specified UUID was found. You can use the operator bool() to determine whether the returned reference is valid.

◆ findTask() [1/2]

auto xentara::skill::Element::findTask ( std::string_view  primaryKey) -> std::shared_ptr< process::Task >
protected

Finds the task with a specific primary key in the model this element belongs to.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve tasks during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve tasks.
Parameters
primaryKeyThe primary key of desired task, in UTF-8 encoding.
Returns
A pointer to the corresponding task, or nullptr if no task with the specified primary key exists.

◆ findTask() [2/2]

auto xentara::skill::Element::findTask ( std::string_view  primaryKey) const -> std::shared_ptr< const process::Task >
protected

Finds the task with a specific primary key in the model this element belongs to.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve tasks during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve tasks.
Parameters
primaryKeyThe primary key of desired task, in UTF-8 encoding.
Returns
A pointer to the corresponding task, or nullptr if no task with the specified primary key exists.

◆ findTaskVerbose() [1/2]

auto xentara::skill::Element::findTaskVerbose ( std::string_view  primaryKey) -> utils::eh::expected< std::shared_ptr< process::Task >, std::string >
protected

Finds the task with a specific primary key in the model this element belongs to, returning an error message on error.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve tasks during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve tasks.
Parameters
primaryKeyThe primary key of desired task, in UTF-8 encoding.
Returns
A pointer to the corresponding task, or an (English) error message if no task with the specified primary key exists.

◆ findTaskVerbose() [2/2]

auto xentara::skill::Element::findTaskVerbose ( std::string_view  primaryKey) const -> utils::eh::expected< std::shared_ptr< const process::Task >, std::string >
protected

Finds the task with a specific primary key in the model this element belongs to, returning an error message on error.

Note
Since the full hierarchy of elements is only known once the configuration has been completely loaded, this function should not be used to resolve tasks during loading. Specifically, this function must not be used from within load(). From within load(), use the supplied context to resolve tasks.
Parameters
primaryKeyThe primary key of desired task, in UTF-8 encoding.
Returns
A pointer to the corresponding task, or an (English) error message if no task with the specified primary key exists.

◆ forEachAttribute()

virtual auto xentara::skill::Element::forEachAttribute ( const model::ForEachAttributeFunction function) const -> bool
virtual

Called by the framework to iterate over all the attributes.

Implementations must call the given function once for each custom attribute, until the function returns true. If the function returns true for any attribute, the implementation must return true, otherwise false. A possible implementation looks like this:

{
return
function(myGlobalCustomAttribute);
function(mySharedCustomAttribute);
}
static const Role kError
The standard name for an error.
Definition Attribute.hpp:290
static const std::string_view kAddress
The standard name for an address.
Definition Attribute.hpp:300
A function object used to iterate over all the attributes of an element.
Definition ForEachAttributeFunction.hpp:25
virtual auto forEachAttribute(const model::ForEachAttributeFunction &function) const -> bool
Called by the framework to iterate over all the attributes.

Usually, attributes are defined as members at global or namespace scope, or as static member variables. For such attributes, you can just pass a reference to the attribute to the function. The same goes for attributes that are members of your skill object, or of any other object that never gets destroyed until Xentara shuts down.

Sometimes, however, an attribute will be a member of an element class, or be dynamically created in some other way. In that case, you need to call the function using a shared pointer to the attribute. This ensures that the attribute will not be destroyed while another element is accessing it. To create a shared pointer to an attribute, either make the attribute itself a shared object by creating it using std::make_shared, or make it a member of another shared object, and use the aliasing constructor (8) of std::shared_ptr to create a shared pointer to the attribute from a pointer to the containing object. If the attribute is a member of your element class, derive the element class from EnableSharedFromThis and use sharedFromThis<Alias>() to create the shared pointer.

In the following example, the element published two standard attributes, and one attribute that is a member of the element class:

{
return
function(sharedFromThis(&myValueAttribute));
}
static const Attribute kQuality
The attribute for the quality of a value.
Definition Attribute.hpp:278
static const Attribute kUpdateTime
The attribute for the update time stamp of a value.
Definition Attribute.hpp:272

The implementation must not call the function with the standard attributes model::Attribute::kPrimaryKey, model::Attribute::kName, and model::Attribute::kUuid, as these are handled automatically by the framework.

This callback is always called after all Xentara model elements references have been resolved. This means that when this function is called, all references to Xentara model elements you submitted in load() have already been resolved.

Default Implementation
The default implementation returns false, denoting that there are no custom attributes.
Parameters
functionThe function that should be called for each attribute
Exceptions
std::runtime_errorThe function may throw this exception (or a suitable subclass) if an error occurs.

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

Examples
PublishingConfigAttributes.cpp.

◆ forEachEvent()

virtual auto xentara::skill::Element::forEachEvent ( const model::ForEachEventFunction function) -> bool
virtual

Called by the framework to iterate over all the events.

Implementations must call the given function once for each event, until the function returns true. If the function returns true for any event, the implementation must return true, otherwise false. A possible implementation looks like this:

{
using namespace std::literals;
using namespace xentara::literals;
return
function(xentara::model::Attribute::kDeviceState, myDeviceStateEvent) ||
function(xentara::model::Attribute::kError, myErrorEvent) ||
function(xentara::process::Event::kConnected, myConnectedEvent) ||
function("c78470d1-ca76-4c02-af7a-ac4c5ac7ea82"_uuid, "myCustomEvent"sv, myCustomEvent);
}
static const Attribute kDeviceState
The attribute for the state of a device.
Definition Attribute.hpp:280
A function object used to iterate over all the events of an element.
Definition ForEachEventFunction.hpp:17
static const Role kConnected
The standard role for the connection event of an I/O component.
Definition Event.hpp:272
virtual auto forEachEvent(const model::ForEachEventFunction &function) -> bool
Called by the framework to iterate over all the events.

If the events are not shared object itself, but regular member variables, you can derive your element class from EnableSharedFromThis and use sharedFromThis<Alias>() to create shared pointers to the events:

{
using namespace std::literals;
using namespace xentara::literals;
return
function(xentara::model::Attribute::kDeviceState, sharedFromThis(&myDeviceStateEvent)) ||
function(xentara::model::Attribute::kError, sharedFromThis(&myErrorEvent)) ||
function(xentara::process::Event::kConnected, sharedFromThis(&myConnectedEvent)) ||
function("c78470d1-ca76-4c02-af7a-ac4c5ac7ea82"_uuid, "myCustomEvent"sv, sharedFromThis(&myCustomEvent));
}

You can also use the aliasing constructor (8) of std::shared_ptr to create a shared pointer to an event that is a member of a shared object not derived from EnableSharedFromThis.

This callback is always called after all Xentara model elements references have been resolved. This means that when this function is called, all references to Xentara model elements you submitted in load() have already been resolved.

Attention
This function is non-const only to allow you to call function with member variables of this. The implementation must not have any side-effects that modify this element object.
Default Implementation
The default implementation returns false, denoting that there are no custom events.
Parameters
functionThe function that should be called for each event
Exceptions
std::runtime_errorThe function may throw this exception (or a suitable subclass) if an error occurs.

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ forEachTask()

virtual auto xentara::skill::Element::forEachTask ( const model::ForEachTaskFunction function) -> bool
virtual

Called by the framework to iterate over all the tasks.

Implementations must call the given function once for each task, until the function returns true. If the function returns true for any task, the implementation must return true, otherwise false. A possible implementation looks like this:

{
using namespace std::literals;
using namespace xentara::literals;
return
function("myTask1"sv, "e9cc34eb-4e40-434d-8865-994391999c0a"_uuid, myTask1) ||
function("myTask2"sv, "5e394548-1528-4439-95f6-756a7b7c20f1"_uuid, myTask2) ||
function("myTask3"sv, "a9e0c04c-cb14-4c99-8c89-8e0f1ddf5f1d"_uuid, myTask3);
}
A function object used to iterate over all the tasks of an element.
Definition ForEachTaskFunction.hpp:17
virtual auto forEachTask(const model::ForEachTaskFunction &function) -> bool
Called by the framework to iterate over all the tasks.

If the tasks are not shared object itself, but regular member variables, you can derive your element class from EnableSharedFromThis and use sharedFromThis<Alias>() to create shared pointers to the tasks:

{
using namespace std::literals;
using namespace xentara::literals;
auto sharedThis = sharedFromThis();
return
function("myTask1"sv, "e9cc34eb-4e40-434d-8865-994391999c0a"_uuid, sharedFromThis(&myTask1)) ||
function("myTask2"sv, "5e394548-1528-4439-95f6-756a7b7c20f1"_uuid, sharedFromThis(&myTask2)) ||
function("myTask3"sv, "a9e0c04c-cb14-4c99-8c89-8e0f1ddf5f1d"_uuid, sharedFromThis(&myTask3));
}

You can also use the aliasing constructor (8) of std::shared_ptr to create a shared pointer to a task that is a member of a shared object not derived from EnableSharedFromThis.

This callback is always called after all Xentara model elements references have been resolved. This means that when this function is called, all references to Xentara model elements you submitted in load() have already been resolved.

Attention
This function is non-const only to allow you to call function with member variables of this. The implementation must not have any side-effects that modify this element object.
Default Implementation
The default implementation returns false, denoting that there are no custom tasks.
Parameters
functionThe function that should be called for each task
Exceptions
std::runtime_errorThe function may throw this exception (or a suitable subclass) if an error occurs.

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ initSyntheticChild()

virtual auto xentara::skill::Element::initSyntheticChild ( const utils::json::decoder::Location parentLocation,
config::Context context 
) -> void
privatevirtual

Called by the framework to initialize a synthetic element created using config::Context::createSyntheticChild().

This callback is called for each synthetic child once the load() function of the parent has returned.

Parameters
parentLocationThe location of the parent element’s configuration object in the model file. This location can be used in error messages.
contextA context that can be used to resolve cross-references and create nested synthetic children.
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
Default Implementation
The default implementation does nothing

◆ isAttributePending() [1/2]

virtual auto xentara::skill::Element::isAttributePending ( const utils::core::Uuid uuid) const -> bool
virtualnoexcept

Callback for determining whether an attribute is not available yet due to unresolved references.

This function is called when resolving references during loading of the model file to check whether an attribute is not available yet because some cross references have not yet been resolved.

Default Implementation
The default implementation returns false to indicate that the attribute is available immediately.
Attention
This function may only return true if there are still unresolved references to Xentara elements, attributes, events, or tasks. Once all reference to elements and element members have been resolved, this function must return false, or the model will fail to load.
Parameters
uuidThe uuid of the attribute in question.
Returns
This callback must return true if the attribute with the given uuid is not yet avialable because of references that have not been resolved yet. If the attribute is available, false must be returned.

◆ isAttributePending() [2/2]

virtual auto xentara::skill::Element::isAttributePending ( std::string_view  name) const -> bool
virtualnoexcept

Callback for determining whether an attribute is not available yet due to unresolved references.

This function is called when resolving references during loading of the model file to check whether an attribute is not available yet because some cross references have not yet been resolved.

Default Implementation
The default implementation returns false to indicate that the attribute is available immediately.
Attention
This function may only return true if there are still unresolved references to Xentara elements, attributes, events, or tasks. Once all reference to elements and element members have been resolved, this function must return false, or the model will fail to load.
Parameters
nameThe name of the attribute in question.
Returns
This callback must return true if the attribute with the given name is not yet avialable because of references that have not been resolved yet. If the attribute is available, false must be returned.

◆ isEventPending() [1/2]

virtual auto xentara::skill::Element::isEventPending ( const utils::core::Uuid uuid) const -> bool
virtualnoexcept

Callback for determining whether an event is not available yet due to unresolved references.

This function is called when resolving references during loading of the model file to check whether an event is not available yet because some cross references have not yet been resolved.

Default Implementation
The default implementation returns false to indicate that the event is available immediately.
Attention
This function may only return true if there are still unresolved references to Xentara elements, attributes, events, or tasks. Once all reference to elements and element members have been resolved, this function must return false, or the model will fail to load.
Parameters
uuidThe uuid of the event in question.
Returns
This callback must return true if the event with the given uuid is not yet avialable because of references that have not been resolved yet. If the event is available, false must be returned.

◆ isEventPending() [2/2]

virtual auto xentara::skill::Element::isEventPending ( std::string_view  name) const -> bool
virtualnoexcept

Callback for determining whether an event is not available yet due to unresolved references.

This function is called when resolving references during loading of the model file to check whether an event is not available yet because some cross references have not yet been resolved.

Default Implementation
The default implementation returns false to indicate that the event is available immediately.
Attention
This function may only return true if there are still unresolved references to Xentara elements, attributes, events, or tasks. Once all reference to elements and element members have been resolved, this function must return false, or the model will fail to load.
Parameters
nameThe name of the event in question.
Returns
This callback must return true if the event with the given name is not yet avialable because of references that have not been resolved yet. If the event is available, false must be returned.

◆ isMetadataPending()

virtual auto xentara::skill::Element::isMetadataPending ( ) const -> bool
virtualnoexcept

Callback for determining whether meta information is not available yet due to unresolved references.

This function is called when resolving element references during loading of the model file to check whether the meta information of the element is not available yet because some cross references to Xentara elements have not yet been resolved. You can return true from this callback if any of the following callback cannot return the correct information yet:

  • Element::category()
  • DataPoint::dataType()
  • DataPoint::direction()
    Attention
    This function may only return true if there are still unresolved references to full Xentara elements, submitted using config::resolver::submit() with Object type model::Element, skill::Element, skill::DataPoint, or a subclass thereof. Once all such references have been resolved, this function must return false, or the model will fail to load. It is not permissible to return true because of an unresolved reference to a member of an element, such as an attribute, an event, or a task, submitted using Object types model::Attribute, model::ElementAttribute, process::Event, process::ExtendedEvent, or process::Task. Making the availability of meta information dependent on a reference to an attribute, event, or task is not supported by Xentara.
    Default Implementation
    The default implementation returns false to indicate that all meta information is available immediately.
    Returns
    This callback must return true if any meta information about the element is not yet avialable because of element references that have not been resolved yet. If all meta information is available, false must be returned.

◆ isTaskPending() [1/2]

virtual auto xentara::skill::Element::isTaskPending ( const utils::core::Uuid uuid) const -> bool
virtualnoexcept

Callback for determining whether a task is not available yet due to unresolved references.

This function is called when resolving references during loading of the model file to check whether a task is not available yet because some cross references have not yet been resolved.

Default Implementation
The default implementation returns false to indicate that the task is available immediately.
Attention
This function may only return true if there are still unresolved references to Xentara elements, attributes, events, or tasks. Once all reference to elements and element members have been resolved, this function must return false, or the model will fail to load.
Parameters
uuidThe uuid of the task in question.
Returns
This callback must return true if the task with the given uuid is not yet avialable because of references that have not been resolved yet. If the task is available, false must be returned.

◆ isTaskPending() [2/2]

virtual auto xentara::skill::Element::isTaskPending ( std::string_view  name) const -> bool
virtualnoexcept

Callback for determining whether a task is not available yet due to unresolved references.

This function is called when resolving references during loading of the model file to check whether a task is not available yet because some cross references have not yet been resolved.

Default Implementation
The default implementation returns false to indicate that the task is available immediately.
Attention
This function may only return true if there are still unresolved references to Xentara elements, attributes, events, or tasks. Once all reference to elements and element members have been resolved, this function must return false, or the model will fail to load.
Parameters
nameThe name of the task in question.
Returns
This callback must return true if the task with the given name is not yet avialable because of references that have not been resolved yet. If the task is available, false must be returned.

◆ load()

virtual auto xentara::skill::Element::load ( utils::json::decoder::Object jsonObject,
config::Context context 
) -> void
privatevirtual

Called by the framework to load the element’s configuration from a JSON object.

The standard configuration parameters "name", "UUID", "ACL", and "children" are handled automatically by the framework using a JSON object filter. The corresponding JSON members are filtered out, and will not be enumerated when you iterate over the JSON object’s members.

Note
Prior to Xentara version 2.0, the configuration parameters "id" and "uuid" (lowercase) were used for the element’s name and UUID instead of "name" and "UUID" (uppercase). To retain backwards compatibility, the old names are filtered out instead of the new ones if the element type is specified using the old-style prefixes @IOComponent, @IO, @IOBatch, or @Microservice, instead of the new-style @Skill.
Parameters
jsonObjectThe JSON object. The object has a filter installed that will filter out and handle the standard configuration parameters.
contextA context that can be used to resolve cross-references, create [synthetic children](config::Context::createSyntheticChild()), and find external configurations.
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
Default Implementation
The default implementation does not load any custom configuration and only allows the standard configuration parameters.
See also
Loading Element Configs
Examples
LoadingElementConfig.cpp

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

Examples
LoadingElementConfig.cpp, and PublishingConfigAttributes.cpp.

◆ makeReadHandle()

virtual auto xentara::skill::Element::makeReadHandle ( const model::Attribute attribute) const -> std::optional< data::ReadHandle >
virtualnoexcept

Called by the framework to get a read handle for a specific attribute.

The implementation for this method must return a read handle for the given attribute's value.

Default Implementation
The default implementation returns std::nullopt.
Parameters
attributeThe desired attribute. This will never be one of the standard configuration attributes, as these are handled automatically by the framework.
Returns
A read handle for the attribute, or std::nullopt if the attribute is unknown. If an error occurs, an error read handle containing an appropriate error code must be returned.
See also
Publishing Attributes
Examples
PublishingConfigAttributes.cpp

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

Examples
PublishingConfigAttributes.cpp.

◆ makeWriteHandle()

virtual auto xentara::skill::Element::makeWriteHandle ( const model::Attribute attribute) -> std::optional< data::WriteHandle >
virtualnoexcept

Called by the framework to get a write handle for a specific attribute.

The implementation for this method must return a write handle for the given attribute's value.

Default Implementation
The default implementation returns std::nullopt.
Parameters
attributeThe desired attribute. This will never be one of the standard configuration attributes, as these are handled automatically by the framework.
Returns
A write handle for the attribute, or std::nullopt if the attribute is unknown. If an error occurs, an error write handle containing an appropriate error code must be returned.
See also
Publishing Attributes

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ name()

auto xentara::skill::Element::name ( ) const -> utils::string::StringView

Gets the name of the element.

Note
The name is only known once the configuration of the element has been loaded.
Returns
The name of the element, in UTF-8 encoding.

◆ postPrepare()

virtual auto xentara::skill::Element::postPrepare ( ) -> void
privatevirtual

Called by the framework after all subservices have been prepared.

This method is similar to the prepare() method, but it is called after the prepare() method of subservices.

Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
Default Implementation
The default implementation does nothing.

◆ postRealize()

virtual auto xentara::skill::Element::postRealize ( ) -> void
privatevirtual

Called by the framework after all subservices have been realized.

This method is similar to the realize() method, but it is called after the realize() method of subservices.

Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
Default Implementation
The default implementation does nothing.

◆ preCleanup()

virtual auto xentara::skill::Element::preCleanup ( ) -> void
privatevirtual

Called by the framework before the subservices are cleaned up.

This method is similar to the cleanup() method, but it is called before the cleanup() method of subservices.

Default Implementation
The default implementation does nothing.

◆ prepare()

virtual auto xentara::skill::Element::prepare ( ) -> void
privatevirtual

Called by the framework to prepare the element for operation.

This method is called by the framework after all objects have been realized, but before any processing is done. It allows you to prepare the object for operation. This is the place where read and write handles for attributes should be fetched, for example.

This method is called before the prepare() method of any subservices. You can override postPrepare() if you need to perform actions after all subservices have been prepared.

Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
Default Implementation
The default implementation does nothing.
See also
Loading Element Configs

◆ primaryKey()

auto xentara::skill::Element::primaryKey ( ) const -> utils::string::StringView

Gets the primary key of the element.

Note
The primary key is only fully known once the entire configuration has been loaded.
Returns
The primary key of the element, in UTF-8 encoding.

◆ realize()

virtual auto xentara::skill::Element::realize ( ) -> void
privatevirtual

Called by the framework once all references have been resolved.

This method is called by the framework after the configuration has been completely loaded and all references have been resolved, but before the objects are prepared for processing. Use this function to perform initialization that requires access to the objects you submitted to the resolver in load().

This method is called before the realize() method of any subservices. You can override postRealize() if you need to perform actions after all subservices have been realized.

Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
Default Implementation
The default implementation does nothing.
See also
Loading Element Configs

◆ resolveAttributeByName()

virtual auto xentara::skill::Element::resolveAttributeByName ( std::string_view  name) const -> std::shared_ptr< const model::Attribute >
virtual

Optional callback for optimized attribute lookup.

This function allows you to provide optimized lookup for looking up attributes by name, for example by using a hash table.

Default Implementation
The default implementation uses forEachEvent() to resolve the attribute.
Parameters
nameThe name of the desired attribute, in UTF-8 encoding
Returns
A pointer to the attribute, or nullptr if the element does not provide an attribute with the given name
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
See also
Publishing Attributes

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ resolveAttributeByUuid()

virtual auto xentara::skill::Element::resolveAttributeByUuid ( const utils::core::Uuid uuid) const -> std::shared_ptr< const model::Attribute >
virtual

Optional callback for optimized attribute lookup.

This function allows you to provide optimized lookup for looking up attributes by UUID, for example by using a hash table.

Default Implementation
The default implementation uses forEachEvent() to resolve the attribute.
Parameters
uuidThe uuid of the desired attribute
Returns
A pointer to the attribute, or nullptr if the element does not provide an attribute with the given uuid
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
See also
Publishing Attributes

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ resolveEventByName()

virtual auto xentara::skill::Element::resolveEventByName ( std::string_view  name) -> std::shared_ptr< process::Event >
virtual

Optional callback for optimized event lookup.

This function allows you to provide optimized lookup for looking up events by name, for example by using a hash table.

Attention
This function is non-const only to allow you to return member variables of this. The implementation must not have any side-effects that modify this element object.
Default Implementation
The default implementation uses forEachEvent() to resolve the event.
Parameters
nameThe name of the desired event, in UTF-8 encoding
Returns
A pointer to the event, or nullptr if the element does not provide an event with the given name
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
See also
Publishing Events

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ resolveEventByUuid()

virtual auto xentara::skill::Element::resolveEventByUuid ( const utils::core::Uuid uuid) -> std::shared_ptr< process::Event >
virtual

Optional callback for optimized event lookup.

This function allows you to provide optimized lookup for looking up events by UUID, for example by using a hash table.

Attention
This function is non-const only to allow you to return member variables of this. The implementation must not have any side-effects that modify this element object.
Default Implementation
The default implementation uses forEachEvent() to resolve the event.
Parameters
uuidThe UUID of the desired event
Returns
A pointer to the event, or nullptr if the element does not provide an event with the given UUID
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
See also
Publishing Events

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ resolveTaskByName()

virtual auto xentara::skill::Element::resolveTaskByName ( std::string_view  name) -> std::shared_ptr< process::Task >
virtual

Optional callback for optimized task lookup.

This function allows you to provide optimized lookup for looking up tasks by name, for example by using a hash table.

Attention
This function is non-const only to allow you to return member variables of this. The implementation must not have any side-effects that modify this element object.
Default Implementation
The default implementation uses forEachEvent() to resolve the task.
Parameters
nameThe name of the desired task, in UTF-8 encoding
Returns
A pointer to the task, or nullptr if the element does not provide a task with the given name
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
See also
Publishing Tasks

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ resolveTaskByUuid()

virtual auto xentara::skill::Element::resolveTaskByUuid ( const utils::core::Uuid uuid) -> std::shared_ptr< process::Task >
virtual

Optional callback for optimized task lookup.

This function allows you to provide optimized lookup for looking up tasks by UUID, for example by using a hash table.

Attention
This function is non-const only to allow you to return member variables of this. The implementation must not have any side-effects that modify this element object.
Default Implementation
The default implementation uses forEachTask() to resolve the task.
Parameters
uuidThe UUID of the desired task
Returns
A pointer to the task, or nullptr if the element does not provide a task with the given UUID
Exceptions
std::runtime_errorThe function must throw this exception (or a suitable subclass) if an error occurs
See also
Publishing Tasks

Reimplemented in xentara::io::Component, xentara::io::Io, xentara::io::IoBatch, and xentara::process::Microservice.

◆ rootElement() [1/2]

auto xentara::skill::Element::rootElement ( ) -> std::shared_ptr< model::Element >
protected

Returns the invisible root element of the model this element belongs to.

The invisible root element is the parent element of all top-level elements in the model. It does not have a name, a primary key, attributes, events, or tasks. The only thing the invisible root element can be used for is accessing its children using childElements() or forEachChildElement(), and getting its uuid().

Returns
The invisible root element of the model.
See also
model::Element::rootElement();

◆ rootElement() [2/2]

auto xentara::skill::Element::rootElement ( ) const -> std::shared_ptr< const model::Element >
protected

Returns the invisible root element of the model this element belongs to.

The invisible root element is the parent element of all top-level elements in the model. It does not have a name, a primary key, attributes, events, or tasks. The only thing the invisible root element can be used for is accessing its children using childElements() or forEachChildElement(), and getting its uuid().

Returns
The invisible root element of the model.
See also
model::Element::rootElement();

◆ securityContext()

auto xentara::skill::Element::securityContext ( ) const -> const security::Context &
protected

Returns the security context of the element.

◆ uuid()

auto xentara::skill::Element::uuid ( ) const -> utils::core::Uuid

Gets the UUID of the element.

Note
The UUID is only known once the configuration of the element has been loaded.