Class FunctionProperty

Inheritance Relationships

Base Type

Class Documentation

class FunctionProperty : public DeviceProperty

Property backed by function calls.

Uses getter and setter functions to access the property value, allowing for computed or complex property implementations.

Public Functions

FunctionProperty(PropGetter getter, PropSetter setter, PropertyAccess access = PropertyAccess::ReadOnly)

Constructor.

Parameters:
  • getter – Function to get the property value

  • setter – Function to set the property value

  • access – Access control (default: ReadOnly)

virtual uint32_t get_value() const override

Get the value via getter function.

Returns:

Value returned by the getter function

virtual void set_value(uint32_t new_value) override

Set the value via setter function.

Parameters:

new_value – Value to pass to the setter function