Added Resource modification notification

Former-commit-id: b2fafa22ddf125ef2f1cbc0cd473ae06eb99bcd3
This commit is contained in:
Lynix
2014-04-08 10:21:50 +02:00
parent e36c42900d
commit 945c6514a9
4 changed files with 30 additions and 1 deletions

View File

@@ -40,9 +40,10 @@ class NAZARA_API NzResource
protected:
void NotifyCreated();
void NotifyDestroy();
void NotifyModified(unsigned int code);
private:
typedef std::unordered_map<NzResourceListener*, std::pair<int, unsigned int>> ResourceListenerMap;
using ResourceListenerMap = std::unordered_map<NzResourceListener*, std::pair<int, unsigned int>>;
void RemoveResourceListenerIterator(ResourceListenerMap::iterator iterator) const;

View File

@@ -19,6 +19,7 @@ class NAZARA_API NzResourceListener
virtual bool OnResourceCreated(const NzResource* resource, int index);
virtual bool OnResourceDestroy(const NzResource* resource, int index);
virtual bool OnResourceModified(const NzResource* resource, int index, unsigned int code);
virtual void OnResourceReleased(const NzResource* resource, int index);
};