|
xentara-workbench-plugin v1.3
The Xentara Workbench Plugin Framework
|
A value that keeps track of whether is was ever assigned to. More...
#include <xentara/workbench/bindings/ValueOrUndefined.hpp>
Public Types | |
| using | ValueView = __const_reference_or_basic_string_view__ |
| A type representing a view of the value. | |
Public Member Functions | |
| ValueOrUndefined ()=default | |
| Default constructor. | |
| ValueOrUndefined (const ValueOrUndefined &)=default | |
| Copy constructor. | |
| ValueOrUndefined (ValueOrUndefined &&)=default | |
| Move constructor. | |
| template<typename RelatedValue > | |
| constexpr | ValueOrUndefined (const ValueOrUndefined< RelatedValue > &other) |
| Copy constructor for related values. | |
| template<typename RelatedValue > | |
| constexpr | ValueOrUndefined (ValueOrUndefined< RelatedValue > &&other) |
| Move constructor for related values. | |
| constexpr | ValueOrUndefined (Value &&value) |
| Default constructor. | |
| constexpr | ValueOrUndefined (const Value &value) |
| Default constructor. | |
| template<class... Arguments> | |
| constexpr | ValueOrUndefined (std::in_place_t, Arguments &&...arguments) |
| Move that initializes the value. | |
| template<class InitValue , class... Arguments> | |
| constexpr | ValueOrUndefined (std::in_place_t, std::initializer_list< InitValue > initializerList, Arguments &&...arguments) |
| Move that initializes the value. | |
| template<typename UndefinedValue > | |
| constexpr | ValueOrUndefined (const Undefined< UndefinedValue > &undefined) noexcept(std::is_nothrow_constructible_v< Value, const UndefinedValue & >) |
| Copy constructor for undefined values. | |
| template<typename UndefinedValue > | |
| constexpr | ValueOrUndefined (Undefined< UndefinedValue > &&undefined) noexcept(std::is_nothrow_constructible_v< Value, UndefinedValue && >) |
| Move constructor for undefined values. | |
| auto | operator= (const ValueOrUndefined &) -> ValueOrUndefined &=default |
| Copy constructor. | |
| auto | operator= (ValueOrUndefined &&) -> ValueOrUndefined &=default |
| Move constructor. | |
| template<typename RelatedValue > | |
| constexpr auto | operator= (const ValueOrUndefined< RelatedValue > &rhs) -> ValueOrUndefined & |
| Copy constructor for related values. | |
| template<typename RelatedValue > | |
| constexpr auto | operator= (ValueOrUndefined< RelatedValue > &&rhs) noexcept(std::is_nothrow_assignable_v< Value &, RelatedValue && >) -> ValueOrUndefined & |
| Move constructor for related values. | |
| constexpr auto | operator= (const Value &value) noexcept(std::is_nothrow_assignable_v< Value &, const Value & >) -> ValueOrUndefined & |
| Default constructor. | |
| constexpr auto | operator= (Value &&value) noexcept(std::is_nothrow_assignable_v< Value &, Value && >) -> ValueOrUndefined & |
| Assignment operator. | |
| template<class UndefinedValue > | |
| constexpr auto | operator= (const Undefined< UndefinedValue > &undefined) |
| template<class UndefinedValue > | |
| constexpr auto | operator= (Undefined< UndefinedValue > &&undefined) |
| constexpr | operator ValueView () const noexcept |
| Conversion to a value view. | |
| constexpr auto | hasValue () const noexcept -> bool |
| Checks whether the object contains a value. | |
| constexpr auto | value () const &noexcept -> const Value & |
| Gets the value. | |
| constexpr auto | value () &noexcept -> Value & |
| Gets the value. | |
| constexpr auto | value () const &&noexcept -> const Value && |
| Gets the value. | |
| constexpr auto | value () &&noexcept -> Value && |
| Gets the value. | |
| constexpr auto | swap (ValueOrUndefined &other) noexcept(std::is_nothrow_swappable_v< Value >) -> void |
| Swaps two undefined values. | |
A value that keeps track of whether is was ever assigned to.
This type can be used to store properties that can have an “undefined” state. This can be used to keep track of whether the property was ever set, allowing you to consider default values an error. This is useful for things like device IDs or PLC data block IDs that cannot have a useful default value.
Note that an undefined value still has a value associated with it. This value should reflect a useful default, giving the user a hint of what the value could be.
ValueOrUndefined values can be bound to bindings in the same way as the base value. For example, a variable of type ValueOrUndefined<std::string> can be bound to a binding of type TextField.
| using xentara::workbench::bindings::ValueOrUndefined< Value >::ValueView = __const_reference_or_basic_string_view__ |
A type representing a view of the value.
This is normally a const reference to the value, except for instatiations of std::basic_string, where the view is an std::basic_string_view with the same character type and traits.
|
default |
Default constructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
constexpr |
Copy constructor for related values.
|
constexpr |
Move constructor for related values.
|
constexpr |
Default constructor.
|
constexpr |
Default constructor.
|
constexpr |
Move that initializes the value.
|
constexpr |
Move that initializes the value.
|
constexprnoexcept |
Copy constructor for undefined values.
|
constexprnoexcept |
Move constructor for undefined values.
|
constexprnoexcept |
Checks whether the object contains a value.
|
constexprnoexcept |
Conversion to a value view.
|
constexpr |
|
constexprnoexcept |
Default constructor.
|
default |
Copy constructor.
|
constexpr |
Copy constructor for related values.
|
constexpr |
|
constexprnoexcept |
Assignment operator.
|
default |
Move constructor.
|
constexprnoexcept |
Move constructor for related values.
|
constexprnoexcept |
Swaps two undefined values.
|
constexprnoexcept |
Gets the value.
|
constexprnoexcept |
Gets the value.
|
constexprnoexcept |
Gets the value.
|
constexprnoexcept |
Gets the value.