Added Task Scheduler
Former-commit-id: ac37f749ae78f364db3d3edfabc8221802579989
This commit is contained in:
25
include/Nazara/Core/TaskScheduler.inl
Normal file
25
include/Nazara/Core/TaskScheduler.inl
Normal 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>
|
||||
Reference in New Issue
Block a user