Added ResourceListenerWrapper

This class wraps the call to
Resource::AddResourceListener/RemoveResourceListener using RAII and help
a lot with some of the dependencies.
Thanks to this, the render queues now handle their resources listening
properly.

Former-commit-id: 7f215ffa4ccadcc4f44f777656970e92ce01087a
This commit is contained in:
Lynix
2015-01-18 23:59:01 +01:00
parent a6183fae69
commit 8f9ea9db17
33 changed files with 602 additions and 411 deletions

View File

@@ -12,6 +12,7 @@
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/Resource.hpp>
#include <Nazara/Core/ResourceListenerWrapper.hpp>
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceRef.hpp>
@@ -25,7 +26,9 @@ struct NzSoundBufferParams
class NzSound;
class NzSoundBuffer;
using NzSoundBufferConstListener = NzResourceListenerWrapper<const NzSoundBuffer>;
using NzSoundBufferConstRef = NzResourceRef<const NzSoundBuffer>;
using NzSoundBufferListener = NzResourceListenerWrapper<NzSoundBuffer>;
using NzSoundBufferLoader = NzResourceLoader<NzSoundBuffer, NzSoundBufferParams>;
using NzSoundBufferRef = NzResourceRef<NzSoundBuffer>;