Cogs.Core
Extensions
TerrainProvider
Source
DiskCache.h
1
#pragma once
2
#include "Utilities/Strings.h"
3
4
#include "BaseRasterSource.h"
5
6
#include "Foundation/Memory/MemoryBuffer.h"
7
#include "Foundation/Platform/Threads.h"
8
9
namespace
Cogs::Core::TerrainProvider {
10
11
struct
TileId;
12
13
class
DiskCache
:
public
ICache
14
{
15
public
:
16
17
virtual
~DiskCache
() {}
18
19
bool
init(
Context
* context,
const
BaseConfig
* providerConf,
StringView
cachesPath);
20
21
bool
getTile(
Memory::MemoryBuffer
& contents, MimeType& kind,
const
TileId
&
id
)
final
;
22
23
bool
storeTile(
const
Memory::MemoryBuffer
& contents, MimeType kind,
const
TileId
&
id
,
StringView
debugLog)
final
;
24
25
protected
:
26
std::string rootPath;
27
MimeType mimeType = MimeType::None;
28
bool
offline =
true
;
29
bool
initialized =
false
;
30
};
31
32
}
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::TerrainProvider::DiskCache
Definition:
DiskCache.h:14
Cogs::Core::TerrainProvider::ICache
Definition:
BaseRasterSource.h:83
Cogs::Memory::MemoryBuffer
Definition:
MemoryBuffer.h:23
Cogs::StringView
Provides a weakly referenced view over the contents of a string.
Definition:
StringView.h:24
Cogs::Core::TerrainProvider::BaseConfig
Definition:
BaseRasterSource.h:46
Cogs::Core::TerrainProvider::TileId
Definition:
BaseRasterSource.h:63
Generated by
1.9.6