67 lines
1.7 KiB
C++
67 lines
1.7 KiB
C++
/*
|
||
* LateBindingSignal.hh
|
||
*
|
||
* Created on: 28 сент. 2020 г.
|
||
* Author: LeonidTitov
|
||
*/
|
||
|
||
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSIGNAL_HH_
|
||
#define UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSIGNAL_HH_
|
||
|
||
#include "../../schematic/LateBindingValue.hpp"
|
||
|
||
#include "../ISetupStep.hh"
|
||
|
||
namespace application { namespace schematic {
|
||
|
||
//!Сигнал позднего связывания.
|
||
struct LateBindingSignal : public ISetupStep {
|
||
|
||
bool input( Environment & env ) { return true; }
|
||
void build( Environment & env );
|
||
|
||
struct Links {
|
||
Environment::SignalId late; //!<Сигнал позднего связывания.
|
||
Environment::Id bind; //!<Интерфейс связывания.
|
||
};
|
||
|
||
//!Начальные значения.
|
||
struct Setting {
|
||
float default_value; //!<Значение cигнала до связывания.
|
||
};
|
||
|
||
const Links & links;
|
||
const Setting & setting;
|
||
|
||
LateBindingSignal( const Links & links, const Setting & setting ) :
|
||
links(links), setting(setting) {}
|
||
};
|
||
|
||
|
||
//!Связывание сигнала позднего связывания.
|
||
struct BindSignal : public ISetupStep {
|
||
|
||
::schematic::LateBindingValue<float> * late_signal = nullptr;
|
||
systemic::ISignal * origin = nullptr;
|
||
|
||
bool input( Environment & env );
|
||
void build( Environment & env );
|
||
|
||
struct Links {
|
||
Environment::Id bind; //!<Интерфейс связывания.
|
||
Environment::SignalId origin; //!<Сигнал для привязки.
|
||
};
|
||
|
||
const Links & links;
|
||
|
||
BindSignal( const Links & links ) :
|
||
links(links) {}
|
||
};
|
||
|
||
}}
|
||
|
||
|
||
|
||
|
||
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSIGNAL_HH_ */
|