#ifndef FACTORY_H
#define FACTORY_H

#include "bulletmanufacturer.h"
#include <map>

class CFactory
{
public:
    CFactory() {}
    virtual ~CFactory() {m_ManufacturerDictionary.clear(); m_RecycledEntityDictionary.clear();}

    void Init();

    void Register( std::string name, IManufacturer* manufacturer );
	IEntity* Create ( std::string name ); //scan RED for entity, if not found, call manufacturer
	void Recycle(std::string name, IEntity* entity);

	std::map<std::string,IManufacturer*> m_ManufacturerDictionary;
	std::multimap<std::string,IEntity*> m_RecycledEntityDictionary;

	std::map<std::string,IManufacturer*>::iterator m_ManuItor;
	std::multimap<std::string,IEntity*>::iterator m_RecycleItor;


};

#endif // FACTORY_H
