CeresEngine
0.2.0
A game development framework
Loading...
Searching...
No Matches
JSONForward.hpp
Go to the documentation of this file.
1
//
2
// CeresEngine - A game development framework
3
//
4
// Created by Rogiel Sulzbach.
5
// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6
//
7
8
#pragma once
9
10
#include "
CeresEngine/DataTypes.hpp
"
11
12
#include "
CeresEngine/Foundation/Allocator.hpp
"
13
#include "
CeresEngine/Foundation/String.hpp
"
14
#include "
CeresEngine/Foundation/Container/Map.hpp
"
15
16
#include <nlohmann/json_fwd.hpp>
17
18
namespace
CeresEngine
{
19
20
// template<typename T> struct JSONAllocator : public std::allocator<T> { };
21
22
template
<
typename
RawAllocator>
struct
JSONAllocator
{
23
template
<
typename
T>
using
Allocator
=
StdAllocator<T, RawAllocator>
;
24
25
// template<typename T> class Allocator : public StdAllocator<T, RawAllocator> {
26
// using super = StdAllocator<T, RawAllocator>;
27
// using super::super;
28
// };
29
};
30
31
#if CE_PLATFORM_EMSCRIPTEN || 1
32
template
<
typename
RawAllocator = DefaultAllocator>
33
using
BasicJSON
= nlohmann::json;
34
#else
35
template
<
typename
RawAllocator = DefaultAllocator>
36
using
BasicJSON
=
37
nlohmann::basic_json<std::map, std::vector, String, bool, Int64, UInt64, double, JSONAllocator, nlohmann::adl_serializer, std::vector<std::uint8_t>>;
38
#endif
39
40
using
JSON
=
BasicJSON<>
;
41
42
}
// namespace CeresEngine
Allocator.hpp
Map.hpp
DataTypes.hpp
String.hpp
CeresEngine
Definition
Application.hpp:19
CeresEngine::StdAllocator
foonathan::memory::std_allocator< T, RawAllocator > StdAllocator
Definition
Allocator.hpp:225
CeresEngine::JSON
BasicJSON<> JSON
Definition
JSONForward.hpp:40
CeresEngine::BasicJSON
nlohmann::json BasicJSON
Definition
JSONForward.hpp:33
CeresEngine::JSONAllocator
Definition
JSONForward.hpp:22
CeresEngine::JSONAllocator::Allocator
StdAllocator< T, RawAllocator > Allocator
Definition
JSONForward.hpp:23
Sources
CeresEngine
Foundation
JSONForward.hpp
Generated by
1.9.8