#ifndef RESOURCEHANDLER_H
#define RESOURCEHANDLER_H

#include "StringInt.h"

#include <map>
#include <string>
using namespace std;

#define RESOURCE_TYPE_UNKNOWN 0
#define RESOURCE_TYPE_FONT 1
#define RESOURCE_TYPE_BITMAP 2
#define RESOURCE_TYPE_PRIMITIVE 3
#define RESOURCE_TYPE_SOUND 4
#define RESOURCE_TYPE_MUSIC 5
#define RESOURCE_TYPE_TOON 6
#define RESOURCE_TYPE_FRAME 7

//resource handler stores the name and type of resource.
//Basically a wrapper around a map.

class ResourceHandler {
 public:
  ResourceHandler();
  ~ResourceHandler();

  void addResource (const string &, const string &, int type=RESOURCE_TYPE_UNKNOWN);
  //returns the name of the resource
  void getResourceName (const string &, string &);
  //returns the type of resource.
  int getResourceType (const string &);
  bool removeResource (const string &);
 private:
  map <string, StringInt> resources;
};

#endif
