34 lines
656 B
C++
34 lines
656 B
C++
/*
|
||
* SignalSwitch.h
|
||
*
|
||
* Created on: 1 окт. 2019 г.
|
||
* Author: user
|
||
*/
|
||
|
||
#ifndef SOURCE_SCHEMATIC_SIGNALSWITCH_H_
|
||
#define SOURCE_SCHEMATIC_SIGNALSWITCH_H_
|
||
|
||
#include "../systemic/IStatus.hh"
|
||
#include "../systemic/ISignal.hh"
|
||
|
||
namespace systemic { namespace detail {
|
||
|
||
class SignalSwitch : public ISignal, public IStatus {
|
||
private:
|
||
ISignal & a;
|
||
ISignal & b;
|
||
|
||
public:
|
||
SignalSwitch( ISignal & a, ISignal & b ) : a(a), b(b) {}
|
||
virtual ~SignalSwitch() = default;
|
||
|
||
operator float() const final;
|
||
|
||
operator bool() const final;
|
||
};
|
||
|
||
} /* namespace detail */
|
||
} /* namespace systemic */
|
||
|
||
#endif /* SOURCE_SCHEMATIC_SIGNALSWITCH_H_ */
|