47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
|
|
/*
|
|||
|
|
* ApplySignal.hh
|
|||
|
|
*
|
|||
|
|
* Created on: 10 июн. 2020 г.
|
|||
|
|
* Author: LeonidTitov
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_APPLYSIGNAL_HH_
|
|||
|
|
#define UMLIBRARY_APPLICATION_SCHEMATIC_APPLYSIGNAL_HH_
|
|||
|
|
|
|||
|
|
#include "../ISetupStep.hh"
|
|||
|
|
|
|||
|
|
#include "../../schematic/functor/FunctorArgsSignal.hh"
|
|||
|
|
|
|||
|
|
namespace application { namespace schematic {
|
|||
|
|
|
|||
|
|
//!Модуль применяет сигнал как аргумент - к функции-действию.
|
|||
|
|
struct ApplySignal : public ISetupStep {
|
|||
|
|
|
|||
|
|
typedef systemic::IFunctor<void> Action;
|
|||
|
|
typedef systemic::IFunctor<void, float> Apply;
|
|||
|
|
|
|||
|
|
Apply * apply = nullptr;
|
|||
|
|
systemic::ISignal * arg = nullptr;
|
|||
|
|
|
|||
|
|
bool input( Environment & env );
|
|||
|
|
void build( Environment & env );
|
|||
|
|
|
|||
|
|
struct Links {
|
|||
|
|
Environment::StatusId value; //!<Применяемый в качестве аргумента функции сигнал.
|
|||
|
|
Environment::Id apply; //!<Функция применения сигнала.
|
|||
|
|
|
|||
|
|
Environment::Id action; //!<Итоговое действие.
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
const Links & links;
|
|||
|
|
|
|||
|
|
ApplySignal( const Links & links ) : links(links) {}
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
}}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_APPLYSIGNAL_HH_ */
|