xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
Loading...
Searching...
No Matches
xentara::workbench::bindings::PropertyId Class Referencefinal

An ID to identify a property in a property controller. More...

#include <xentara/workbench/bindings/PropertyId.hpp>

Public Member Functions

constexpr PropertyId () noexcept=default
 Default constructor that constructs a null ID that does not represent any property.
 
auto operator== (const PropertyId &) const -> bool=default
 Enable equality comparison.
 
auto operator<=> (const PropertyId &) const -> auto=default
 Enable three-way comparison.
 
constexpr operator bool () const noexcept
 Checks whether the ID represents a property.
 

Related Symbols

(Note that these are not member symbols.)

template<utils::tparam::String kName>
consteval auto operator""_propertyId () -> bindings::PropertyId
 Literal operator for creating a property ID from a property’s name.
 

Detailed Description

An ID to identify a property in a property controller.

To create a property ID for an address-based property, use the function PropertyController::propertyId(). To create the property ID for a variable named _portNumber, for example, you can use the following code:

auto propertyId = element().propertyId(_portNumber);

To create a property ID for a name-based property, use the literal operator operator""_propertyId(). To create the property ID for a property named “portNumber”, for example, you can use the following code:

auto propertyId = "portNumber"_propertyId;
Definition PropertyId.hpp:20
See also
PropertyController
PropertyHandle

Constructor & Destructor Documentation

◆ PropertyId()

constexpr xentara::workbench::bindings::PropertyId::PropertyId ( )
constexprdefaultnoexcept

Default constructor that constructs a null ID that does not represent any property.

Member Function Documentation

◆ operator bool()

constexpr xentara::workbench::bindings::PropertyId::operator bool ( ) const
explicitconstexprnoexcept

Checks whether the ID represents a property.

Returns
Return true if the ID is valid, or false if this is a ID that does not represent a property.

◆ operator<=>()

auto xentara::workbench::bindings::PropertyId::operator<=> ( const PropertyId ) const -> auto=default
default

Enable three-way comparison.

◆ operator==()

auto xentara::workbench::bindings::PropertyId::operator== ( const PropertyId ) const -> bool=default
default

Enable equality comparison.

Friends And Related Symbol Documentation

◆ operator""_propertyId()

template<utils::tparam::String kName>
consteval auto operator""_propertyId ( ) -> bindings::PropertyId
related

Literal operator for creating a property ID from a property’s name.

Include file
#include <xentara/workbench/bindings/PropertyController.hpp>