#ifndef ASSETMANAGER_H
#define ASSETMANAGER_H

#include "IManager.h"

namespace Salamander
{

// Creates and destroys assets
class AssetManager : public IManager
{
friend class Application;

public:
	registerManager();
	virtual ~AssetManager();

public:
	/*
	** This is a manager-specific wrapper that allows loading of assets into a cache,
	** which is then shared by multiple users of each asset. 
	*/
	template <typename Asset>
		Asset* load(const std::string& name);

protected:
	AssetManager();

    virtual bool startup();
    virtual bool shutdown();

	virtual void frame();

private:
	/*
	** Stores all currently loaded assets. These are databased for ease of memory management,
	** so that when all references have been removed to an asset, they can be deleted.
	*/
	std::map<UniqueId, std::vector<IAsset*> > assets_;
	
		
};

}

#include "AssetManager.inl"

#endif // ASSETMANAGER_H