39 #include "resource_location.h"
43 struct ResourceLocationComparator {
44 bool operator()(
const ResourceLocation* r1,
const ResourceLocation* r2)
const
46 return r1->operator<(*r2);
52 enum { RES_LOADED = 0x01, RES_NON_LOADED = 0x02};
70 Pool(
const std::string& name);
102 virtual IResource&
get(
unsigned int index,
bool inc =
false);
109 virtual void release(
unsigned int index,
bool dec =
false);
135 virtual void reset();
140 PoolEntry(): resource(0), location(0), loader(0) {}
149 ResourceLocation* location;
151 ResourceLoader* loader;
154 void findAndSetProvider(PoolEntry& entry);
156 std::vector<PoolEntry*> m_entries;
157 typedef std::map<ResourceLocation*, int, ResourceLocationComparator> ResourceLocationToEntry;
158 ResourceLocationToEntry m_location_to_entry;
159 std::vector<ResourceLoader*> m_loaders;