MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/systemic/CounterToSignalLazyConverter.hh
2024-06-07 11:12:56 +03:00

43 lines
1011 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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_ */