Cogs.Core
Source
Resources
ResourceStoreStorage.h
1
#pragma once
2
#include <set>
3
#include <string>
4
#include <memory>
5
#include <vector>
6
#include <unordered_set>
7
#include <unordered_map>
8
9
#include "Foundation/Platform/Threads.h"
10
11
namespace
Cogs::Core
{
12
13
struct
Resource
14
{
15
std::string name;
16
std::string path;
17
ResourceBuffer
bytes;
18
};
19
20
struct
ResourceCache
21
{
22
Mutex lock;
23
std::unordered_map<std::string, Resource> resources;
24
std::unordered_set<std::string> loading;
25
};
26
27
struct
ResourceStoreStorage
28
{
29
ResourceStoreStorage
(
Context
* context,
ResourceStore
* resourceStore);
30
31
Context
* context =
nullptr
;
32
std::unique_ptr<ResourceCache> cache;
33
std::vector<ResourceArchive> archives;
34
std::string dataDir;
35
std::set<std::string> searchPaths;
36
std::vector<std::string> orderedSearchPaths;
37
std::unique_ptr<struct IOHandler> ioHandler;
38
};
39
40
41
}
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::ResourceStore
Provides handling of reading and caching of external resources.
Definition:
ResourceStore.h:107
Cogs::Core
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Definition:
ComponentFunctions.h:10
Cogs::Core::ResourceBuffer
Definition:
ResourceStore.h:22
Cogs::Core::ResourceCache
Definition:
ResourceStoreStorage.h:21
Cogs::Core::ResourceStoreStorage
Definition:
ResourceStoreStorage.h:28
Cogs::Core::Resource
Definition:
ResourceStoreStorage.h:14
Generated by
1.9.6