#ifndef FREEMOUNTMANAGER_H
#define FREEMOUNTMANAGER_H
/*
*file freeMountManager.h
*class FreeMountManager
*
*created on 25/01/2006
*Copyright Piquier Production
*
*/
#include <map>
#include "Mount.h"

#include "MemoryManager/debugNew.h"

class FreeMountManager{
      
//    attributes      
      
      private: 
	/**
	* this vector contains all the free mounts
	*/               
	std::map<void*,Mount*> mount;      
      

	/**
	*Constructor
	*/
	FreeMountManager(); 

	virtual ~FreeMountManager();

	/**
	 * l'instance unique de freeMounManager
	 */
	static FreeMountManager * instance;
     
      public: 
            
	/**
	 * methode permettant de recuperer l'instance unique de freeMountManager
	 * @return freeMountManager: l'instance unique
	 */
	static FreeMountManager& getInstance();

	static void destroy();

	/**
	* create "number" free mounts  at "pos" scatered to "raduis" case around
	* each mount is had to the manager
	*/
	void createFreeMounts(int number, Point2D& pos, float radius);

	/**
	* create a free mount at the position "position" and had it to the manager
	* 
	* @param position : the position where the mount will be create
	*/
	void createMount(Point2D position);

	/**
	*Add the mount to the vector of free mounts
	*/
	void addMount(Mount *m);       
	
	/**
	*Remove the mount from the vector of free mounts
	*/
	void removeMount(Mount *m);   
	
	/**
	* return if the vector of free mounts contains the mount
	*/
	bool contains(Mount *m);

	/**
	* return all mounts contained in the freeMountManager
	*/
	std::map<void*,Mount*>* getAllFreeMount();

	
};

#include "MemoryManager/debugNewOff.h"


#endif

