neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
resource_manager.hpp
Go to the documentation of this file.
1// resource_manager.hpp
2/*
3 neogfx C++ App/Game Engine
4 Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6 This program is free software: you can redistribute it and / or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
24#include <neolib/core/map.hpp>
26
27namespace neogfx
28{
30 {
31 public:
34 public:
35 void merge(i_resource_manager& aResourceManager) override;
36 public:
40 void add_resource(i_string const& aUri, const void* aResourceData, std::size_t aResourceSize) override;
41 void add_module_resource(i_string const& aUri, const void* aResourceData, std::size_t aResourceSize) override;
42 void load_resource(i_string const& aUri, i_ref_ptr<i_resource>& aResult) override;
43 public:
44 void cleanup() override;
45 void clean() override;
46 public:
49 private:
52 };
53}
virtual void load_resource(i_string const &aUri, i_ref_ptr< i_resource > &aResult)=0
virtual void add_module_resource(i_string const &aUri, const void *aResourceData, std::size_t aResourceSize)=0
virtual void add_resource(i_string const &aUri, const void *aResourceData, std::size_t aResourceSize)=0
void add_resource(i_string const &aUri, const void *aResourceData, std::size_t aResourceSize) override
neolib::i_map< i_string, neolib::i_variant< i_ref_ptr< i_resource >, i_weak_ref_ptr< i_resource > > > const & resource_archives() override
neolib::i_map< i_string, neolib::i_variant< i_ref_ptr< i_resource >, i_weak_ref_ptr< i_resource > > > const & resources() override
static resource_manager & instance()
void clean() override
void cleanup() override
void add_module_resource(i_string const &aUri, const void *aResourceData, std::size_t aResourceSize) override
void load_resource(i_string const &aUri, i_ref_ptr< i_resource > &aResult) override
void merge(i_resource_manager &aResourceManager) override