Added a Library to most reference-counted classes

Former-commit-id: 3ed409a71dcd5ce4eec7672ac26f8fff00e3b136
This commit is contained in:
Lynix
2015-01-28 18:06:05 +01:00
parent e18e490c59
commit 53162c1722
34 changed files with 438 additions and 32 deletions

View File

@@ -10,6 +10,7 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Color.hpp>
#include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectListenerWrapper.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp>
@@ -36,13 +37,16 @@ class NzImage;
using NzImageConstListener = NzObjectListenerWrapper<const NzImage>;
using NzImageConstRef = NzObjectRef<const NzImage>;
using NzImageLibrary = NzObjectLibrary<NzImage>;
using NzImageListener = NzObjectListenerWrapper<NzImage>;
using NzImageLoader = NzResourceLoader<NzImage, NzImageParams>;
using NzImageRef = NzObjectRef<NzImage>;
class NAZARA_API NzImage : public NzAbstractImage, public NzRefCounted, public NzResource
{
friend NzImageLibrary;
friend NzImageLoader;
friend class NzUtility;
public:
struct SharedImage;
@@ -145,8 +149,12 @@ class NAZARA_API NzImage : public NzAbstractImage, public NzRefCounted, public N
void EnsureOwnership();
void ReleaseImage();
static bool Initialize();
static void Uninitialize();
SharedImage* m_sharedImage;
static NzImageLibrary::LibraryMap s_library;
static NzImageLoader::LoaderList s_loaders;
};