Files
NazaraEngine/include/Nazara/Core/Functor.inl
Lynix c096756dab Happy thousandth commit Nazara
Updated copyright year (Yay, 515 file updated)
Regenerated global headers
Fixed some typo
Improved some shaders
-Blah blah blah-

Thank you all for supporting my project !
-Lynix


Former-commit-id: e4e741b318ba4f203da5ffd265bd5e516e7ffd7d
2014-01-12 20:16:21 +01:00

43 lines
829 B
C++

// Copyright (C) 2014 Jérôme Leclercq
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
template<typename F>
NzFunctorWithoutArgs<F>::NzFunctorWithoutArgs(F func) :
m_func(func)
{
}
template<typename F>
void NzFunctorWithoutArgs<F>::Run()
{
m_func();
}
template<typename F, typename... Args>
NzFunctorWithArgs<F, Args...>::NzFunctorWithArgs(F func, Args&... args) :
m_func(func),
m_args(args...)
{
}
template<typename F, typename... Args>
void NzFunctorWithArgs<F, Args...>::Run()
{
NzUnpackTuple(m_func, m_args);
}
template<typename C>
NzMemberWithoutArgs<C>::NzMemberWithoutArgs(void (C::*func)(), C* object) :
m_func(func),
m_object(object)
{
}
template<typename C>
void NzMemberWithoutArgs<C>::Run()
{
(m_object->*m_func)();
}