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

Access to the Xentara model. More...

#include <xentara/Model.hpp>

Public Member Functions

 Model ()=delete
 No default construction.
 
auto findElement (std::string_view primaryKey) const -> Element
 Gets a element identified by the given primary key.
 
auto findDataPoint (std::string_view primaryKey) const -> Element
 Gets a element of data point type identified by the given primary key.
 
 Model (const Model &)=delete
 Delete the copy constructor.
 
auto operator= (const Model &) -> Model &=delete
 Delete the assignment operator.
 

Detailed Description

Access to the Xentara model.

This class provides access to model elements from the Xentara model file, including elements that are data points. You never create objects of this class yourself, this class is always returned from InitContext::model().

Constructor & Destructor Documentation

◆ Model() [1/2]

xentara::Model::Model ( )
delete

No default construction.

◆ Model() [2/2]

xentara::Model::Model ( const Model )
delete

Delete the copy constructor.

Member Function Documentation

◆ findDataPoint()

auto xentara::Model::findDataPoint ( std::string_view  primaryKey) const -> Element

Gets a element of data point type identified by the given primary key.

This function provides an element of data point type from the Xentara model tree based on the given primary key. The key must be the primary key of the Xentara element, and it can refer to any data point in the xentara model.

Parameters
primaryKeyThe key used to identify the desired data point.
Returns
The desired element which is of type data point.
Exceptions
std::runtime_errorThe requested element does not exist in the Xentara model tree
std::runtime_errorThe requested element is not a data point in the Xentara model tree.

◆ findElement()

auto xentara::Model::findElement ( std::string_view  primaryKey) const -> Element

Gets a element identified by the given primary key.

This function provides an element from the Xentara model tree based on the given primary key. The key must be the primary key of the Xentara element, and it can refer to any element in the xentara model.

Parameters
primaryKeyThe key used to identify the desired element.
Returns
The desired element.
Exceptions
std::runtime_errorThe requested element does not exist in the Xentara model tree.

◆ operator=()

auto xentara::Model::operator= ( const Model ) -> Model &=delete
delete

Delete the assignment operator.