/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2023-02-13
* Changed:         2026-06-23
*
* */

#include <ls-std/core/ConditionalFunctionExecutor.hpp>

using ls::standard::core::ConditionalFunctionExecutor;
using std::function;

ConditionalFunctionExecutor::ConditionalFunctionExecutor(const bool _condition) : condition(_condition)
{}

ConditionalFunctionExecutor::~ConditionalFunctionExecutor() = default;

void ConditionalFunctionExecutor::execute(const function<void()> &_function) const
{
  if (this->condition)
  {
    _function();
  }
}
