/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef	__NCORERESOURCEFACTORY__
#define	__NCORERESOURCEFACTORY__


		#include "ntypes.h"
		#include "core/resource_factory_event_interface.h"


namespace GS {
	class Picture;

	typedef	SharedPtr <Picture> sPicture;

	namespace Core {
		class Geometry;
		class ShaderTree;
		struct ParticleModel;
		struct Material;
		struct Shader;

/*
	@short	Core resource factory.
	@author	Emmanuel Julien (ejulien@gsworks.fr)
*/
struct	ResourceFactory
{
		sIResourceFactoryEvent event_handler;

virtual	Picture			*LoadPicture(const char *) = 0;
virtual	Geometry		*LoadGeometry(const char *) = 0;
virtual	Material		*LoadMaterial(const char *) = 0;
virtual	Shader			*LoadShader(const char *) = 0;
virtual	ParticleModel	*LoadParticleModel(const char *) = 0;

virtual	uint			GetCachedResourceCount() { return 0; }
virtual	uint			PurgeCache() { return 0; }

		ResourceFactory() : event_handler(new IResourceFactoryEvent) {}
virtual	~ResourceFactory() {}
};

typedef	SharedPtr <Geometry> sGeometry;
typedef	SharedPtr <Material> sMaterial;
typedef	SharedPtr <Shader> sShader;
typedef	SharedPtr <ParticleModel> sParticleModel;

	} // Core
} // GS


#endif	// __NCORERESOURCEFACTORY__
