Added resource managers

Former-commit-id: 9c071230c1e325ec672c9dfe30ee7e498baa1d08
This commit is contained in:
Lynix
2015-01-28 20:53:40 +01:00
parent 6324d21c67
commit 7a73314ef5
16 changed files with 282 additions and 56 deletions

View File

@@ -14,6 +14,7 @@
#include <Nazara/Core/RefCounted.hpp>
#include <Nazara/Core/Resource.hpp>
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceManager.hpp>
#include <Nazara/Core/String.hpp>
#include <Nazara/Utility/Enums.hpp>
#include <Nazara/Utility/Sequence.hpp>
@@ -37,6 +38,7 @@ using NzAnimationConstRef = NzObjectRef<const NzAnimation>;
using NzAnimationLibrary = NzObjectLibrary<NzAnimation>;
using NzAnimationListener = NzObjectListenerWrapper<NzAnimation>;
using NzAnimationLoader = NzResourceLoader<NzAnimation, NzAnimationParams>;
using NzAnimationManager = NzResourceManager<NzAnimation, NzAnimationParams>;
using NzAnimationRef = NzObjectRef<NzAnimation>;
struct NzAnimationImpl;
@@ -45,6 +47,7 @@ class NAZARA_API NzAnimation : public NzRefCounted, public NzResource
{
friend NzAnimationLibrary;
friend NzAnimationLoader;
friend NzAnimationManager;
friend class NzUtility;
public:
@@ -94,6 +97,8 @@ class NAZARA_API NzAnimation : public NzRefCounted, public NzResource
static NzAnimationLibrary::LibraryMap s_library;
static NzAnimationLoader::LoaderList s_loaders;
static NzAnimationManager::ManagerMap s_managerMap;
static NzAnimationManager::ManagerParams s_managerParameters;
};
#include <Nazara/Utility/Animation.inl>

View File

@@ -2,6 +2,8 @@
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
///TODO: FontManager ?
#pragma once
#ifndef NAZARA_FONT_HPP

View File

@@ -16,6 +16,7 @@
#include <Nazara/Core/RefCounted.hpp>
#include <Nazara/Core/Resource.hpp>
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceManager.hpp>
#include <Nazara/Utility/AbstractImage.hpp>
#include <Nazara/Utility/CubemapParams.hpp>
#include <atomic>
@@ -40,12 +41,14 @@ using NzImageConstRef = NzObjectRef<const NzImage>;
using NzImageLibrary = NzObjectLibrary<NzImage>;
using NzImageListener = NzObjectListenerWrapper<NzImage>;
using NzImageLoader = NzResourceLoader<NzImage, NzImageParams>;
using NzImageManager = NzResourceManager<NzImage, NzImageParams>;
using NzImageRef = NzObjectRef<NzImage>;
class NAZARA_API NzImage : public NzAbstractImage, public NzRefCounted, public NzResource
{
friend NzImageLibrary;
friend NzImageLoader;
friend NzImageManager;
friend class NzUtility;
public:
@@ -156,6 +159,8 @@ class NAZARA_API NzImage : public NzAbstractImage, public NzRefCounted, public N
static NzImageLibrary::LibraryMap s_library;
static NzImageLoader::LoaderList s_loaders;
static NzImageManager::ManagerMap s_managerMap;
static NzImageManager::ManagerParams s_managerParameters;
};
#include <Nazara/Utility/Image.inl>

View File

@@ -16,6 +16,7 @@
#include <Nazara/Core/RefCounted.hpp>
#include <Nazara/Core/Resource.hpp>
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceManager.hpp>
#include <Nazara/Core/String.hpp>
#include <Nazara/Math/Box.hpp>
#include <Nazara/Utility/Skeleton.hpp>
@@ -59,6 +60,7 @@ using NzMeshConstRef = NzObjectRef<const NzMesh>;
using NzMeshLibrary = NzObjectLibrary<NzMesh>;
using NzMeshListener = NzObjectListenerWrapper<NzMesh>;
using NzMeshLoader = NzResourceLoader<NzMesh, NzMeshParams>;
using NzMeshManager = NzResourceManager<NzMesh, NzMeshParams>;
using NzMeshRef = NzObjectRef<NzMesh>;
struct NzMeshImpl;
@@ -67,6 +69,7 @@ class NAZARA_API NzMesh : public NzRefCounted, public NzResource
{
friend NzMeshLibrary;
friend NzMeshLoader;
friend NzMeshManager;
friend class NzUtility;
public:
@@ -137,6 +140,8 @@ class NAZARA_API NzMesh : public NzRefCounted, public NzResource
static NzMeshLibrary::LibraryMap s_library;
static NzMeshLoader::LoaderList s_loaders;
static NzMeshManager::ManagerMap s_managerMap;
static NzMeshManager::ManagerParams s_managerParameters;
};
#include <Nazara/Utility/Mesh.inl>