/* * SignalLazy.hpp * * Created on: 23 нояб. 2018 г. * Author: titov */ #ifndef SOURCE_SYSTEMIC_SIGNALLAZYFAST_HPP_ #define SOURCE_SYSTEMIC_SIGNALLAZYFAST_HPP_ #include "ISignal.hh" #include "ISignalOverride.hh" namespace systemic { namespace detail { template class SignalLazyFast : public ISignal { private: const T & object; public: SignalLazyFast( const T & obj ); operator float() const final; SignalLazyFast(const SignalLazyFast &) = delete; SignalLazyFast & operator=(const SignalLazyFast &) = delete; }; } } template inline systemic::detail::SignalLazyFast::SignalLazyFast( const T & obj ) : object(obj) {} template inline systemic::detail::SignalLazyFast::operator float() const { return (object.*pf)(); } #endif /* SOURCE_SYSTEMIC_SIGNALLAZYFAST_HPP_ */