/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A. - All Rights Reserved.                        *
*                                                                          *
***************************************************************************/

#pragma once

#include <glmCrowdIOAPI.h>
#include <glmMemory.h>
#include <glmSingleton.h>
#include <glmFurCache.h>

namespace glm
{
    namespace crowdio
    {
        class GLM_CROWDIO_API FurFactory
        {
        public: //methods
			GLM_CLASS_STAT_ID( glm::MemoryStatIds::Cache)

			FurFactory();
            ~FurFactory();

			FurCache* loadFurFile(const char* furFilePath);
			void updateFurCache(const char* furFilePath, FurCache::SP furCache);
			void clear();

		protected:
			GlmMap<GlmString, FurCache::SP> _furCaches;
        };


		//-------------------------------------------------------------------------
		typedef Singleton<FurFactory> theFurFactory;

		//-------------------------------------------------------------------------
		GLM_CROWDIO_API FurFactory& touchTheFurFactory();
    } // namespace crowdio
} // namespace glm
