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

@@ -8,6 +8,7 @@
#define NAZARA_SKELETON_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectListenerWrapper.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp>
@@ -19,6 +20,7 @@ class NzSkeleton;
using NzSkeletonConstListener = NzObjectListenerWrapper<const NzSkeleton>;
using NzSkeletonConstRef = NzObjectRef<const NzSkeleton>;
using NzSkeletonLibrary = NzObjectLibrary<NzSkeleton>;
using NzSkeletonListener = NzObjectListenerWrapper<NzSkeleton>;
using NzSkeletonRef = NzObjectRef<NzSkeleton>;
@@ -27,6 +29,8 @@ struct NzSkeletonImpl;
class NAZARA_API NzSkeleton : public NzRefCounted
{
friend NzJoint;
friend NzSkeletonLibrary;
friend class NzUtility;
public:
NzSkeleton() = default;
@@ -60,7 +64,12 @@ class NAZARA_API NzSkeleton : public NzRefCounted
void InvalidateJointMap();
void UpdateJointMap() const;
static bool Initialize();
static void Uninitialize();
NzSkeletonImpl* m_impl = nullptr;
static NzSkeletonLibrary::LibraryMap s_library;
};
#include <Nazara/Utility/Skeleton.inl>