Added Task Scheduler

Former-commit-id: ac37f749ae78f364db3d3edfabc8221802579989
This commit is contained in:
Lynix
2012-12-03 01:30:04 +01:00
parent 023e497777
commit ef567bd223
4 changed files with 240 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// Copyright (C) 2012 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
#include <Nazara/Core/Debug.hpp>
template<typename F>
void NzTaskScheduler::AddTask(F function)
{
AddTaskFunctor(new NzFunctorWithoutArgs<F>(function));
}
template<typename F, typename... Args>
void NzTaskScheduler::AddTask(F function, Args... args)
{
AddTaskFunctor(new NzFunctorWithArgs<F, Args...>(function, args...));
}
template<typename C>
void NzTaskScheduler::AddTask(void (C::*function)(), C* object)
{
AddTaskFunctor(new NzMemberWithoutArgs<C>(function, object));
}
#include <Nazara/Core/DebugOff.hpp>