86 |
ResourceMap ResourceEntries; |
ResourceMap ResourceEntries; |
87 |
|
|
88 |
public: |
public: |
89 |
|
virtual ~ResourceManager() {} |
90 |
/** |
/** |
91 |
* Borrow a resource identified by \a Key. The ResourceManager will |
* Borrow a resource identified by \a Key. The ResourceManager will |
92 |
* mark the resource as in usage by the consumer given with |
* mark the resource as in usage by the consumer given with |
128 |
typename ResourceMap::iterator iter = ResourceEntries.begin(); |
typename ResourceMap::iterator iter = ResourceEntries.begin(); |
129 |
typename ResourceMap::iterator end = ResourceEntries.end(); |
typename ResourceMap::iterator end = ResourceEntries.end(); |
130 |
for (; iter != end; iter++) { |
for (; iter != end; iter++) { |
131 |
if (iter->second.resource = pResource) { |
if (iter->second.resource == pResource) { |
132 |
resource_entry_t& entry = iter->second; |
resource_entry_t& entry = iter->second; |
133 |
entry.consumers.erase(pConsumer); |
entry.consumers.erase(pConsumer); |
134 |
if (entry.consumers.empty()) { |
if (entry.consumers.empty()) { |
150 |
typename ResourceMap::iterator iter = ResourceEntries.begin(); |
typename ResourceMap::iterator iter = ResourceEntries.begin(); |
151 |
typename ResourceMap::iterator end = ResourceEntries.end(); |
typename ResourceMap::iterator end = ResourceEntries.end(); |
152 |
for (; iter != end; iter++) { |
for (; iter != end; iter++) { |
153 |
if (iter->second.resource = pResource) { |
if (iter->second.resource == pResource) { |
154 |
resource_entry_t& entry = iter->second; |
resource_entry_t& entry = iter->second; |
155 |
// inform all consumers about pending update |
// inform all consumers about pending update |
156 |
std::map<ResourceConsumer<T_res>*,void*> updateargs; |
std::map<ResourceConsumer<T_res>*,void*> updateargs; |