#ifndef FILE_LOADER_STORAGE_H
#define FILE_LOADER_STORAGE_H

#include <string>
#pragma warning(push)
#pragma warning(disable:4181)
#include <hash_map>
#pragma warning(pop)

#include "factory_item.h"

namespace cbk
{
	namespace factory
	{
		template<class itemType, class paramType, class nameType = std::string>
		class _Storage
		{
		public:
			inline _Storage& operator++(void);
			inline _Storage& operator--(void);
			inline _Storage& operator++(int);
			inline _Storage& operator--(int);

			inline itemType& operator*(void);
			inline itemType* operator->(void);

			inline _Storage(const nameType& name, paramType param);
			inline ~_Storage(void);

			inline operator int(void);

			inline operator itemType&(void);
			inline operator itemType*(void);

		private:
			_Storage(_Storage& other);
			itemType item;
			int usage;
		};
	}
}

#include "factory_storage_code.h"

#endif //FILE_LOADER_STORAGE_H