xentara-plugin v2.0.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
xentara::io::Io Class Referenceabstract

deprecated Deprecated base class for skill data point elements More...

#include <xentara/io/Io.hpp>

+ Inheritance diagram for xentara::io::Io:

Classes

class  FallbackConfigHandler
 A helper object used to throw exceptions for unknown configuration parameters. More...
 

Public Member Functions

virtual internal auto resolveAttribute (std::string_view name) -> const model::Attribute *
 Called by the framework to resolve an attribute with a specific name.
 
virtual auto resolveEvent (std::string_view name) -> std::shared_ptr< process::Event >
 Called by the framework to resolve an event with a specific name.
 
virtual auto resolveTask (std::string_view name) -> std::shared_ptr< process::Task >
 Called by the framework to resolve a task with a specific name.
 
virtual auto readHandle (const model::Attribute &attribute) const noexcept -> data::ReadHandle
 Called by the framework to get a read handle for a specific attribute.
 
virtual auto writeHandle (const model::Attribute &attribute) noexcept -> data::WriteHandle
 Called by the framework to get a write handle for a specific attribute.
 
- Public Member Functions inherited from xentara::skill::DataPoint
virtual auto dataType () const -> const data::DataType &=0
 Gets the data type.
 
virtual auto directions () const -> io::Directions=0
 Gets the data directions supported by the data point.
 
auto category () const noexcept -> model::ElementCategory final
 Virtual overide for skill::Element::category()
 
- Public Member Functions inherited from xentara::skill::Element
virtual ~Element ()=0
 Virtual destructor.
 
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.
 
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 Types

using ConfigIntializer = memory::Initializer< memory::Array >
 Type alias for an initializer for the configuration.
 

Protected Member Functions

virtual auto loadConfig (const ConfigIntializer &initializer, utils::json::decoder::Object &jsonObject, config::Resolver &resolver, const FallbackConfigHandler &fallbackHandler) -> void=0
 Called by the framework to load the element's configuration from a JSON object.
 
auto configBlock () const noexcept -> const memory::ArrayBlock &
 Gets the memory block that the configuration is stored in.
 
- Protected Member Functions inherited from xentara::skill::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.
 
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.
 
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.
 

Virtual Overrides for skill::Element


auto load (utils::json::decoder::Object &jsonObject, config::Context &context) -> void final
 Virtual overide for skill::Element::load()
 
auto createChildElement (const skill::Element::Class &elementClass, skill::ElementFactory &factory) -> std::shared_ptr< skill::Element > final
 Virtual overide for skill::Element::createChildElement()
 
auto resolveAttributeByName (std::string_view name) const -> std::shared_ptr< const model::Attribute > final
 Virtual overide for skill::Element::resolveAttributeByName()
 
auto resolveAttributeByUuid (const utils::core::Uuid &uuid) const -> std::shared_ptr< const model::Attribute > final
 Virtual overide for skill::Element::resolveAttributeByUuid()
 
auto forEachAttribute (const model::ForEachAttributeFunction &function) const -> bool final
 Virtual overide for skill::Element::forEachAttribute()
 
auto resolveEventByName (std::string_view name) -> std::shared_ptr< process::Event > final
 Virtual overide for skill::Element::resolveEventByName()
 
auto resolveEventByUuid (const utils::core::Uuid &uuid) -> std::shared_ptr< process::Event > final
 Virtual overide for skill::Element::resolveEventByUuid()
 
auto forEachEvent (const model::ForEachEventFunction &function) -> bool final
 Virtual overide for skill::Element::forEachEvent()
 
auto resolveTaskByName (std::string_view name) -> std::shared_ptr< process::Task > final
 Virtual overide for skill::Element::resolveTaskByName()
 
auto resolveTaskByUuid (const utils::core::Uuid &uuid) -> std::shared_ptr< process::Task > final
 Virtual overide for skill::Element::resolveTaskByUuid()
 
auto forEachTask (const model::ForEachTaskFunction &function) -> bool final
 Virtual overide for skill::Element::forEachTask()
 
auto makeReadHandle (const model::Attribute &attribute) const noexcept -> std::optional< data::ReadHandle > final
 Virtual overide for skill::Element::makeReadHandle()
 
auto makeWriteHandle (const model::Attribute &attribute) noexcept -> std::optional< data::WriteHandle > final
 Virtual overide for skill::Element::makeReadHandle()
 

Detailed Description

deprecated Deprecated base class for skill data point elements

Deprecated:
Replaced by skill::DataPoint

Member Typedef Documentation

◆ ConfigIntializer

Type alias for an initializer for the configuration.

Member Function Documentation

◆ configBlock()

auto xentara::io::Io::configBlock ( ) const -> const memory::ArrayBlock &
protectednoexcept

Gets the memory block that the configuration is stored in.

◆ createChildElement()

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

Virtual overide for skill::Element::createChildElement()

This function always return nullptr.

Reimplemented from xentara::skill::Element.

◆ forEachAttribute()

auto xentara::io::Io::forEachAttribute ( const model::ForEachAttributeFunction function) const -> bool
finalprivatevirtual

Virtual overide for skill::Element::forEachAttribute()

This function calls resolveAttribute() repeatedly using a list of standard attribute names.

Reimplemented from xentara::skill::Element.

◆ forEachEvent()

auto xentara::io::Io::forEachEvent ( const model::ForEachEventFunction function) -> bool
finalprivatevirtual

Virtual overide for skill::Element::forEachEvent()

This function calls resolveEvent() repeatedly using a list of standard event names.

Reimplemented from xentara::skill::Element.

◆ forEachTask()

auto xentara::io::Io::forEachTask ( const model::ForEachTaskFunction function) -> bool
finalprivatevirtual

Virtual overide for skill::Element::forEachTask()

This function calls resolveTask() repeatedly using a list of standard task names.

Reimplemented from xentara::skill::Element.

◆ load()

auto xentara::io::Io::load ( utils::json::decoder::Object jsonObject,
config::Context context 
) -> void
finalprivatevirtual

Virtual overide for skill::Element::load()

This function calls loadConfig() to load the element.

Reimplemented from xentara::skill::Element.

◆ loadConfig()

virtual auto xentara::io::Io::loadConfig ( const ConfigIntializer initializer,
utils::json::decoder::Object jsonObject,
config::Resolver resolver,
const FallbackConfigHandler fallbackHandler 
) -> void
protectedpure virtual

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

◆ makeReadHandle()

auto xentara::io::Io::makeReadHandle ( const model::Attribute attribute) const -> std::optional< data::ReadHandle >
finalprivatevirtualnoexcept

Virtual overide for skill::Element::makeReadHandle()

This function calls readHandle(), but returns std::nullopt if readHandle() returns data::ReadHandle::Error::Unknown.

Reimplemented from xentara::skill::Element.

◆ makeWriteHandle()

auto xentara::io::Io::makeWriteHandle ( const model::Attribute attribute) -> std::optional< data::WriteHandle >
finalprivatevirtualnoexcept

Virtual overide for skill::Element::makeReadHandle()

This function calls writeHandle(), but returns std::nullopt if writeHandle() returns data::WriteHandle::Error::Unknown.

Reimplemented from xentara::skill::Element.

◆ readHandle()

virtual auto xentara::io::Io::readHandle ( const model::Attribute attribute) const -> data::ReadHandle
virtualnoexcept

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

◆ resolveAttribute()

virtual internal auto xentara::io::Io::resolveAttribute ( std::string_view  name) -> const model::Attribute *
virtual

Called by the framework to resolve an attribute with a specific name.

◆ resolveAttributeByName()

auto xentara::io::Io::resolveAttributeByName ( std::string_view  name) const -> std::shared_ptr< const model::Attribute >
finalprivatevirtual

Virtual overide for skill::Element::resolveAttributeByName()

This function just calls resolveAttribute()

Reimplemented from xentara::skill::Element.

◆ resolveAttributeByUuid()

auto xentara::io::Io::resolveAttributeByUuid ( const utils::core::Uuid uuid) const -> std::shared_ptr< const model::Attribute >
finalprivatevirtual

Virtual overide for skill::Element::resolveAttributeByUuid()

This function calls resolveAttribute(), selecting a name taken from a list of standard attribute UUIDs.

Reimplemented from xentara::skill::Element.

◆ resolveEvent()

virtual auto xentara::io::Io::resolveEvent ( std::string_view  name) -> std::shared_ptr< process::Event >
virtual

Called by the framework to resolve an event with a specific name.

◆ resolveEventByName()

auto xentara::io::Io::resolveEventByName ( std::string_view  name) -> std::shared_ptr< process::Event >
finalprivatevirtual

Virtual overide for skill::Element::resolveEventByName()

This function just calls resolveEvent()

Reimplemented from xentara::skill::Element.

◆ resolveEventByUuid()

auto xentara::io::Io::resolveEventByUuid ( const utils::core::Uuid uuid) -> std::shared_ptr< process::Event >
finalprivatevirtual

Virtual overide for skill::Element::resolveEventByUuid()

This function calls resolveEvent(), selecting a name taken from a list of standard event UUIDs.

Reimplemented from xentara::skill::Element.

◆ resolveTask()

virtual auto xentara::io::Io::resolveTask ( std::string_view  name) -> std::shared_ptr< process::Task >
virtual

Called by the framework to resolve a task with a specific name.

◆ resolveTaskByName()

auto xentara::io::Io::resolveTaskByName ( std::string_view  name) -> std::shared_ptr< process::Task >
finalprivatevirtual

Virtual overide for skill::Element::resolveTaskByName()

This function just calls resolveAttribute()

Reimplemented from xentara::skill::Element.

◆ resolveTaskByUuid()

auto xentara::io::Io::resolveTaskByUuid ( const utils::core::Uuid uuid) -> std::shared_ptr< process::Task >
finalprivatevirtual

Virtual overide for skill::Element::resolveTaskByUuid()

This function calls resolveTask(), selecting a name taken from a list of standard task UUIDs.

Reimplemented from xentara::skill::Element.

◆ writeHandle()

virtual auto xentara::io::Io::writeHandle ( const model::Attribute attribute) -> data::WriteHandle
virtualnoexcept

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