|
xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
|
A context used when loading skill elements. More...
#include <xentara/workbench/config/Context.hpp>
Classes | |
| class | ReferenceKey |
| A key used to resolve a cross reference in the configuration. More... | |
Public Member Functions | |
| virtual | ~Context ()=0 |
| Virtual destructor. | |
Resolving cross references | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< model::ElementReference > variable) -> void |
| Submits a request to resolve an element. | |
| template<std::invocable PostHandler> | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< model::ElementReference > variable, PostHandler postHandler) -> void |
| Submits a request to resolve an element, specifying a post processing handler. | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< model::AttributeReference > variable) -> void |
| Submits a request to resolve an attribute. | |
| template<std::invocable PostHandler> | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< model::AttributeReference > variable, PostHandler postHandler) -> void |
| Submits a request to resolve an attribute, specifying a post processing handler. | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< process::EventReference > variable) -> void |
| Submits a request to resolve an event. | |
| template<std::invocable PostHandler> | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< process::EventReference > variable, PostHandler postHandler) -> void |
| Submits a request to resolve an event, specifying a post processing handler. | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< process::TaskReference > variable) -> void |
| Submits a request to resolve a task. | |
| template<std::invocable PostHandler> | |
| auto | resolve (ReferenceKey key, std::reference_wrapper< process::TaskReference > variable, PostHandler postHandler) -> void |
| Submits a request to resolve a task, specifying a post processing handler. | |
| virtual auto | doResolve (std::string &&key, std::reference_wrapper< model::internal::BasicElementReference > variable, std::function< auto() ->void > &&postHandler) -> void=0 |
| Resolves an element. | |
| virtual auto | doResolveMember (std::string &&key, std::reference_wrapper< model::internal::BasicElementReference > variable, std::function< auto() ->void > &&postHandler) -> void=0 |
| Resolves an element member. | |
A context used when loading skill elements.
|
pure virtualdefault |
Virtual destructor.
|
privatepure virtual |
Resolves an element.
|
privatepure virtual |
Resolves an element member.
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< model::AttributeReference > | variable | ||
| ) | -> void |
Submits a request to resolve an attribute.
This function submits a request to resolve a cross reference to an attribute using the given key. Once the cross reference has been resolved, it will be assigned to a variable.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to attributes of elements that have not been loaded yet.
To submit a request to resolve an attribute and store it in a member variable named *_referredAttribute*, for example, you can use the following code:
| key | The primary key of the attribute to resolve |
| variable | A reference to the variable the resolved attribute should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< model::AttributeReference > | variable, | ||
| PostHandler | postHandler | ||
| ) | -> void |
Submits a request to resolve an attribute, specifying a post processing handler.
This function submits a request to resolve a cross reference to an attribute using the given key. Once the cross reference has been resolved, it will be assigned to a variable. After assigning the variable, an additional handler will be called that allows some post processing to be done.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to attributes of elements that have not been loaded yet.
To submit a request to resolve an attribute and store it in a member variable named *_referredAttribute*, and then call the function postLoadReferredAttribute(), for example, you can use the following code:
| key | The primary key of the attribute to resolve |
| variable | A reference to the variable the resolved attribute should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| postHandler | A callback that will be called after the variable has been set. |
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< model::ElementReference > | variable | ||
| ) | -> void |
Submits a request to resolve an element.
This function submits a request to resolve a cross reference to an element using the given key. Once the cross reference has been resolved, it will be assigned to a variable.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to elements that have not been loaded yet.
To submit a request to resolve a Xentara element and store it in a member variable named *_referredElement*, for example, you can use the following code:
| key | The primary key of the element to resolve |
| variable | A reference to the variable the resolved element should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< model::ElementReference > | variable, | ||
| PostHandler | postHandler | ||
| ) | -> void |
Submits a request to resolve an element, specifying a post processing handler.
This function submits a request to resolve a cross reference to an element using the given key. Once the cross reference has been resolved, it will be assigned to a variable. After assigning the variable, an additional handler will be called that allows some post processing to be done.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to elements that have not been loaded yet.
To submit a request to resolve a Xentara element and store it in a member variable named *_referredElement*, and then call the function postLoadReferredElement(), for example, you can use the following code:
| key | The primary key of the element to resolve |
| variable | A reference to the variable the resolved element should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| postHandler | A callback that will be called after the variable has been set. |
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< process::EventReference > | variable | ||
| ) | -> void |
Submits a request to resolve an event.
This function submits a request to resolve a cross reference to an event using the given key. Once the cross reference has been resolved, it will be assigned to a variable.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to events of elements that have not been loaded yet.
To submit a request to resolve an event and store it in a member variable named *_referredEvent*, for example, you can use the following code:
| key | The primary key of the event to resolve |
| variable | A reference to the variable the resolved event should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< process::EventReference > | variable, | ||
| PostHandler | postHandler | ||
| ) | -> void |
Submits a request to resolve an event, specifying a post processing handler.
This function submits a request to resolve a cross reference to an event using the given key. Once the cross reference has been resolved, it will be assigned to a variable. After assigning the variable, an additional handler will be called that allows some post processing to be done.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to events of elements that have not been loaded yet.
To submit a request to resolve an event and store it in a member variable named *_referredEvent*, and then call the function postLoadReferredEvent(), for example, you can use the following code:
| key | The primary key of the event to resolve |
| variable | A reference to the variable the resolved event should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| postHandler | A callback that will be called after the variable has been set. |
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< process::TaskReference > | variable | ||
| ) | -> void |
Submits a request to resolve a task.
This function submits a request to resolve a cross reference to a task using the given key. Once the cross reference has been resolved, it will be assigned to a variable.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to tasks of elements that have not been loaded yet.
To submit a request to resolve a task and store it in a member variable named *_referredTask*, for example, you can use the following code:
| key | The primary key of the task to resolve |
| variable | A reference to the variable the resolved task should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| auto xentara::workbench::config::Context::resolve | ( | ReferenceKey | key, |
| std::reference_wrapper< process::TaskReference > | variable, | ||
| PostHandler | postHandler | ||
| ) | -> void |
Submits a request to resolve a task, specifying a post processing handler.
This function submits a request to resolve a cross reference to a task using the given key. Once the cross reference has been resolved, it will be assigned to a variable. After assigning the variable, an additional handler will be called that allows some post processing to be done.
The reference will not be resolved immediately, but only after the entire configuration has been loaded. This is necessary in order to be able to resolve references to tasks of elements that have not been loaded yet.
To submit a request to resolve a task and store it in a member variable named *_referredTask*, and then call the function postLoadReferredTask(), for example, you can use the following code:
| key | The primary key of the task to resolve |
| variable | A reference to the variable the resolved task should be assigned to. The reference must remain valid during the entire loading of the Xentara model, not just the [load()](skill::Element::load()] function. |
| postHandler | A callback that will be called after the variable has been set. |