#include <bn_value_template_actions.h>
template<typename Value, class PropertyManager>
bool_toggle_value_template_action class
Toggles a boolean property of a value when the action is updated a given number of times.
Template parameters | |
---|---|
Value | Value to modify. |
PropertyManager | Reads and writes the property of the value to modify. |
Constructors, destructors, conversion operators
- bool_toggle_value_template_action(const Value& value, int duration_updates) protected
- Constructor.
- bool_toggle_value_template_action(Value&& value, int duration_updates) protected
- Constructor.
Public functions
- void reset()
- Resets the property to its initial state.
- void update()
- Toggles the property when the given amount of update calls are done.
- auto duration_updates() const -> int
- Returns how many times the action has to be updated to toggle the property.
Protected functions
- auto value() const -> const Value&
- Returns the value to modify.
Function documentation
template<typename Value, class PropertyManager>
bn:: bool_toggle_value_template_action<Value, PropertyManager>:: bool_toggle_value_template_action(const Value& value,
int duration_updates) protected
Constructor.
Parameters | |
---|---|
value | Value to copy. |
duration_updates | How many times the action has to be updated to toggle the property. |
template<typename Value, class PropertyManager>
bn:: bool_toggle_value_template_action<Value, PropertyManager>:: bool_toggle_value_template_action(Value&& value,
int duration_updates) protected
Constructor.
Parameters | |
---|---|
value | Value to move. |
duration_updates | How many times the action has to be updated to toggle the property. |