MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/systemic/CounterToSignalLazyConverter.hh

43 lines
999 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_ */