/*
/ TASK.H
/ ******
/ The Kernel's Task Manager that handles all the
/ ITasks in the engine.
/
/ Will Beddow 2010 - http://343gs.com/brainstem
/
/ This software is currently under development
/ and is subject to change and improvement. Some
/ aspects of the system are incomplete and/or 
/ unstable due to ongoing implementation.
/
*/

#ifndef __TASK_H__
#define __TASK_H__

#include "Compile.h"
#include "Types.h"

#include <algorithm>
#include <list>
#include <map>
#include <iostream>
#include <utility>

namespace Brainstem 
{
	class TaskManager
	{
	public:
		TaskManager();
		~TaskManager();

		void Update();

		void AddTask(ITask* task);
		void RemoveTask(ITask* task);

		void KillAll();
		void Cleanup();

		bool StartTasks();

	private:
		std::list<IPtr<ITask>> Tasks;
	};
}

#endif