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

43 lines
999 B
C++
Raw Normal View History

/*
* CounterToSignalLazyConverter.hh
*
* Created on: 4 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. 2020 <EFBFBD>.
* Author: <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
*/
#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_ */