xentara-cpp-control v1.0.1
The Xentara C++ Control Framework
Loading...
Searching...
No Matches
xentara::Element Class Referencefinal

An element in the Xentara model tree. More...

#include <xentara/Element.hpp>

Public Member Functions

 Element ()=delete
 Deleted Constructor.
 
auto getChild (std::string_view objectKey) const -> Element
 Gets the child element with a specific object key within this element.
 
auto isDataPoint () const noexcept -> bool
 Checks whether this element is of type data point.
 
auto xentaraElement () const noexcept -> std::weak_ptr< model::Element >
 Gets the xentara skill element within the Xentara Model.
 

Detailed Description

An element in the Xentara model tree.

This class represents an element in the Xentara model tree, which can include data points. You can obtain this element using Model::findElement() or Config::getElement() in InitContext. If the element is a data point, you can retrieve it specifically with Model::findDataPoint() or Config::getDataPoint() from the InitContext.

Constructor & Destructor Documentation

◆ Element()

xentara::Element::Element ( )
delete

Deleted Constructor.

Member Function Documentation

◆ getChild()

auto xentara::Element::getChild ( std::string_view  objectKey) const -> Element

Gets the child element with a specific object key within this element.

This function could be used to get the child element of this element in case you want to setup your own tree structure for your control.

Parameters
objectKeyThe object key of the desired child within this element.
Returns
The desired child element
Exceptions
std::runtime_errorThe desired child element does not exist within this element.
std::runtime_errorThe element does not exist anymore.

◆ isDataPoint()

auto xentara::Element::isDataPoint ( ) const -> bool
noexcept

Checks whether this element is of type data point.

This function could be used to check whether the Element is of data point type. Only element of data point type can be Input and Output.

Returns
true if this element is of type data point, false otherwise.

◆ xentaraElement()

auto xentara::Element::xentaraElement ( ) const -> std::weak_ptr< model::Element >
noexcept

Gets the xentara skill element within the Xentara Model.

This function gets you the underlying xentara element for this Element. You can use the Xentara element to get more details and manage the element.

Returns
A pointer to xentara element.