66 lines
1.8 KiB
C++
66 lines
1.8 KiB
C++
/*
|
||
* LateBindingStatus.hh
|
||
*
|
||
* Created on: 6 нояб. 2020 г.
|
||
* Author: developer
|
||
*/
|
||
|
||
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSTATUS_HH_
|
||
#define UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSTATUS_HH_
|
||
|
||
#include "../../schematic/LateBindingValue.hpp"
|
||
|
||
#include "../ISetupStep.hh"
|
||
|
||
#include "../../systemic/IStatus.hh"
|
||
|
||
namespace application { namespace schematic {
|
||
|
||
//!Сигнал позднего связывания.
|
||
struct LateBindingStatus : public ISetupStep {
|
||
|
||
bool input( Environment & env ) { return true; }
|
||
void build( Environment & env );
|
||
|
||
struct Links {
|
||
Environment::StatusId late; //!<Сигнал позднего связывания.
|
||
Environment::Id bind; //!<Интерфейс связывания.
|
||
};
|
||
|
||
//!Начальные значения.
|
||
struct Setting {
|
||
bool default_value; //!<Значение статуса до связывания.
|
||
};
|
||
|
||
const Links & links;
|
||
const Setting & setting;
|
||
|
||
LateBindingStatus( const Links & links, const Setting & setting ) :
|
||
links(links), setting(setting) {}
|
||
};
|
||
|
||
|
||
//!Связывание сигнала позднего связывания.
|
||
struct BindStatus : public ISetupStep {
|
||
|
||
::schematic::LateBindingValue<bool> * late_status = nullptr;
|
||
::systemic::IStatus * origin = nullptr;
|
||
|
||
bool input( Environment & env );
|
||
void build( Environment & env );
|
||
|
||
struct Links {
|
||
Environment::Id bind; //!<Интерфейс связывания.
|
||
Environment::StatusId origin; //!<Сигнал для привязки.
|
||
};
|
||
|
||
const Links & links;
|
||
|
||
BindStatus( const Links & links ) :
|
||
links(links) {}
|
||
};
|
||
|
||
}}
|
||
|
||
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSTATUS_HH_ */
|