Rewritted ResourceLoader and moved it to core

Added creation constructor to NzImage
Added member function functor
Added option to build Nazara as one library (instead of many)
Fixed some 2011 copyrights
Made use of "using def = T" C++11 feature instead of some illigible
typedefs
Removed unused premake file
This commit is contained in:
Lynix
2012-08-18 01:46:01 +02:00
parent 5619ddb0b1
commit 15afde86c8
51 changed files with 542 additions and 629 deletions

View File

@@ -2,23 +2,41 @@
// 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) :
function(func)
template<typename F>
NzFunctorWithoutArgs<F>::NzFunctorWithoutArgs(F func) :
m_func(func)
{
}
template<typename F> void NzFunctorWithoutArgs<F>::Run()
template<typename F>
void NzFunctorWithoutArgs<F>::Run()
{
function();
m_func();
}
template<typename F, typename... Args> NzFunctorWithArgs<F, Args...>::NzFunctorWithArgs(F func, Args&... args) :
function(func),
arguments(args...)
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()
template<typename F, typename... Args>
void NzFunctorWithArgs<F, Args...>::Run()
{
NzUnpackTuple(function, arguments);
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)();
}