From 17d1fe23b704cacb1cdd9b58156f354626b36f8c Mon Sep 17 00:00:00 2001 From: Matthew Barth Date: Thu, 11 May 2017 15:00:36 -0500 Subject: Add setting zone speed action Enable an action to be defined that sets the zone to a given speed when a number of properties are set to a given value Change-Id: I5252a20a24bdb14dee63080f2c08b080c82ad7e8 Signed-off-by: Matthew Barth --- control/functor.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'control/functor.hpp') diff --git a/control/functor.hpp b/control/functor.hpp index f2f3a78..2b36445 100644 --- a/control/functor.hpp +++ b/control/functor.hpp @@ -26,6 +26,19 @@ auto make_handler(T&& handler) return Handler(std::forward(handler)); } +/** + * @brief Create an action function object + * + * @param[in] action - The action being created + * + * @return - The created action function object + */ +template +auto make_action(T&& action) +{ + return Action(std::forward(action)); +} + /** * @struct Property Changed * @brief A match filter functor for Dbus property value changed signals -- cgit v1.2.1