43 lines
1011 B
C++
43 lines
1011 B
C++
/*
|
||
* CounterToSignalLazyConverter.hh
|
||
*
|
||
* Created on: 4 сент. 2020 г.
|
||
* Author: ПО и ВТ ЭП
|
||
*/
|
||
|
||
#ifndef UMLIBRARY_SYSTEMIC_COUNTERTOSIGNALLAZYCONVERTER_HH_
|
||
#define UMLIBRARY_SYSTEMIC_COUNTERTOSIGNALLAZYCONVERTER_HH_
|
||
|
||
#include "ISignal.hh"
|
||
#include "ICounter.hh"
|
||
|
||
namespace systemic { namespace detail {
|
||
|
||
class CounterToSignalLazyConverter : public ISignal {
|
||
private:
|
||
ICounter & object;
|
||
|
||
public:
|
||
CounterToSignalLazyConverter( ICounter & obj );
|
||
operator float() const final;
|
||
|
||
CounterToSignalLazyConverter(const CounterToSignalLazyConverter &) = delete;
|
||
CounterToSignalLazyConverter & operator=(const CounterToSignalLazyConverter &) = delete;
|
||
};
|
||
|
||
}
|
||
}
|
||
|
||
|
||
inline systemic::detail::CounterToSignalLazyConverter::CounterToSignalLazyConverter( ICounter & obj ) :
|
||
object(obj) {}
|
||
|
||
inline systemic::detail::CounterToSignalLazyConverter::operator float() const {
|
||
|
||
return static_cast<float>( object );
|
||
|
||
}
|
||
|
||
|
||
#endif /* UMLIBRARY_SYSTEMIC_COUNTERTOSIGNALLAZYCONVERTER_HH_ */
|