template<typename Value, typename Property, class PropertyManager>
bn::by_value_template_action class

Modifies the property of a value by a given delta.

Template parameters
Value Value to modify.
Property Property of the value to modify.
PropertyManager Reads and writes the property of the value to modify.

Constructors, destructors, conversion operators

by_value_template_action(const Value& value, const Property& delta_property) protected
Constructor.
by_value_template_action(Value&& value, const Property& delta_property) protected
Constructor.

Public functions

void reset()
Resets the property to its initial state.
void update()
Adds delta_property to the property.

Protected functions

auto value() const -> const Value&
Returns the value to modify.
auto delta_property() const -> const Property&
Returns how much to add to the property when the action is updated.

Function documentation

template<typename Value, typename Property, class PropertyManager>
bn::by_value_template_action<Value, Property, PropertyManager>::by_value_template_action(const Value& value, const Property& delta_property) protected

Constructor.

Parameters
value Value to copy.
delta_property How much to add to the property when the action is updated.

template<typename Value, typename Property, class PropertyManager>
bn::by_value_template_action<Value, Property, PropertyManager>::by_value_template_action(Value&& value, const Property& delta_property) protected

Constructor.

Parameters
value Value to move.
delta_property How much to add to the property when the action is updated.