/* * CounterLazyFast.hpp * * Created on: 4 ñåíò. 2020 ã. * Author: ÏÎ è ÂÒ ÝÏ */ #ifndef UMLIBRARY_SYSTEMIC_COUNTERLAZYFAST_HPP_ #define UMLIBRARY_SYSTEMIC_COUNTERLAZYFAST_HPP_ #include "ICounter.hh" namespace systemic { namespace detail { template class CounterLazyFast : public ICounter { private: const T & object; public: CounterLazyFast( const T & obj ); operator uint32_t() const final; CounterLazyFast(const CounterLazyFast &) = delete; CounterLazyFast & operator=(const CounterLazyFast &) = delete; }; } } template inline systemic::detail::CounterLazyFast::CounterLazyFast( const T & obj ) : object(obj) {} template inline systemic::detail::CounterLazyFast::operator uint32_t() const { return (object.*pf)(); } #endif /* UMLIBRARY_SYSTEMIC_COUNTERLAZYFAST_HPP_ */