|
xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
|
A placeholder element. More...
#include <xentara/workbench/skill/PlaceholderElement.hpp>
Inheritance diagram for xentara::workbench::skill::PlaceholderElement< DerivedElement, kClassName, kUuid, DisplayName, MenuText, kNewElementName, kCategory, kIsIncomplete >:Classes | |
| class | Binding |
| class | Class |
Public Member Functions | |
| virtual | ~PlaceholderElement ()=0 |
| Require this to be derived. | |
Public Member Functions inherited from xentara::workbench::skill::Element | |
| virtual | ~Element ()=0 |
| Virtual destructor. | |
| auto | name () const -> utils::string::StringView |
| Gets the name of the element. | |
| auto | primaryKey () const -> std::string |
| 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. | |
| auto | element () const noexcept -> const model::Element & |
| Gets the Xentara element for this skill element. | |
| auto | childElements () const -> model::ChildElementAccessor |
| Returns a list of all the element’s children. | |
| auto | parentElement () const -> const model::Element & |
| Returns the element’s parent. | |
Public Member Functions inherited from xentara::workbench::bindings::PropertyController | |
| PropertyController () noexcept=default | |
| Default constructor. | |
| PropertyController (const PropertyController &) noexcept | |
| Copy constructor that does not actually copy anything. | |
| PropertyController (PropertyController &&) noexcept | |
| Copy constructor that does not actually move anything. | |
| constexpr auto | operator= (const PropertyController &) noexcept -> PropertyController & |
| Copy assignment operator that does not actually assign anything. | |
| constexpr auto | operator= (PropertyController &&) noexcept -> PropertyController & |
| Move assignment operator that does not actually assign anything. | |
| virtual | ~PropertyController ()=0 |
| virtual destructor | |
| template<typename Type , typename Value > requires std::equality_comparable_with<const Type &, const Value &> && std::assignable_from<Type &, Value &&> | |
| auto | setProperty (Type &property, Value &&value) const -> bool |
| Sets an address-based property, and publishes changes if necessary. | |
| template<typename Type , PropertyChangedInvocable ChangeCallback> | |
| auto | subscribe (const Type &property, ChangeCallback &&changeCallback) -> Subscription |
| Subscribes to an address-based property. | |
| template<typename Type > | |
| auto | subscribe (const Type &property, SubscriptionCallbacks callbacks) -> Subscription |
| Subscribes to an address-based property, with support for specialized callbacks. | |
| template<typename Type > | |
| auto | publish (const Type &property, Action action=Action::ValueChanged, std::size_t index={}) const -> void |
| Publishes a change to the value and state for an address-based property. | |
| template<typename Type > | |
| auto | publishValue (const Type &property, Action action=Action::ValueChanged, std::size_t index={}) const -> void |
| Publishes a change to only the value of an address-based property. | |
| template<typename Type > | |
| auto | publishState (const Type &property) const -> void |
| Publishes a change in only the state of an address-based property. | |
| template<typename Type > | |
| auto | publishVisibility (const Type &property) const -> void |
| Publishes a change in the visibility of an address-based property. | |
| template<typename Type > | |
| auto | propertyState (const Type &property) const -> const utils::eh::expected< void, ui::String > & |
| Gets the state of an address-based property. | |
| template<typename Type > | |
| auto | propertyVisible (const Type &property) const -> bool |
| Gets the visibility of an address-based property. | |
| template<typename Type > | |
| auto | propertyId (const Type &property) const noexcept -> PropertyId |
| Gets the ID of an address-based property. | |
| template<typename Type > | |
| auto | propertyHandle (const Type &property) noexcept -> PropertyHandle |
| Creates a handle for an address-based property. | |
| template<PropertyChangedInvocable ChangeCallback> | |
| auto | subscribe (const PropertyId &propertyId, ChangeCallback &&changeCallback) -> Subscription |
| Subscribes to a property. | |
| auto | subscribe (const PropertyId &propertyId, SubscriptionCallbacks callbacks) -> Subscription |
| Subscribes to a property, with support for specialized callbacks. | |
| auto | publish (const PropertyId &propertyId, Action action=Action::ValueChanged, std::size_t index={}) const -> void |
| Publishes a value and state change for a property. | |
| auto | publishValue (const PropertyId &propertyId, Action action=Action::ValueChanged, std::size_t index={}) const -> void |
| Publishes a change to only the value of a property. | |
| auto | publishState (const PropertyId &propertyId) const -> void |
| Publishes a change in the state of a property. | |
| auto | publishVisibility (const PropertyId &propertyId) const -> void |
| Publishes a change in the visibility of a property. | |
| auto | propertyState (const PropertyId &propertyId) const -> const utils::eh::expected< void, ui::String > & |
| Gets the state of a property. | |
| auto | propertyVisible (const PropertyId &propertyId) const -> bool |
| Gets the visibility of a property. | |
| auto | propertyHandle (const PropertyId &propertyId) noexcept -> PropertyHandle |
| Creates a handle for a property. | |
Public Member Functions inherited from xentara::workbench::bindings::PropertyContainer | |
| PropertyContainer () noexcept=default | |
| Default constructor. | |
| PropertyContainer (const PropertyContainer &other) | |
| Copy constructor. | |
| PropertyContainer (PropertyContainer &&other) noexcept | |
| Move constructor. | |
| auto | operator= (const PropertyContainer &rhs) -> PropertyContainer & |
| Copy assignment operator. | |
| auto | operator= (PropertyContainer &&rhs) noexcept -> PropertyContainer & |
| Move assignment operator that does not actually assign anything. | |
| virtual | ~PropertyContainer ()=0 |
| Virtual destructor. | |
| auto | setEnclosingPropertyContainer (PropertyContainer &enclosingContainer, SetEnclosingPropertyContainerOptions options={}) -> void |
| Sets the enclosing container. | |
| auto | resetEnclosingPropertyContainer (SetEnclosingPropertyContainerOptions options={}) -> void |
| Resets the enclosing container. | |
| auto | enclosingPropertyContainer () const -> PropertyContainer * |
| Gets the enclosing container. | |
| auto | propertyErrorCount () const -> std::size_t |
| Gets the number of error properties, including those of sub containers. | |
| template<std::invocable Callback> | |
| auto | subscribeToPropertyErrorCount (Callback &&callback) -> ErrorCountSubscription |
| Subscribes to a property. | |
| auto | forEachCrossReference (const ForEachCrossReferenceFunction &function, ForEachCrossReferenceOptions options={}) noexcept -> void |
| Calls a function for each cross reference contained within the container. | |
Private Member Functions | |
| auto | load (utils::json::decoder::Object &jsonObject, config::Context &context) -> void final |
| Called by the framework to load the element’s configuration from a JSON object. | |
| auto | save (utils::json::encoder::Object &jsonObject) const -> void final |
| Called by the framework to save the element’s configuration to a JSON object. | |
| auto | makeBinding () -> std::unique_ptr< bindings::AbstractElementBinding > final |
| Called by the framework to create a binding for editing the element’s properties. | |
Additional Inherited Members | |
Public Types inherited from xentara::workbench::skill::Element | |
| using | ForEachAttributeFunction = utils::functional::function_ref< auto(const model::Attribute &) ->bool > |
| A callback for iterating over all attributes. | |
| using | ForEachEventFunction = utils::functional::function_ref< auto(const process::Event &) ->bool > |
| A callback for iterating over all events. | |
| using | ForEachTaskFunction = utils::functional::function_ref< auto(const process::Task &) ->bool > |
| A callback for iterating over all tasks. | |
Protected Member Functions inherited from xentara::workbench::skill::Element | |
| auto | publishElementMembers () const -> void |
| Publishes a change in the list of attributes, events, and/or tasks. | |
| auto | publishSyntheticChildren () const -> void |
| Publishes a change in the list of synthetic children. | |
Protected Member Functions inherited from xentara::workbench::bindings::PropertyContainer | |
| auto | subPropertyContainerAdded (const PropertyContainer &container) -> void |
| Must be called by derived classes if a sub container was added. | |
| auto | subPropertyContainerRemoved (const PropertyContainer &container) -> void |
| Must be called by derived classes if a sub container was removed. | |
| auto | subPropertyContainerListChanged (SubPropertyContainerListChangedOptions options={}) -> void |
| Must be called by derived classes if the list of sub containers changed completely. | |
| auto | subPropertyContainerListCopied (const PropertyContainer &other, SubPropertyContainerListChangedOptions options={}) -> void |
| Must be called by derived classes if the list of sub containers was copied from another container. | |
| auto | subPropertyContainerListMoved (PropertyContainer &other, SubPropertyContainerListChangedOptions options={}) -> void |
| Must be called by derived classes if the list of sub containers was moved from another container. | |
| auto | subPropertyContainerListSwapped (PropertyContainer &other, SubPropertyContainerListChangedOptions options={}) -> void |
| Must be called by derived classes if the list of sub containers was swapped with another container. | |
| auto | localPropertyErrorCountChanged () -> void |
| Must be called by derived classes if the value returned by localPropertyErrorCount() has changed. | |
| auto | raisePropertyNotification (const PropertyId &propertyId) const -> void |
| Passes a property notification to the enclosing container. | |
Related Symbols inherited from xentara::workbench::skill::Element | |
| template<std::derived_from< Element > Derived, typename... ConstructorArguments> | |
| auto | makeSyntheticChild (std::reference_wrapper< const Element::Class > elementClass, std::string name, ConstructorArguments &&...constructorArguments) -> Element::SyntheticChildPointer |
| Creates a synthetic child element. | |
| template<std::derived_from< Element > Derived, typename... ConstructorArguments> | |
| auto | makeSyntheticChild (std::string name, ConstructorArguments &&...constructorArguments) -> Element::SyntheticChildPointer |
| Creates a synthetic child, automatically selecting the class object. | |
A placeholder element.
|
pure virtualdefault |
Require this to be derived.
|
finalprivatevirtual |
Called by the framework to load the element’s configuration from a JSON object.
The standard configuration parameters "name", "UUID", "ACL", and "children" are handled automatically by the framework using a JSON object filter. The corresponding JSON members are filtered out, and will not be enumerated when you iterate over the JSON object’s members.
This function is called before the framework subscribes to any of the element’s properties via the base class bindings::PropertyController. It is therefore not necessary to publish any property changes as the properties are loaded.
| jsonObject | The JSON object. The object has a filter installed that will filter out and handle the standard configuration parameters. |
| context | A context that can be used to resolve cross-references. |
| std::runtime_error | The function must throw this exception (or a suitable subclass) if an error occurs. The loading function should be as permissive as possible, to allow faulty model files to be repaired using the Workbench. |
Reimplemented from xentara::workbench::skill::Element.
|
finalprivatevirtual |
Called by the framework to create a binding for editing the element’s properties.
This callback is called whenever the user tries to edit the properties of the element. The binding defines the UI elements that should be shown, and how these UI elements affect the properties of the skill element.
The binding will normally bind the user interface to member functions or member variables of the element being edited. To facilitate this, you can derive your binding class from bindings::ElementBinding rather than bindings::AbstractElementBinding.
Reimplemented from xentara::workbench::skill::Element.
|
finalprivatevirtual |
Called by the framework to save the element’s configuration to a JSON object.
The standard configuration parameters "name", "UUID", "ACL", and "children" are handled automatically by the framework and must not be written to the object.
| jsonObject | The JSON object. |
Reimplemented from xentara::workbench::skill::Element.