PropRegister Class Reference
Register properties have a value represented by raw bytes. More...
![](common/img/classic4_prop_register.png)
Public Member Functions
uint64_t | size (Error &err=Error::Default()) const Queries the size of a register property. |
std::vector< uint8_t > | getValue (Error &err=Error::Default()) Reads data from a register property. |
bool | setValue (const std::vector< uint8_t > &buffer, Error &err=Error::Default()) Reads data to a register property. |
![]() | |
Property ()=default Creates an invalid object. |
|
bool | is_valid () const noexcept Checks whether this property is a valid object. |
bool | operator== (const Property &other) const noexcept Checks whether a property object refers to the same property as another property object. |
bool | operator!= (const Property &other) const noexcept Checks whether a property object refers to a different property as another property object. |
bool | operator< (const Property &other) const noexcept Provides an ordering of property objects. |
PropType | type (Error &err=Error::Default()) const Returns the type of the property. |
std::string | name (Error &err=Error::Default()) const Returns the name of the property. |
bool | isAvailable (Error &err=Error::Default()) const Checks whether a property is currently available. |
bool | isLocked (Error &err=Error::Default()) const Checks whether a property is currently locked. |
bool | isLikelyLockedByStream (Error &err=Error::Default()) const Tries to determine whether a property is locked because a data stream is active. |
bool | isReadOnly (Error &err=Error::Default()) const Checks whether a property is read-only. |
PropVisibility | visibility (Error &err=Error::Default()) const Returns a visibility hint for the property. |
std::string | displayName (Error &err=Error::Default()) const Returns the display name of the property. |
std::string | tooltip (Error &err=Error::Default()) const Returns a tooltip for the property. |
std::string | description (Error &err=Error::Default()) const Returns a description for the property. |
PropCommand | asCommand (Error &err=Error::Default()) const Converts this property into a PropCommand. |
PropInteger | asInteger (Error &err=Error::Default()) const Converts this property into a PropInteger. |
PropBoolean | asBoolean (Error &err=Error::Default()) const Converts this property into a PropBoolean. |
PropFloat | asFloat (Error &err=Error::Default()) const Converts this property into a PropFloat. |
PropString | asString (Error &err=Error::Default()) const Converts this property into a PropString. |
PropEnumeration | asEnumeration (Error &err=Error::Default()) const Converts this property into a PropEnumeration. |
PropEnumEntry | asEnumEntry (Error &err=Error::Default()) const Converts this property into a PropEnumEntry. |
PropRegister | asRegister (Error &err=Error::Default()) const Converts this property into a PropRegister. |
PropCategory | asCategory (Error &=Error::Default()) const Converts this property into a PropCategory. |
NotificationToken | eventAddNotification (NotificationHandler cb, Error &err=Error::Default()) Registers a new property notification event handler. |
bool | eventRemoveNotification (NotificationToken token, Error &err=Error::Default()) Unregisters a previously registered property notification event handler. |
bool | isSelector (Error &err=Error::Default()) const Indicates whether this property's value changes the meaning and/or value of other properties. |
std::vector< Property > | selectedProperties (Error &err=Error::Default()) const Returns the list of properties whose values' meaning depend on this property. |
Additional Inherited Members
![]() | |
using | NotificationHandler = std::function< void(Property &prop)> Function prototype for property notification event handlers. |
using | NotificationToken = void * Represents a registered callback. |
Detailed Description
Register properties have a value represented by raw bytes.
PropRegister instances are created in two ways:
- By converting a Property known to be a command property using Property::asRegister()
- By directly querying a typed known property using PropertyMap::findRegister().
Member Function Documentation
◆ getValue()
|
inline |
Reads data from a register property.
- Parameters
-
[out] err Reference to an error handler. See Error Handling for details.
- Returns
- The current value of the register.
If an error occurs, the returned vector is empty. Check the err output parameter for details.
◆ setValue()
|
inline |
Reads data to a register property.
- Parameters
-
[in] buffer A std::vector
containing the data to be written to the property[out] err Reference to an error handler. See Error Handling for details.
- Returns
true
on success, otherwisefalse
.
Check the err output parameter for details.
◆ size()
|
inline |
Queries the size of a register property.
The size of a register property is not necessarily constant; it can change depending on the value of other properties.
- Parameters
-
[out] err Reference to an error handler. See Error Handling for details.
- Returns
- The size of the register property, or
0
, if an error occurred.
Check the err output parameter for details.