12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2023-02-13
- * Changed: 2024-05-24
- *
- * */
- #ifndef LS_STD_CONDITIONAL_FUNCTION_EXECUTOR_HPP
- #define LS_STD_CONDITIONAL_FUNCTION_EXECUTOR_HPP
- #include <functional>
- #include <ls-std/os/dynamic-goal.hpp>
- /*
- * @class(name: 'ConditionalFunctionExecutor', package: 'Core')
- * */
- namespace ls::std::core
- {
- class LS_STD_DYNAMIC_GOAL ConditionalFunctionExecutor
- {
- public:
- explicit ConditionalFunctionExecutor(bool _condition);
- ~ConditionalFunctionExecutor();
- void execute(const ::std::function<void()> &_function) const;
- private:
- bool condition{};
- };
- }
- #endif
|