109 lines
2.9 KiB
C++
109 lines
2.9 KiB
C++
/*
|
|
* StatusLogicSetup.h
|
|
*
|
|
* Created on: 1 îêò. 2019 ã.
|
|
* Author: user
|
|
*/
|
|
|
|
#ifndef SOURCE_APPLICATION_SCHEMATIC_STATUSLOGICSETUP_H_
|
|
#define SOURCE_APPLICATION_SCHEMATIC_STATUSLOGICSETUP_H_
|
|
|
|
#include "../ISetupStep.hh"
|
|
|
|
#include "../../systemic/IStatus.hh"
|
|
#include "../../schematic/StatusLogic.hpp"
|
|
|
|
namespace application { namespace schematic {
|
|
|
|
//!Óíàðíîå îòðèöàíèå çíà÷åíèÿ ñòàòóñà. Ðåàëèçóåò ëîãèêó "not a".
|
|
struct StatusNot : public ISetupStep {
|
|
|
|
typedef systemic::IStatus Status;
|
|
typedef systemic::detail::StatusNot Logic;
|
|
|
|
Status * a = nullptr;
|
|
|
|
bool input( Environment & env );
|
|
void build( Environment & env );
|
|
|
|
struct Links {
|
|
Environment::StatusId a; //!<Èñõîäíûé ñòàòóñ "a".
|
|
Environment::StatusId logic_not; //!<Îòðèöàíèå èñõîäíîãî ñòàòóñà "a".
|
|
};
|
|
|
|
const Links & links;
|
|
StatusNot( const Links & links );
|
|
};
|
|
|
|
//!Ëîãè÷åñêîå "È" ñòàòóñîâ. Ðåàëèçóåò ëîãèêó "a and b".
|
|
struct StatusAnd : public ISetupStep {
|
|
|
|
typedef systemic::IStatus Status;
|
|
typedef systemic::detail::StatusAnd<2> Logic;
|
|
|
|
Status * a = nullptr;
|
|
Status * b = nullptr;
|
|
|
|
bool input( Environment & env );
|
|
void build( Environment & env );
|
|
|
|
struct Links {
|
|
Environment::StatusId a; //!<Èñõîäíûé ñòàòóñ "a".
|
|
Environment::StatusId logic_and; //!<Ëîãè÷åñêîå "È" ñòàòóñîâ "a" è "b".
|
|
Environment::StatusId b; //!<Èñõîäíûé ñòàòóñ "b".
|
|
|
|
};
|
|
|
|
const Links & links;
|
|
StatusAnd( const Links & links );
|
|
};
|
|
|
|
//!Ëîãè÷åñêîå "ÈËÈ" ñòàòóñîâ. Ðåàëèçóåò ëîãèêó "a or b".
|
|
struct StatusOr : public ISetupStep {
|
|
|
|
typedef systemic::IStatus Status;
|
|
typedef systemic::detail::StatusOr<2> Logic;
|
|
|
|
Status * a = nullptr;
|
|
Status * b = nullptr;
|
|
|
|
bool input( Environment & env );
|
|
void build( Environment & env );
|
|
|
|
struct Links {
|
|
Environment::StatusId a; //!<Èñõîäíûé ñòàòóñ "a".
|
|
Environment::StatusId logic_or; //!<Ëîãè÷åñêîå "ÈËÈ" ñòàòóñîâ "a" è "b".
|
|
Environment::StatusId b; //!<Èñõîäíûé ñòàòóñ "b".
|
|
};
|
|
|
|
const Links & links;
|
|
StatusOr( const Links & links );
|
|
};
|
|
|
|
////!Ëîãè÷åñêîå "èñêëþ÷àþùåå ÈËÈ" ñòàòóñîâ. Ðåàëèçóåò ëîãèêó "a xor b".
|
|
//struct StatusXor : public ISetupStep {
|
|
//
|
|
// typedef systemic::IStatus Status;
|
|
// typedef systemic::detail::StatusXor<2> Logic;
|
|
//
|
|
// Status * a = nullptr;
|
|
// Status * b = nullptr;
|
|
//
|
|
// bool input( Environment & env );
|
|
// void build( Environment & env );
|
|
//
|
|
// struct Links {
|
|
// Environment::StatusId a; //!<Èñõîäíûé ñòàòóñ "a".
|
|
// Environment::StatusId logic_xor; //!<Ëîãè÷åñêîå "ÈËÈ" ñòàòóñîâ "a" è "b".
|
|
// Environment::StatusId b; //!<Èñõîäíûé ñòàòóñ "b".
|
|
// };
|
|
//
|
|
// const Links & links;
|
|
// StatusXor( const Links & links );
|
|
//};
|
|
|
|
} /* namespace schematic */
|
|
} /* namespace application */
|
|
|
|
#endif /* SOURCE_APPLICATION_SCHEMATIC_STATUSLOGICSETUP_H_ */
|