|
xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
|
A reference to a Xentara element. More...
#include <xentara/workbench/model/ElementReference.hpp>
Inheritance diagram for xentara::workbench::model::ElementReference:Classes | |
| class | ImportReference |
| A light-weight object that can be used to generate element references when importing elements using an [import button](bindings::ImportButton]. More... | |
Public Member Functions | |
| internal | operator bool () const noexcept |
| Checks whether the reference points to anything. | |
| auto | element () const -> utils::eh::expected< std::reference_wrapper< Element >, ui::String > |
| Gets the element. | |
| auto | primaryKey () const -> std::string |
| Gets the primary key of the element. | |
| auto | save (utils::json::encoder::Value &jsonValue) const -> void |
| Writes the reference to a JSON value. | |
| auto | saveTo (utils::json::encoder::Object &jsonObject, std::string_view name) const -> void |
| Adds the reference to a JSON object. | |
| auto | saveTo (utils::json::encoder::Array &jsonArray) const -> void |
| Writes the reference to a JSON array. | |
Public Member Functions inherited from xentara::workbench::bindings::CrossReferenceController | |
| CrossReferenceController () noexcept=default | |
| Default constructor. | |
| CrossReferenceController (const CrossReferenceController &other) | |
| Copy constructor. | |
| CrossReferenceController (CrossReferenceController &&other) noexcept | |
| Move constructor. | |
| virtual | ~CrossReferenceController ()=0 |
| Virtual destructor. | |
| auto | operator= (const CrossReferenceController &rhs) -> CrossReferenceController & |
| Copy assignment operator. | |
| auto | operator= (CrossReferenceController &&rhs) noexcept -> CrossReferenceController & |
| Move assignment operator that does not actually assign anything. | |
| auto | setReferringController (PropertyController &referringController) -> void |
| Sets the referring controller, that is the property controller that contains this object. | |
| auto | referringController () const -> PropertyController * |
| Gets the referring controller. | |
A reference to a Xentara element.
| auto xentara::workbench::model::ElementReference::element | ( | ) | const -> utils::eh::expected<std::reference_wrapper<Element>, ui::String> |
Gets the element.
|
explicitnoexcept |
Checks whether the reference points to anything.
| auto xentara::workbench::model::ElementReference::primaryKey | ( | ) | const -> std::string |
Gets the primary key of the element.
| auto xentara::workbench::model::ElementReference::save | ( | utils::json::encoder::Value & | jsonValue | ) | const -> void |
Writes the reference to a JSON value.
| jsonValue | The value |
| auto xentara::workbench::model::ElementReference::saveTo | ( | utils::json::encoder::Array & | jsonArray | ) | const -> void |
Writes the reference to a JSON array.
| jsonArray | The array |
| auto xentara::workbench::model::ElementReference::saveTo | ( | utils::json::encoder::Object & | jsonObject, |
| std::string_view | name | ||
| ) | const -> void |
Adds the reference to a JSON object.
| jsonObject | The object |
| name | The member name |