Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Commands.h
Go to the documentation of this file.
1#pragma once
2
3#include <ICommands.h>
4
5#include <algorithm>
6#include <memory>
7#include <utility>
8#include <vector>
9
10namespace ArkApi
11{
12 class Commands : public ICommands
13 {
14 public:
15 Commands() = default;
16
17 Commands(const Commands&) = delete;
18 Commands(Commands&&) = delete;
19 Commands& operator=(const Commands&) = delete;
20 Commands& operator=(Commands&&) = delete;
21
22 ~Commands() override = default;
23
24 void AddChatCommand(const FString& command,
25 const std::function<void(AShooterPlayerController*, FString*, EChatSendMode::Type)>&
26 callback) override;
27 void AddConsoleCommand(const FString& command,
28 const std::function<void(APlayerController*, FString*, bool)>& callback) override;
29 void AddRconCommand(const FString& command,
30 const std::function<void(RCONClientConnection*, RCONPacket*, UWorld*)>& callback) override;
31
32 void AddOnTickCallback(const FString& id, const std::function<void(float)>& callback) override;
33 void AddOnTimerCallback(const FString& id, const std::function<void()>& callback) override;
34 void AddOnChatMessageCallback(const FString& id,
35 const std::function<bool(AShooterPlayerController*, FString*, EChatSendMode::Type,
36 bool, bool)>& callback) override;
37
38 bool RemoveChatCommand(const FString& command) override;
39 bool RemoveConsoleCommand(const FString& command) override;
40 bool RemoveRconCommand(const FString& command) override;
41
42 bool RemoveOnTickCallback(const FString& id) override;
43 bool RemoveOnTimerCallback(const FString& id) override;
44 bool RemoveOnChatMessageCallback(const FString& id) override;
45
46 bool CheckChatCommands(AShooterPlayerController* shooter_player_controller, FString* message,
47 EChatSendMode::Type mode);
48 bool CheckConsoleCommands(APlayerController* a_player_controller, FString* cmd, bool write_to_log);
49 bool CheckRconCommands(RCONClientConnection* rcon_client_connection, RCONPacket* rcon_packet,
50 UWorld* u_world);
51 void CheckOnTickCallbacks(float delta_seconds);
53 bool CheckOnChatMessageCallbacks(AShooterPlayerController* player_controller, FString* message,
54 EChatSendMode::Type mode, bool spam_check, bool command_executed);
55
56 private:
57 template <typename T>
58 struct Command
59 {
60 Command(FString command, std::function<T> callback)
63 {
64 }
65
67 std::function<T> callback;
68 };
69
71 using ConsoleCommand = Command<void(APlayerController*, FString*, bool)>;
72 using RconCommand = Command<void(RCONClientConnection*, RCONPacket*, UWorld*)>;
73
74 using OnTickCallback = Command<void(float)>;
75 using OnTimerCallback = Command<void()>;
76 using OnChatMessageCallback = Command<bool
78
79 template <typename T>
80 bool RemoveCommand(const FString& command, std::vector<std::shared_ptr<T>>& commands)
81 {
83 [&command](const std::shared_ptr<T>& data) -> bool
84 {
85 return data->command == command;
86 });
87
88 if (iter != commands.end())
89 {
91
92 return true;
93 }
94
95 return false;
96 }
97
98 template <typename T, typename... Args>
99 bool CheckCommands(const FString& message, const std::vector<std::shared_ptr<T>>& commands, Args&&... args)
100 {
102 message.ParseIntoArray(parsed, L" ", true);
103
104 if (!parsed.IsValidIndex(0))
105 {
106 return false;
107 }
108
109 const FString command_text = parsed[0];
110
111 for (const auto& command : commands)
112 {
114 {
116
117 return true;
118 }
119 }
120
121 return false;
122 }
123
127
131 };
132} // namespace ArkApi
std::string GetApiName() override
std::unique_ptr< ArkApi::IApiUtils > & GetApiUtils() override
static void LoadPluginCmd(APlayerController *, FString *, bool)
std::unique_ptr< ArkApi::IHooks > & GetHooks() override
std::unique_ptr< ArkApi::IApiUtils > api_utils_
Definition ArkBaseApi.h:39
void RegisterCommands() override
float GetVersion() override
std::unique_ptr< ArkApi::ICommands > & GetCommands() override
~ArkBaseApi() override=default
static FString LoadPlugin(FString *cmd)
static void UnloadPluginRcon(RCONClientConnection *, RCONPacket *, UWorld *)
std::unique_ptr< ArkApi::ICommands > commands_
Definition ArkBaseApi.h:37
bool Init() override
static void UnloadPluginCmd(APlayerController *, FString *, bool)
static void LoadPluginRcon(RCONClientConnection *, RCONPacket *, UWorld *)
std::unique_ptr< ArkApi::IHooks > hooks_
Definition ArkBaseApi.h:38
static FString UnloadPlugin(FString *cmd)
Hooks(const Hooks &)=delete
Hooks & operator=(const Hooks &)=delete
std::unordered_map< std::string, std::vector< std::shared_ptr< Hook > > > all_hooks_
Definition Hooks.h:41
~Hooks() override=default
Hooks & operator=(Hooks &&)=delete
bool DisableHook(const std::string &func_name, LPVOID detour) override
Removes a hook from a function.
Definition Hooks.cpp:66
bool SetHookInternal(const std::string &func_name, LPVOID detour, LPVOID *original) override
Definition Hooks.cpp:18
Hooks(Hooks &&)=delete
BitField GetBitField(const void *base, const std::string &name)
Definition Offsets.cpp:65
DWORD64 module_base_
Definition Offsets.h:36
DWORD64 GetAddress(const void *base, const std::string &name)
Definition Offsets.cpp:50
Offsets & operator=(const Offsets &)=delete
DWORD64 data_base_
Definition Offsets.h:37
LPVOID GetDataAddress(const std::string &name)
Definition Offsets.cpp:60
std::unordered_map< std::string, BitField > bitfields_dump_
Definition Offsets.h:40
Offsets(const Offsets &)=delete
void Init(std::unordered_map< std::string, intptr_t > &&offsets_dump, std::unordered_map< std::string, BitField > &&bitfields_dump)
Definition Offsets.cpp:43
static Offsets & Get()
Definition Offsets.cpp:37
~Offsets()=default
Offsets(Offsets &&)=delete
BitField GetBitFieldInternal(const void *base, const std::string &name)
Definition Offsets.cpp:75
LPVOID GetAddress(const std::string &name)
Definition Offsets.cpp:55
BitField GetBitField(LPVOID base, const std::string &name)
Definition Offsets.cpp:70
std::unordered_map< std::string, intptr_t > offsets_dump_
Definition Offsets.h:39
Offsets & operator=(Offsets &&)=delete
PdbReader()=default
void DumpType(IDiaSymbol *, const std::string &, int) const
std::unordered_set< uint32_t > visited_
Definition PDBReader.h:38
std::unordered_map< std::string, BitField > * bitfields_dump_
Definition PDBReader.h:36
void DumpFunctions(IDiaSymbol *)
static void LoadDataFromPdb(const std::wstring &, IDiaDataSource **, IDiaSession **, IDiaSymbol **)
Definition PDBReader.cpp:82
std::unordered_map< std::string, intptr_t > * offsets_dump_
Definition PDBReader.h:35
static uint32_t GetSymbolId(IDiaSymbol *)
void DumpData(IDiaSymbol *, const std::string &) const
void DumpGlobalVariables(IDiaSymbol *)
void Read(const std::wstring &path, std::unordered_map< std::string, intptr_t > *offsets_dump, std::unordered_map< std::string, BitField > *bitfields_dump)
Definition PDBReader.cpp:44
void DumpStructs(IDiaSymbol *)
~PdbReader()=default
static void Cleanup(IDiaSymbol *, IDiaSession *, IDiaDataSource *)
static std::string GetSymbolNameString(IDiaSymbol *)
std::vector< std::shared_ptr< Plugin > > loaded_plugins_
static nlohmann::json GetAllPDBConfigs()
Get all plugin pdb configs.
std::vector< std::shared_ptr< Plugin > >::const_iterator FindPlugin(const std::string &plugin_name)
Find plugin by it's name.
static nlohmann::json ReadPluginPDBConfig(const std::string &plugin_name)
PluginManager & operator=(const PluginManager &)=delete
PluginManager()=default
PluginManager(const PluginManager &)=delete
PluginManager(PluginManager &&)=delete
void LoadAllPlugins()
Find and load all plugins.
static PluginManager & Get()
static nlohmann::json ReadPluginInfo(const std::string &plugin_name)
bool IsPluginLoaded(const std::string &plugin_name)
Returns true if plugin was loaded, false otherwise.
std::shared_ptr< Plugin > & LoadPlugin(const std::string &plugin_name) noexcept(false)
Load plugin by it's name.
static void DetectPluginChangesTimerCallback()
Checks for auto plugin reloads.
void UnloadPlugin(const std::string &plugin_name) noexcept(false)
Unload plugin by it's name. Plugin must free all used resources.
PluginManager & operator=(PluginManager &&)=delete
~PluginManager()=default
static nlohmann::json ReadSettingsConfig()
bool RemoveCommand(const FString &command, std::vector< std::shared_ptr< T > > &commands)
Definition Commands.h:80
std::vector< std::shared_ptr< OnTickCallback > > on_tick_callbacks_
Definition Commands.h:128
~Commands() override=default
std::vector< std::shared_ptr< OnChatMessageCallback > > on_chat_message_callbacks_
Definition Commands.h:130
std::vector< std::shared_ptr< RconCommand > > rcon_commands_
Definition Commands.h:126
bool RemoveOnTickCallback(const FString &id) override
Removes a on-tick callback.
Definition Commands.cpp:58
bool RemoveOnChatMessageCallback(const FString &id) override
Removes an on-chat-message callback.
Definition Commands.cpp:68
void AddConsoleCommand(const FString &command, const std::function< void(APlayerController *, FString *, bool)> &callback) override
Adds a console command.
Definition Commands.cpp:14
void CheckOnTimerCallbacks()
Definition Commands.cpp:103
std::vector< std::shared_ptr< ConsoleCommand > > console_commands_
Definition Commands.h:125
std::vector< std::shared_ptr< OnTimerCallback > > on_timer_callbacks_
Definition Commands.h:129
Commands()=default
void AddRconCommand(const FString &command, const std::function< void(RCONClientConnection *, RCONPacket *, UWorld *)> &callback) override
Adds a rcon command.
Definition Commands.cpp:20
bool CheckConsoleCommands(APlayerController *a_player_controller, FString *cmd, bool write_to_log)
Definition Commands.cpp:79
bool RemoveRconCommand(const FString &command) override
Removes a rcon command.
Definition Commands.cpp:53
bool RemoveConsoleCommand(const FString &command) override
Removes a console command.
Definition Commands.cpp:48
std::vector< std::shared_ptr< ChatCommand > > chat_commands_
Definition Commands.h:124
bool CheckRconCommands(RCONClientConnection *rcon_client_connection, RCONPacket *rcon_packet, UWorld *u_world)
Definition Commands.cpp:84
bool RemoveChatCommand(const FString &command) override
Removes a chat command.
Definition Commands.cpp:43
void AddOnChatMessageCallback(const FString &id, const std::function< bool(AShooterPlayerController *, FString *, EChatSendMode::Type, bool, bool)> &callback) override
Added function will be called for AShooterPlayerController->ServerSendChatMessage events.
Definition Commands.cpp:36
bool CheckOnChatMessageCallbacks(AShooterPlayerController *player_controller, FString *message, EChatSendMode::Type mode, bool spam_check, bool command_executed)
Definition Commands.cpp:115
Commands & operator=(const Commands &)=delete
Commands(const Commands &)=delete
void AddOnTimerCallback(const FString &id, const std::function< void()> &callback) override
Added function will be called every second.
Definition Commands.cpp:31
bool CheckCommands(const FString &message, const std::vector< std::shared_ptr< T > > &commands, Args &&... args)
Definition Commands.h:99
bool RemoveOnTimerCallback(const FString &id) override
Removes an on-timer callback.
Definition Commands.cpp:63
Commands & operator=(Commands &&)=delete
void AddOnTickCallback(const FString &id, const std::function< void(float)> &callback) override
Added function will be called every frame.
Definition Commands.cpp:26
bool CheckChatCommands(AShooterPlayerController *shooter_player_controller, FString *message, EChatSendMode::Type mode)
Definition Commands.cpp:73
Commands(Commands &&)=delete
void CheckOnTickCallbacks(float delta_seconds)
Definition Commands.cpp:91
void AddChatCommand(const FString &command, const std::function< void(AShooterPlayerController *, FString *, EChatSendMode::Type)> &callback) override
Adds a chat command.
Definition Commands.cpp:7
virtual void AddRconCommand(const FString &command, const std::function< void(RCONClientConnection *, RCONPacket *, UWorld *)> &callback)=0
Adds a rcon command.
virtual void AddConsoleCommand(const FString &command, const std::function< void(APlayerController *, FString *, bool)> &callback)=0
Adds a console command.
static const FColor Green
Definition ColorList.h:13
FORCEINLINE const TCHAR * operator*() const
Definition FString.h:282
number_unsigned_t number_unsigned
number (unsigned integer)
Definition json.hpp:18393
const_reference operator[](const json_pointer &ptr) const
access specified element via JSON Pointer
Definition json.hpp:25618
reference operator[](const json_pointer &ptr)
access specified element via JSON Pointer
Definition json.hpp:25590
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)
Definition json.hpp:25298
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
Definition json.hpp:25155
basic_json(const value_t v)
create an empty value with a given type
Definition json.hpp:18878
static std::vector< std::uint8_t > to_bson(const basic_json &j)
Serializes the given JSON object j to BSON and returns a vector containing the corresponding BSON-rep...
Definition json.hpp:24990
static std::vector< std::uint8_t > to_msgpack(const basic_json &j)
create a MessagePack serialization of a given JSON value
Definition json.hpp:24809
json_value(object_t &&value)
constructor for rvalue objects
Definition json.hpp:18498
static std::vector< std::uint8_t > to_cbor(const basic_json &j)
create a CBOR serialization of a given JSON value
Definition json.hpp:24714
json_value(number_float_t v) noexcept
constructor for numbers (floating-point)
Definition json.hpp:18406
void assert_invariant(bool check_parents=true) const noexcept
checks the class invariants
Definition json.hpp:18657
json_value(string_t &&value)
constructor for rvalue strings
Definition json.hpp:18486
json_value(number_integer_t v) noexcept
constructor for numbers (integer)
Definition json.hpp:18402
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json meta()
returns version information on the library
Definition json.hpp:17758
json_value(number_unsigned_t v) noexcept
constructor for numbers (unsigned)
Definition json.hpp:18404
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)
Create a JSON value from an input in BSON format.
Definition json.hpp:25514
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(InputType &&i, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
create a JSON value from an input in CBOR format
Definition json.hpp:25123
static void to_bson(const basic_json &j, detail::output_adapter< std::uint8_t > o)
Serializes the given JSON object j to BSON and forwards the corresponding BSON-representation to the ...
Definition json.hpp:25005
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
Create a JSON value from an input in BSON format.
Definition json.hpp:25498
json_value(value_t t)
constructor for empty values of a given type
Definition json.hpp:18408
friend struct detail::external_constructor
Definition json.hpp:17583
static std::vector< std::uint8_t > to_ubjson(const basic_json &j, const bool use_size=false, const bool use_type=false)
create a UBJSON serialization of a given JSON value
Definition json.hpp:24912
json_value m_value
the value of the current element
Definition json.hpp:24601
boolean_t boolean
boolean
Definition json.hpp:18389
json_value(const string_t &value)
constructor for strings
Definition json.hpp:18480
json_value(const binary_t &value)
constructor for binary arrays (internal type)
Definition json.hpp:18528
json_value(const array_t &value)
constructor for arrays
Definition json.hpp:18504
const_reference at(const json_pointer &ptr) const
access specified element via JSON Pointer
Definition json.hpp:25704
void merge_patch(const basic_json &apply_patch)
applies a JSON Merge Patch
Definition json.hpp:26318
void destroy(value_t t)
Definition json.hpp:18539
json_value(const object_t &value)
constructor for objects
Definition json.hpp:18492
json_value(typename binary_t::container_type &&value)
constructor for rvalue binary arrays
Definition json.hpp:18522
json_value(boolean_t v) noexcept
constructor for booleans
Definition json.hpp:18400
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in MessagePack format
Definition json.hpp:25283
static JSON_HEDLEY_RETURNS_NON_NULL T * create(Args &&... args)
helper for exception-safe object creation
Definition json.hpp:18333
binary_t * binary
binary (stored with pointer to save storage)
Definition json.hpp:18387
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_ubjson(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in UBJSON format
Definition json.hpp:25400
reference at(const json_pointer &ptr)
access specified element via JSON Pointer
Definition json.hpp:25661
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_ubjson(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in UBJSON format
Definition json.hpp:25384
static void to_ubjson(const basic_json &j, detail::output_adapter< std::uint8_t > o, const bool use_size=false, const bool use_type=false)
Definition json.hpp:24921
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_ubjson(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)
Definition json.hpp:25414
basic_json flatten() const
return flattened JSON value
Definition json.hpp:25731
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_cbor(IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
create a JSON value from an input in CBOR format
Definition json.hpp:25140
json_value(const typename binary_t::container_type &value)
constructor for binary arrays
Definition json.hpp:18516
json_value()=default
default constructor (for null values)
number_float_t number_float
number (floating-point)
Definition json.hpp:18395
string_t * string
string (stored with pointer to save storage)
Definition json.hpp:18385
static void to_cbor(const basic_json &j, detail::output_adapter< std::uint8_t > o)
Definition json.hpp:24721
json_value(binary_t &&value)
constructor for rvalue binary arrays (internal type)
Definition json.hpp:18534
basic_json(std::nullptr_t=nullptr) noexcept
create a null object
Definition json.hpp:18902
array_t * array
array (stored with pointer to save storage)
Definition json.hpp:18383
number_integer_t number_integer
number (integer)
Definition json.hpp:18391
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_msgpack(InputType &&i, const bool strict=true, const bool allow_exceptions=true)
create a JSON value from an input in MessagePack format
Definition json.hpp:25267
basic_json patch(const basic_json &json_patch) const
applies a JSON patch
Definition json.hpp:25829
basic_json(CompatibleType &&val) noexcept(noexcept(//NOLINT(bugprone-forwarding-reference-overload, bugprone-exception-escape) JSONSerializer< U >::to_json(std::declval< basic_json_t & >(), std::forward< CompatibleType >(val))))
create a JSON value
Definition json.hpp:18974
basic_json unflatten() const
unflatten a previously flattened JSON value
Definition json.hpp:25768
reference set_parent(reference j, std::size_t old_capacity=std::size_t(-1))
Definition json.hpp:18728
static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json from_bson(const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)
Definition json.hpp:25528
json_value(array_t &&value)
constructor for rvalue arrays
Definition json.hpp:18510
static void to_msgpack(const basic_json &j, detail::output_adapter< std::uint8_t > o)
Definition json.hpp:24816
static allocator_type get_allocator()
returns the allocator associated with the container
Definition json.hpp:17726
an internal type for a backed binary type
Definition json.hpp:5034
byte_container_with_subtype(const container_type &b, subtype_type subtype_) noexcept(noexcept(container_type(b)))
Definition json.hpp:5053
byte_container_with_subtype(const container_type &b) noexcept(noexcept(container_type(b)))
Definition json.hpp:5045
byte_container_with_subtype(container_type &&b) noexcept(noexcept(container_type(std::move(b))))
Definition json.hpp:5049
bool operator!=(const byte_container_with_subtype &rhs) const
Definition json.hpp:5071
void clear_subtype() noexcept
clears the binary subtype
Definition json.hpp:5167
byte_container_with_subtype() noexcept(noexcept(container_type()))
Definition json.hpp:5041
byte_container_with_subtype(container_type &&b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b))))
Definition json.hpp:5059
constexpr bool has_subtype() const noexcept
return whether the value has a subtype
Definition json.hpp:5143
void set_subtype(subtype_type subtype_) noexcept
sets the binary subtype
Definition json.hpp:5094
constexpr subtype_type subtype() const noexcept
return the binary subtype
Definition json.hpp:5122
bool operator==(const byte_container_with_subtype &rhs) const
Definition json.hpp:5065
deserialization of CBOR, MessagePack, and UBJSON values
Definition json.hpp:8354
bool get_msgpack_array(const std::size_t len)
Definition json.hpp:10045
binary_reader & operator=(const binary_reader &)=delete
bool get_bson_string(const NumberType len, string_t &result)
Parses a zero-terminated string of length len from the BSON input.
Definition json.hpp:8508
bool parse_bson_array()
Reads an array from the BSON input and passes it to the SAX-parser.
Definition json.hpp:8671
char_int_type get_ignore_noop()
Definition json.hpp:10618
binary_reader(InputAdapterType &&adapter) noexcept
create a binary reader
Definition json.hpp:8370
bool get_bson_cstr(string_t &result)
Parses a C-style string from the BSON input.
Definition json.hpp:8478
bool get_cbor_array(const std::size_t len, const cbor_tag_handler_t tag_handler)
Definition json.hpp:9378
bool get_msgpack_binary(binary_t &result)
reads a MessagePack byte array
Definition json.hpp:9934
bool get_cbor_object(const std::size_t len, const cbor_tag_handler_t tag_handler)
Definition json.hpp:9416
bool get_ubjson_string(string_t &result, const bool get_char=true)
reads a UBJSON string
Definition json.hpp:10123
bool parse_bson_element_list(const bool is_array)
Read a BSON element list (as specified in the BSON-spec)
Definition json.hpp:8633
bool parse_cbor_internal(const bool get_char, const cbor_tag_handler_t tag_handler)
Definition json.hpp:8701
bool get_string(const input_format_t format, const NumberType len, string_t &result)
create a string by reading characters from the input
Definition json.hpp:10685
bool get_cbor_string(string_t &result)
reads a CBOR string
Definition json.hpp:9189
InputAdapterType ia
input adapter
Definition json.hpp:10802
bool get_binary(const input_format_t format, const NumberType len, binary_t &result)
create a byte array by reading bytes from the input
Definition json.hpp:10718
bool parse_ubjson_internal(const bool get_char=true)
Definition json.hpp:10104
bool unexpect_eof(const input_format_t format, const char *context) const
Definition json.hpp:10742
binary_reader & operator=(binary_reader &&)=default
std::string get_token_string() const
Definition json.hpp:10755
bool get_msgpack_object(const std::size_t len)
Definition json.hpp:10067
bool get_bson_binary(const NumberType len, binary_t &result)
Parses a byte array input of length len from the BSON input.
Definition json.hpp:8529
std::size_t chars_read
the number of characters read
Definition json.hpp:10808
binary_reader(const binary_reader &)=delete
char_int_type current
the current character
Definition json.hpp:10805
bool sax_parse(const input_format_t format, json_sax_t *sax_, const bool strict=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
Definition json.hpp:8391
json_sax_t * sax
the SAX parser
Definition json.hpp:10814
bool get_ubjson_size_value(std::size_t &result)
Definition json.hpp:10177
bool parse_bson_internal()
Reads in a BSON-object and passes it to the SAX-parser.
Definition json.hpp:8453
bool get_number(const input_format_t format, NumberType &result)
Definition json.hpp:10642
bool get_cbor_binary(binary_t &result)
reads a CBOR byte array
Definition json.hpp:9284
binary_reader(binary_reader &&)=default
char_int_type get()
get next character from the input
Definition json.hpp:10609
const bool is_little_endian
whether we can assume little endianess
Definition json.hpp:10811
bool get_msgpack_string(string_t &result)
reads a MessagePack string
Definition json.hpp:9852
serialization to CBOR and MessagePack values
Definition json.hpp:13600
void write_bson_array(const string_t &name, const typename BasicJsonType::array_t &value)
Writes a BSON element with key name and array value.
Definition json.hpp:14676
void write_ubjson(const BasicJsonType &j, const bool use_count, const bool use_type, const bool add_prefix=true)
Definition json.hpp:14298
static std::size_t calc_bson_entry_header_size(const string_t &name, const BasicJsonType &j)
Definition json.hpp:14506
void write_bson_entry_header(const string_t &name, const std::uint8_t element_type)
Writes the given element_type and name to the output adapter.
Definition json.hpp:14521
static std::size_t calc_bson_element_size(const string_t &name, const BasicJsonType &j)
Calculates the size necessary to serialize the JSON value j with its name.
Definition json.hpp:14710
void write_bson_double(const string_t &name, const double value)
Writes a BSON element with key name and double value value.
Definition json.hpp:14543
void write_bson_object(const typename BasicJsonType::object_t &value)
Definition json.hpp:14820
static constexpr CharType get_cbor_float_prefix(float)
Definition json.hpp:14836
static constexpr CharType get_msgpack_float_prefix(double)
Definition json.hpp:14855
void write_bson_integer(const string_t &name, const std::int64_t value)
Writes a BSON element with key name and integer value.
Definition json.hpp:14593
void write_bson_string(const string_t &name, const string_t &value)
Writes a BSON element with key name and string value value.
Definition json.hpp:14561
void write_bson_object_entry(const string_t &name, const typename BasicJsonType::object_t &value)
Writes a BSON element with key name and object value.
Definition json.hpp:14643
output_adapter_t< CharType > oa
the output
Definition json.hpp:15203
void write_bson_element(const string_t &name, const BasicJsonType &j)
Serializes the JSON value j to BSON and associates it with the key name.
Definition json.hpp:14758
void write_bson_binary(const string_t &name, const binary_t &value)
Writes a BSON element with key name and binary value value.
Definition json.hpp:14695
void write_bson_null(const string_t &name)
Writes a BSON element with key name and null value.
Definition json.hpp:14575
static std::size_t calc_bson_binary_size(const typename BasicJsonType::binary_t &value)
Definition json.hpp:14668
void write_bson(const BasicJsonType &j)
Definition json.hpp:13620
void write_cbor(const BasicJsonType &j)
Definition json.hpp:13649
static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept
Definition json.hpp:14611
void write_bson_unsigned(const string_t &name, const BasicJsonType &j)
Writes a BSON element with key name and unsigned value.
Definition json.hpp:14621
static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t &value)
Calculates the size of the BSON serialization of the given JSON-object j.
Definition json.hpp:14805
static constexpr CharType get_msgpack_float_prefix(float)
Definition json.hpp:14850
void write_bson_boolean(const string_t &name, const bool value)
Writes a BSON element with key name and boolean value value.
Definition json.hpp:14533
void write_msgpack(const BasicJsonType &j)
Definition json.hpp:13973
static std::size_t calc_bson_string_size(const string_t &value)
Definition json.hpp:14553
static std::size_t calc_bson_integer_size(const std::int64_t value)
Definition json.hpp:14583
static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t &value)
Definition json.hpp:14653
static constexpr CharType get_cbor_float_prefix(double)
Definition json.hpp:14841
general exception of the basic_json class
Definition json.hpp:2651
const int id
the id of the exception
Definition json.hpp:2660
std::runtime_error m
an exception object as storage for error messages
Definition json.hpp:2737
const char * what() const noexcept override
returns the explanatory string
Definition json.hpp:2654
exception(int id_, const char *what_arg)
Definition json.hpp:2664
file_input_adapter(const file_input_adapter &)=delete
file_input_adapter & operator=(file_input_adapter &&)=delete
file_input_adapter(file_input_adapter &&) noexcept=default
file_input_adapter & operator=(const file_input_adapter &)=delete
file_input_adapter(std::FILE *f) noexcept
Definition json.hpp:5375
input_stream_adapter(input_stream_adapter &&rhs) noexcept
Definition json.hpp:5430
input_stream_adapter & operator=(input_stream_adapter &)=delete
input_stream_adapter(const input_stream_adapter &)=delete
input_stream_adapter & operator=(input_stream_adapter &&)=delete
exception indicating errors with iterators
Definition json.hpp:2874
invalid_iterator(int id_, const char *what_arg)
Definition json.hpp:2885
a template for a bidirectional iterator for the basic_json class This class implements a both iterato...
Definition json.hpp:11530
bool operator<(const iter_impl &other) const
comparison: smaller
Definition json.hpp:11993
iter_impl operator-(difference_type i) const
subtract from iterator
Definition json.hpp:12123
bool operator!=(const IterImpl &other) const
comparison: not equal
Definition json.hpp:11984
iter_impl const operator--(int)
post-decrement (it–)
Definition json.hpp:11896
void set_end() noexcept
set the iterator past the last value
Definition json.hpp:11720
iter_impl & operator=(iter_impl &&) noexcept=default
iter_impl & operator--()
pre-decrement (–it)
Definition json.hpp:11907
difference_type operator-(const iter_impl &other) const
return difference
Definition json.hpp:12134
iter_impl & operator=(const iter_impl< const BasicJsonType > &other) noexcept
converting assignment
Definition json.hpp:11639
reference operator*() const
return a reference to the value pointed to by the iterator
Definition json.hpp:11759
iter_impl(iter_impl &&) noexcept=default
bool operator>=(const iter_impl &other) const
comparison: greater than or equal
Definition json.hpp:12046
pointer operator->() const
dereference the iterator
Definition json.hpp:11803
iter_impl(const iter_impl< const BasicJsonType > &other) noexcept
const copy constructor
Definition json.hpp:11629
iter_impl const operator++(int)
post-increment (it++)
Definition json.hpp:11845
iter_impl operator+(difference_type i) const
add to iterator
Definition json.hpp:12101
friend iter_impl operator+(difference_type i, const iter_impl &it)
addition of distance and iterator
Definition json.hpp:12112
const object_t::key_type & key() const
return the key of an object iterator
Definition json.hpp:12201
bool operator==(const IterImpl &other) const
comparison: equal
Definition json.hpp:11948
bool operator>(const iter_impl &other) const
comparison: greater than
Definition json.hpp:12037
reference value() const
return the value of an iterator
Definition json.hpp:12217
iter_impl & operator++()
pre-increment (++it)
Definition json.hpp:11856
reference operator[](difference_type n) const
access to successor
Definition json.hpp:12163
bool operator<=(const iter_impl &other) const
comparison: less than or equal
Definition json.hpp:12028
iter_impl & operator+=(difference_type i)
add to iterator
Definition json.hpp:12055
iter_impl & operator-=(difference_type i)
subtract from iterator
Definition json.hpp:12092
IteratorType anchor
the iterator
Definition json.hpp:4385
const string_type empty_str
an empty string (to return a reference for primitive values)
Definition json.hpp:4393
iteration_proxy_value(IteratorType it) noexcept
Definition json.hpp:4396
bool operator!=(const iteration_proxy_value &o) const
inequality operator (needed for range-based for)
Definition json.hpp:4422
std::size_t array_index_last
last stringified array index
Definition json.hpp:4389
string_type array_index_str
a string representation of the array index
Definition json.hpp:4391
IteratorType::reference value() const
return value of the iterator
Definition json.hpp:4464
iteration_proxy_value & operator++()
increment operator (needed for range-based for)
Definition json.hpp:4407
std::size_t array_index
an index for arrays (used to create key names)
Definition json.hpp:4387
iteration_proxy_value & operator*()
dereference operator (needed for range-based for)
Definition json.hpp:4401
const string_type & key() const
return key of the iterator
Definition json.hpp:4428
bool operator==(const iteration_proxy_value &o) const
equality operator (needed for InputIterator)
Definition json.hpp:4416
proxy class for the items() function
Definition json.hpp:4472
iteration_proxy_value< IteratorType > begin() noexcept
return iterator begin (needed for range-based for)
Definition json.hpp:4483
iteration_proxy_value< IteratorType > end() noexcept
return iterator end (needed for range-based for)
Definition json.hpp:4489
IteratorType::reference container
the container to iterate
Definition json.hpp:4475
iteration_proxy(typename IteratorType::reference cont) noexcept
construct iteration proxy from a container
Definition json.hpp:4479
iterator_input_adapter(IteratorType first, IteratorType last)
Definition json.hpp:5466
json_ref & operator=(const json_ref &)=delete
value_type const * value_ref
Definition json.hpp:13417
json_ref(const json_ref &)=delete
value_type const & operator*() const
Definition json.hpp:13405
json_ref(Args &&... args)
Definition json.hpp:13385
json_ref(const value_type &value)
Definition json.hpp:13374
value_type const * operator->() const
Definition json.hpp:13410
json_ref & operator=(json_ref &&)=delete
json_ref(value_type &&value)
Definition json.hpp:13370
value_type moved_or_copied() const
Definition json.hpp:13396
a template for a reverse iterator class
Definition json.hpp:12268
json_reverse_iterator const operator--(int)
post-decrement (it–)
Definition json.hpp:12296
json_reverse_iterator operator-(difference_type i) const
subtract from iterator
Definition json.hpp:12320
json_reverse_iterator & operator+=(difference_type i)
add to iterator
Definition json.hpp:12308
reference operator[](difference_type n) const
access to successor
Definition json.hpp:12332
difference_type operator-(const json_reverse_iterator &other) const
return difference
Definition json.hpp:12326
json_reverse_iterator operator+(difference_type i) const
add to iterator
Definition json.hpp:12314
json_reverse_iterator const operator++(int)
post-increment (it++)
Definition json.hpp:12284
auto key() const -> decltype(std::declval< Base >().key())
return the key of an object iterator
Definition json.hpp:12338
json_reverse_iterator & operator--()
pre-decrement (–it)
Definition json.hpp:12302
reference value() const
return the value of an iterator
Definition json.hpp:12345
json_reverse_iterator & operator++()
pre-increment (++it)
Definition json.hpp:12290
bool start_object(std::size_t=std::size_t(-1))
Definition json.hpp:6498
bool start_array(std::size_t=std::size_t(-1))
Definition json.hpp:6513
bool number_integer(number_integer_t)
Definition json.hpp:6473
bool number_unsigned(number_unsigned_t)
Definition json.hpp:6478
bool number_float(number_float_t, const string_t &)
Definition json.hpp:6483
json_sax_dom_callback_parser & operator=(const json_sax_dom_callback_parser &)=delete
const bool allow_exceptions
whether to throw exceptions in case of errors
Definition json.hpp:6448
BasicJsonType * object_element
helper to hold the reference for the next object element
Definition json.hpp:6442
const parser_callback_t callback
callback function
Definition json.hpp:6446
json_sax_dom_callback_parser(const json_sax_dom_callback_parser &)=delete
bool number_integer(number_integer_t val)
Definition json.hpp:6185
BasicJsonType & root
the parsed JSON value
Definition json.hpp:6434
std::vector< BasicJsonType * > ref_stack
stack to model hierarchy of values
Definition json.hpp:6436
BasicJsonType discarded
a discarded value for the callback
Definition json.hpp:6450
std::vector< bool > key_keep_stack
stack to manage which object keys to keep
Definition json.hpp:6440
bool errored
whether a syntax error occurred
Definition json.hpp:6444
std::vector< bool > keep_stack
stack to manage which values to keep
Definition json.hpp:6438
bool number_unsigned(number_unsigned_t val)
Definition json.hpp:6191
json_sax_dom_callback_parser & operator=(json_sax_dom_callback_parser &&)=default
bool number_float(number_float_t val, const string_t &)
Definition json.hpp:6197
json_sax_dom_callback_parser(json_sax_dom_callback_parser &&)=default
json_sax_dom_callback_parser(BasicJsonType &r, const parser_callback_t cb, const bool allow_exceptions_=true)
Definition json.hpp:6158
SAX implementation to create a JSON value from SAX events.
Definition json.hpp:5974
bool start_array(std::size_t len)
Definition json.hpp:6066
json_sax_dom_parser(const json_sax_dom_parser &)=delete
json_sax_dom_parser & operator=(json_sax_dom_parser &&)=default
bool number_unsigned(number_unsigned_t val)
Definition json.hpp:6016
bool errored
whether a syntax error occurred
Definition json.hpp:6141
JSON_HEDLEY_RETURNS_NON_NULL BasicJsonType * handle_value(Value &&v)
Definition json.hpp:6112
bool start_object(std::size_t len)
Definition json.hpp:6040
BasicJsonType * object_element
helper to hold the reference for the next object element
Definition json.hpp:6139
std::vector< BasicJsonType * > ref_stack
stack to model hierarchy of values
Definition json.hpp:6137
const bool allow_exceptions
whether to throw exceptions in case of errors
Definition json.hpp:6143
constexpr bool is_errored() const
Definition json.hpp:6098
json_sax_dom_parser(json_sax_dom_parser &&)=default
json_sax_dom_parser & operator=(const json_sax_dom_parser &)=delete
BasicJsonType & root
the parsed JSON value
Definition json.hpp:6135
bool number_float(number_float_t val, const string_t &)
Definition json.hpp:6022
json_sax_dom_parser(BasicJsonType &r, const bool allow_exceptions_=true)
Definition json.hpp:5987
bool number_integer(number_integer_t val)
Definition json.hpp:6010
JSON_HEDLEY_RETURNS_NON_NULL static JSON_HEDLEY_CONST const char * token_type_name(const token_type t) noexcept
return name of values of type token_type (only used for errors)
Definition json.hpp:6589
token_type
token types for the parser
Definition json.hpp:6566
@ value_float
an floating point number – use get_number_float() for actual value
@ begin_array
the character for array begin [
@ value_string
a string – use get_string() for actual value
@ end_array
the character for array end ]
@ uninitialized
indicating the scanner is uninitialized
@ parse_error
indicating a parse error
@ value_integer
a signed integer – use get_number_integer() for actual value
@ value_separator
the value separator ,
@ end_object
the character for object end }
@ begin_object
the character for object begin {
@ value_unsigned
an unsigned integer – use get_number_unsigned() for actual value
@ end_of_input
indicating the end of the input buffer
@ literal_or_value
a literal or the begin of a value (only for diagnostics)
lexical analysis
Definition json.hpp:6639
string_t & get_string()
return current string value (implicitly resets the token; useful only once)
Definition json.hpp:7957
number_float_t value_float
Definition json.hpp:8151
const bool ignore_comments
whether comments should be ignored (true) or signaled as errors (false)
Definition json.hpp:8128
void reset() noexcept
reset token_buffer; current character is beginning of token
Definition json.hpp:7847
token_type scan()
Definition json.hpp:8035
bool next_unget
whether the next get() call should just return current
Definition json.hpp:8134
char_int_type current
the current character
Definition json.hpp:8131
static JSON_HEDLEY_PURE char get_decimal_point() noexcept
return the locale-dependent decimal point
Definition json.hpp:6670
number_integer_t value_integer
Definition json.hpp:8149
InputAdapterType ia
input adapter
Definition json.hpp:8125
lexer & operator=(lexer &&)=default
static void strtof(float &f, const char *str, char **endptr) noexcept
Definition json.hpp:7439
const char_int_type decimal_point_char
the decimal point
Definition json.hpp:8154
bool skip_bom()
skip the UTF-8 byte order mark
Definition json.hpp:8013
const char * error_message
a description of occurred lexer errors
Definition json.hpp:8146
lexer(InputAdapterType &&adapter, bool ignore_comments_=false) noexcept
Definition json.hpp:6650
position_t position
the start position of the current token
Definition json.hpp:8137
constexpr position_t get_position() const noexcept
return position of last read token
Definition json.hpp:7967
std::vector< char_type > token_string
raw input token string (for error messages)
Definition json.hpp:8140
constexpr number_integer_t get_number_integer() const noexcept
return integer value
Definition json.hpp:7939
char_int_type get()
Definition json.hpp:7864
token_type scan_number()
scan a number literal
Definition json.hpp:7496
lexer & operator=(lexer &)=delete
void unget()
unget current character (read it again on next get)
Definition json.hpp:7901
token_type scan_string()
scan a string literal
Definition json.hpp:6781
lexer(const lexer &)=delete
constexpr number_unsigned_t get_number_unsigned() const noexcept
return unsigned integer value
Definition json.hpp:7945
string_t token_buffer
buffer for variable-length tokens (numbers, strings)
Definition json.hpp:8143
static void strtof(double &f, const char *str, char **endptr) noexcept
Definition json.hpp:7445
token_type scan_literal(const char_type *literal_text, const std::size_t length, token_type return_type)
Definition json.hpp:7827
constexpr number_float_t get_number_float() const noexcept
return floating-point value
Definition json.hpp:7951
int get_codepoint()
get codepoint from 4 hex characters following \u
Definition json.hpp:6696
std::string get_token_string() const
Definition json.hpp:7975
static void strtof(long double &f, const char *str, char **endptr) noexcept
Definition json.hpp:7451
number_unsigned_t value_unsigned
Definition json.hpp:8150
lexer(lexer &&)=default
bool scan_comment()
scan a comment
Definition json.hpp:7371
JSON_HEDLEY_RETURNS_NON_NULL constexpr const char * get_error_message() const noexcept
return syntax error message
Definition json.hpp:8000
exception indicating other library errors
Definition json.hpp:3016
other_error(int id_, const char *what_arg)
Definition json.hpp:3027
exception indicating access out of the defined range
Definition json.hpp:2977
out_of_range(int id_, const char *what_arg)
Definition json.hpp:2988
output_adapter(std::basic_ostream< CharType > &s)
Definition json.hpp:13568
output adapter for output streams
Definition json.hpp:13514
void write_character(CharType c) override
Definition json.hpp:13520
std::basic_ostream< CharType > & stream
Definition json.hpp:13532
void write_characters(const CharType *s, std::size_t length) override
Definition json.hpp:13526
output_stream_adapter(std::basic_ostream< CharType > &s) noexcept
Definition json.hpp:13516
output adapter for basic_string
Definition json.hpp:13539
void write_character(CharType c) override
Definition json.hpp:13545
void write_characters(const CharType *s, std::size_t length) override
Definition json.hpp:13551
output_string_adapter(StringType &s) noexcept
Definition json.hpp:13541
output adapter for byte vectors
Definition json.hpp:13489
std::vector< CharType > & v
Definition json.hpp:13507
void write_characters(const CharType *s, std::size_t length) override
Definition json.hpp:13501
void write_character(CharType c) override
Definition json.hpp:13495
exception indicating a parse error
Definition json.hpp:2786
parse_error(int id_, std::size_t byte_, const char *what_arg)
Definition json.hpp:2826
const std::size_t byte
byte index of the parse error
Definition json.hpp:2823
static std::string position_string(const position_t &pos)
Definition json.hpp:2829
syntax analysis
Definition json.hpp:10883
lexer_t m_lexer
the lexer
Definition json.hpp:11323
bool sax_parse(SAX *sax, const bool strict=true)
Definition json.hpp:10983
token_type get_token()
get next token from lexer
Definition json.hpp:11283
token_type last_token
the type of the last read token
Definition json.hpp:11321
bool accept(const bool strict=true)
public accept interface
Definition json.hpp:10975
bool sax_parse_internal(SAX *sax)
Definition json.hpp:11002
const parser_callback_t< BasicJsonType > callback
callback function
Definition json.hpp:11319
void parse(const bool strict, BasicJsonType &result)
public parser interface
Definition json.hpp:10915
const bool allow_exceptions
whether to throw exceptions in case of errors
Definition json.hpp:11325
primitive_iterator_t operator+(difference_type n) noexcept
Definition json.hpp:11407
primitive_iterator_t & operator++() noexcept
Definition json.hpp:11419
constexpr bool is_end() const noexcept
return whether the iterator is at end
Definition json.hpp:11392
primitive_iterator_t & operator-=(difference_type n) noexcept
Definition json.hpp:11451
constexpr bool is_begin() const noexcept
return whether the iterator can be dereferenced
Definition json.hpp:11386
friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
Definition json.hpp:11402
void set_begin() noexcept
set iterator to a defined beginning
Definition json.hpp:11374
primitive_iterator_t const operator++(int) noexcept
Definition json.hpp:11425
static constexpr difference_type end_value
Definition json.hpp:11361
friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
Definition json.hpp:11397
friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
Definition json.hpp:11414
primitive_iterator_t & operator--() noexcept
Definition json.hpp:11432
void set_end() noexcept
set iterator to a defined past the end
Definition json.hpp:11380
constexpr difference_type get_value() const noexcept
Definition json.hpp:11368
primitive_iterator_t const operator--(int) noexcept
Definition json.hpp:11438
primitive_iterator_t & operator+=(difference_type n) noexcept
Definition json.hpp:11445
static constexpr difference_type begin_value
Definition json.hpp:11360
const error_handler_t error_handler
error_handler how to react on decoding errors
Definition json.hpp:17280
const std::lconv * loc
the locale
Definition json.hpp:17265
std::array< char, 64 > number_buffer
a (hopefully) large enough character buffer
Definition json.hpp:17262
static constexpr std::uint8_t UTF8_ACCEPT
Definition json.hpp:16375
serializer(serializer &&)=delete
serializer & operator=(serializer &&)=delete
const char decimal_point
the locale's decimal point character
Definition json.hpp:17269
const char thousands_sep
the locale's thousand separator character
Definition json.hpp:17267
serializer & operator=(const serializer &)=delete
static constexpr std::uint8_t UTF8_REJECT
Definition json.hpp:16376
void dump(const BasicJsonType &val, const bool pretty_print, const bool ensure_ascii, const unsigned int indent_step, const unsigned int current_indent=0)
internal implementation of the serialization function
Definition json.hpp:16424
const char indent_char
the indentation character
Definition json.hpp:17275
std::array< char, 512 > string_buffer
string buffer
Definition json.hpp:17272
JSON_PRIVATE_UNLESS_TESTED const bool ensure_ascii
Definition json.hpp:16709
serializer(const serializer &)=delete
string_t indent_string
the indentation string
Definition json.hpp:17277
exception indicating executing a member function with a wrong type
Definition json.hpp:2929
type_error(int id_, const char *what_arg)
Definition json.hpp:2940
std::size_t utf8_bytes_index
index to the utf8_codes array for the next valid byte
Definition json.hpp:5659
std::size_t utf8_bytes_filled
number of valid bytes in the utf8_codes array
Definition json.hpp:5661
wide_string_input_adapter(BaseInputAdapter base)
Definition json.hpp:5626
std::string to_string() const
return a string representation of the JSON pointer
Definition json.hpp:12425
friend class basic_json
Definition json.hpp:12383
json_pointer result
Definition json.hpp:12745
#define JSON_HEDLEY_PGI_VERSION_CHECK(major, minor, patch)
Definition json.hpp:331
#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49)
Definition json.hpp:2470
#define NLOHMANN_BASIC_JSON_TPL_DECLARATION
Definition json.hpp:2339
#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36)
Definition json.hpp:2457
#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43)
Definition json.hpp:2464
#define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major, minor, patch)
Definition json.hpp:463
#define JSON_HEDLEY_CONST
Definition json.hpp:1670
#define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major, minor, patch)
Definition json.hpp:495
#define JSON_HEDLEY_DIAGNOSTIC_PUSH
Definition json.hpp:954
#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40)
Definition json.hpp:2461
#define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major, minor, patch)
Definition json.hpp:447
#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61)
Definition json.hpp:2482
#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62)
Definition json.hpp:2483
#define JSON_USE_IMPLICIT_CONVERSIONS
Definition json.hpp:2508
#define JSON_HEDLEY_UNPREDICTABLE(expr)
Definition json.hpp:1569
#define JSON_HEDLEY_WARN_UNUSED_RESULT
Definition json.hpp:1300
#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45)
Definition json.hpp:2466
#define JSON_PRIVATE_UNLESS_TESTED
Definition json.hpp:2302
#define JSON_HEDLEY_UNREACHABLE()
Definition json.hpp:1431
#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19)
Definition json.hpp:2440
#define NLOHMANN_JSON_VERSION_PATCH
Definition json.hpp:35
#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21)
Definition json.hpp:2442
#define NLOHMANN_JSON_TO(v1)
Definition json.hpp:2486
#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24)
Definition json.hpp:2445
#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35)
Definition json.hpp:2456
#define JSON_HEDLEY_LIKELY(expr)
Definition json.hpp:1565
#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33)
Definition json.hpp:2454
#define JSON_HEDLEY_IS_CONSTANT(expr)
Definition json.hpp:2001
#define JSON_HEDLEY_TINYC_VERSION_CHECK(major, minor, patch)
Definition json.hpp:583
#define JSON_HEDLEY_TI_VERSION_CHECK(major, minor, patch)
Definition json.hpp:431
nlohmann::json::json_pointer operator""_json_pointer(const char *s, std::size_t n)
user-defined string literal for JSON pointer
Definition json.hpp:26457
#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28)
Definition json.hpp:2449
#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57)
Definition json.hpp:2478
#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16)
Definition json.hpp:2437
#define JSON_HEDLEY_HAS_WARNING(warning)
Definition json.hpp:871
#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55)
Definition json.hpp:2476
#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4)
Definition json.hpp:2425
#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major, minor, patch)
Definition json.hpp:353
#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50)
Definition json.hpp:2471
#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29)
Definition json.hpp:2450
#define JSON_HEDLEY_NON_NULL(...)
Definition json.hpp:1458
#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3)
Definition json.hpp:2424
#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x)
Definition json.hpp:992
#define JSON_INTERNAL_CATCH(exception)
Definition json.hpp:2269
#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11)
Definition json.hpp:2432
#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27)
Definition json.hpp:2448
#define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major, minor, patch)
Definition json.hpp:315
#define JSON_HEDLEY_CRAY_VERSION_CHECK(major, minor, patch)
Definition json.hpp:547
#define JSON_HEDLEY_RETURNS_NON_NULL
Definition json.hpp:1899
#define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major, minor, patch)
Definition json.hpp:511
#define JSON_HEDLEY_IBM_VERSION_CHECK(major, minor, patch)
Definition json.hpp:407
#define NLOHMANN_JSON_PASTE2(func, v1)
Definition json.hpp:2422
#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44)
Definition json.hpp:2465
#define JSON_CATCH(exception)
Definition json.hpp:2268
#define JSON_ASSERT(x)
Definition json.hpp:2295
#define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major, minor, patch)
Definition json.hpp:647
#define JSON_THROW(exception)
Definition json.hpp:2266
#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5)
Definition json.hpp:2426
#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51)
Definition json.hpp:2472
#define JSON_HEDLEY_ASSUME(expr)
Definition json.hpp:1416
#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58)
Definition json.hpp:2479
#define JSON_HEDLEY_HAS_FEATURE(feature)
Definition json.hpp:790
#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56)
Definition json.hpp:2477
#define NLOHMANN_JSON_VERSION_MAJOR
Definition json.hpp:33
#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18)
Definition json.hpp:2439
#define NLOHMANN_BASIC_JSON_TPL
Definition json.hpp:2348
#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52)
Definition json.hpp:2473
#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25)
Definition json.hpp:2446
#define JSON_HEDLEY_IAR_VERSION_CHECK(major, minor, patch)
Definition json.hpp:567
#define NLOHMANN_JSON_FROM(v1)
Definition json.hpp:2487
#define JSON_HEDLEY_UNLIKELY(expr)
Definition json.hpp:1566
#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13)
Definition json.hpp:2434
#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63)
Definition json.hpp:2484
#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14)
Definition json.hpp:2435
#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42)
Definition json.hpp:2463
#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7)
Definition json.hpp:2428
#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39)
Definition json.hpp:2460
#define NLOHMANN_JSON_PASTE(...)
Definition json.hpp:2357
#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26)
Definition json.hpp:2447
#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41)
Definition json.hpp:2462
#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37)
Definition json.hpp:2458
#define JSON_TRY
Definition json.hpp:2267
#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)
Definition json.hpp:2431
#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)
Definition json.hpp:2433
#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59)
Definition json.hpp:2480
#define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major, minor, patch)
Definition json.hpp:527
#define NLOHMANN_JSON_PASTE3(func, v1, v2)
Definition json.hpp:2423
#define JSON_HEDLEY_GCC_VERSION_CHECK(major, minor, patch)
Definition json.hpp:678
#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6)
Definition json.hpp:2427
#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32)
Definition json.hpp:2453
#define JSON_HEDLEY_GCC_HAS_WARNING(warning, major, minor, patch)
Definition json.hpp:889
#define NLOHMANN_JSON_VERSION_MINOR
Definition json.hpp:34
#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47)
Definition json.hpp:2468
#define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major, minor, patch)
Definition json.hpp:479
#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54)
Definition json.hpp:2475
#define JSON_HEDLEY_CONSTEXPR
Definition json.hpp:1503
#define JSON_HEDLEY_MSVC_VERSION_CHECK(major, minor, patch)
Definition json.hpp:275
#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53)
Definition json.hpp:2474
#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22)
Definition json.hpp:2443
#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46)
Definition json.hpp:2467
#define JSON_HEDLEY_HAS_BUILTIN(builtin)
Definition json.hpp:763
#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60)
Definition json.hpp:2481
#define JSON_DIAGNOSTICS
Definition json.hpp:2518
#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9)
Definition json.hpp:2430
#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23)
Definition json.hpp:2444
#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48)
Definition json.hpp:2469
#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30)
Definition json.hpp:2451
#define JSON_HEDLEY_INTEL_VERSION_CHECK(major, minor, patch)
Definition json.hpp:299
#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20)
Definition json.hpp:2441
nlohmann::json operator""_json(const char *s, std::size_t n)
user-defined string literal for JSON values
Definition json.hpp:26438
#define JSON_HEDLEY_PRAGMA(value)
Definition json.hpp:915
#define JSON_HEDLEY_ARM_VERSION_CHECK(major, minor, patch)
Definition json.hpp:387
#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
Definition json.hpp:2436
#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8)
Definition json.hpp:2429
#define JSON_HEDLEY_DIAGNOSTIC_POP
Definition json.hpp:955
#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34)
Definition json.hpp:2455
#define JSON_EXPLICIT
Definition json.hpp:2512
#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement)
Definition json.hpp:1248
#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31)
Definition json.hpp:2452
#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38)
Definition json.hpp:2459
#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute, major, minor, patch)
Definition json.hpp:709
#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17)
Definition json.hpp:2438
#define JSON_HEDLEY_HAS_ATTRIBUTE(attribute)
Definition json.hpp:691
#define JSON_HEDLEY_PURE
Definition json.hpp:1639
#define NLOHMANN_JSON_EXPAND(x)
Definition json.hpp:2355
#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...)
Definition json.hpp:2356
Definition IBaseApi.h:9
constexpr float api_version
ARK_API std::string GetCurrentDir()
Definition Tools.cpp:7
ARK_API std::wstring Utf8Decode(const std::string &str)
Converts an UTF8 string to a wide Unicode String.
Definition Tools.cpp:56
IApiUtils & GetApiUtils()
Definition ApiUtils.cpp:99
void InitHooks()
Definition HooksImpl.cpp:31
constexpr const auto & to_json
Definition json.hpp:4936
constexpr const auto & from_json
Definition json.hpp:4332
implements the Grisu2 algorithm for binary to decimal floating-point conversion.
Definition json.hpp:15263
void grisu2(char *buf, int &len, int &decimal_exponent, diyfp m_minus, diyfp v, diyfp m_plus)
Definition json.hpp:16046
JSON_HEDLEY_RETURNS_NON_NULL char * format_buffer(char *buf, int len, int decimal_exponent, int min_exp, int max_exp)
prettify v = buf * 10^decimal_exponent
Definition json.hpp:16198
Target reinterpret_bits(const Source source)
Definition json.hpp:15266
boundaries compute_boundaries(FloatType value)
Definition json.hpp:15407
int find_largest_pow10(const std::uint32_t n, std::uint32_t &pow10)
Definition json.hpp:15710
void grisu2_round(char *buf, int len, std::uint64_t dist, std::uint64_t delta, std::uint64_t rest, std::uint64_t ten_k)
Definition json.hpp:15764
JSON_HEDLEY_RETURNS_NON_NULL char * append_exponent(char *buf, int e)
appends a decimal representation of e to buf
Definition json.hpp:16146
void grisu2_digit_gen(char *buffer, int &length, int &decimal_exponent, diyfp M_minus, diyfp w, diyfp M_plus)
Definition json.hpp:15805
void grisu2(char *buf, int &len, int &decimal_exponent, FloatType value)
Definition json.hpp:16106
cached_power get_cached_power_for_binary_exponent(int e)
Definition json.hpp:15546
detail namespace with internal helper functions
Definition json.hpp:91
bool operator<(const value_t lhs, const value_t rhs) noexcept
comparison operator for JSON types
Definition json.hpp:147
value_t
the JSON type enumeration
Definition json.hpp:121
@ number_integer
number value (signed integer)
@ discarded
discarded by the parser callback function
@ binary
binary array (ordered collection of bytes)
@ object
object (unordered set of name/value pairs)
@ number_float
number value (floating-point)
@ number_unsigned
number value (unsigned integer)
@ array
array (ordered collection of values)
void from_json(const BasicJsonType &j, typename std::nullptr_t &n)
Definition json.hpp:3895
void int_to_string(string_type &target, std::size_t value)
Definition json.hpp:4367
JSON_HEDLEY_RETURNS_NON_NULL char * to_chars(char *first, const char *last, FloatType value)
generates a decimal representation of the floating-point number value in [first, last).
Definition json.hpp:16283
file_input_adapter input_adapter(std::FILE *file)
Definition json.hpp:5745
cbor_tag_handler_t
how to treat CBOR tags
Definition json.hpp:8326
@ store
store tags as binary type
@ error
throw a parse_error exception in case of a tag
@ value
the parser finished reading a JSON value
@ key
the parser read a key of a value in an object
@ array_end
the parser read ] and finished processing a JSON array
@ array_start
the parser read [ and started to process a JSON array
@ object_start
the parser read { and started to process a JSON object
@ object_end
the parser read } and finished processing a JSON object
error_handler_t
how to treat decoding errors
Definition json.hpp:16361
@ strict
throw a type_error exception in case of invalid UTF-8
@ ignore
ignore invalid UTF-8 sequences
@ replace
replace invalid UTF-8 sequences with U+FFFD
std::size_t combine(std::size_t seed, std::size_t h) noexcept
Definition json.hpp:5204
std::size_t hash(const BasicJsonType &j)
hash a JSON value
Definition json.hpp:5222
input_format_t
the supported input formats
Definition json.hpp:5358
auto get(const nlohmann::detail::iteration_proxy_value< IteratorType > &i) -> decltype(i.key())
Definition json.hpp:4498
static bool little_endianess(int num=1) noexcept
determine system byte order
Definition json.hpp:8339
namespace for Niels Lohmann
Definition json.hpp:89
Definition json.hpp:4518
#define __has_feature(x)
Definition os.h:53
LPVOID target
Definition Hooks.h:36
LPVOID * original
Definition Hooks.h:38
Hook(LPVOID target, LPVOID detour, LPVOID *original)
Definition Hooks.h:29
LPVOID detour
Definition Hooks.h:37
std::string description
std::vector< std::string > dependencies
Plugin(HINSTANCE h_module, std::string name, std::string full_name, std::string description, float version, float min_api_version, std::vector< std::string > dependencies)
HINSTANCE h_module
float min_api_version
std::string full_name
std::string name
std::function< T > callback
Definition Commands.h:67
Command(FString command, std::function< T > callback)
Definition Commands.h:60
void SendMessageW(int Id, int Type, FString *OutGoingMessage)
Definition Other.h:122
int Id
Definition Other.h:129
FString Body
Definition Other.h:131
static auto from_json(BasicJsonType &&j, TargetType &val) noexcept(noexcept(::nlohmann::from_json(std::forward< BasicJsonType >(j), val))) -> decltype(::nlohmann::from_json(std::forward< BasicJsonType >(j), val), void())
convert a JSON value to any value type
Definition json.hpp:4963
static auto from_json(BasicJsonType &&j) noexcept(noexcept(::nlohmann::from_json(std::forward< BasicJsonType >(j), detail::identity_tag< TargetType > {}))) -> decltype(::nlohmann::from_json(std::forward< BasicJsonType >(j), detail::identity_tag< TargetType > {}))
convert a JSON value to any value type
Definition json.hpp:4983
static auto to_json(BasicJsonType &j, TargetType &&val) noexcept(noexcept(::nlohmann::to_json(j, std::forward< TargetType >(val)))) -> decltype(::nlohmann::to_json(j, std::forward< TargetType >(val)), void())
convert any value type to a JSON value
Definition json.hpp:5000
static constexpr int kPrecision
Definition json.hpp:15277
static diyfp normalize(diyfp x) noexcept
normalize x such that the significand is >= 2^(q-1)
Definition json.hpp:15365
static diyfp normalize_to(const diyfp &x, const int target_exponent) noexcept
normalize x such that the result has the exponent E
Definition json.hpp:15382
static diyfp mul(const diyfp &x, const diyfp &y) noexcept
returns x * y
Definition json.hpp:15300
constexpr diyfp(std::uint64_t f_, int e_) noexcept
Definition json.hpp:15282
static diyfp sub(const diyfp &x, const diyfp &y) noexcept
returns x - y
Definition json.hpp:15288
static void construct(BasicJsonType &j, typename BasicJsonType::array_t &&arr)
Definition json.hpp:4686
static void construct(BasicJsonType &j, const typename BasicJsonType::array_t &arr)
Definition json.hpp:4676
static void construct(BasicJsonType &j, const typename BasicJsonType::binary_t &b)
Definition json.hpp:4615
static void construct(BasicJsonType &j, typename BasicJsonType::binary_t &&b)
Definition json.hpp:4624
static void construct(BasicJsonType &j, typename BasicJsonType::boolean_t b) noexcept
Definition json.hpp:4569
static void construct(BasicJsonType &j, typename BasicJsonType::number_float_t val) noexcept
Definition json.hpp:4637
static void construct(BasicJsonType &j, typename BasicJsonType::number_integer_t val) noexcept
Definition json.hpp:4663
static void construct(BasicJsonType &j, typename BasicJsonType::number_unsigned_t val) noexcept
Definition json.hpp:4650
static void construct(BasicJsonType &j, typename BasicJsonType::object_t &&obj)
Definition json.hpp:4756
static void construct(BasicJsonType &j, const typename BasicJsonType::object_t &obj)
Definition json.hpp:4746
static void construct(BasicJsonType &j, typename BasicJsonType::string_t &&s)
Definition json.hpp:4591
static void construct(BasicJsonType &j, const typename BasicJsonType::string_t &s)
Definition json.hpp:4582
primitive_iterator_t primitive_iterator
generic iterator for all other types
Definition json.hpp:11478
BasicJsonType::array_t::iterator array_iterator
iterator for JSON arrays
Definition json.hpp:11476
BasicJsonType::object_t::iterator object_iterator
iterator for JSON objects
Definition json.hpp:11474
static constexpr bool value
Definition json.hpp:3519
static one test(decltype(&C::capacity))
static constexpr bool value
Definition json.hpp:8242
static adapter_type create(IteratorType first, IteratorType last)
Definition json.hpp:5672
nonesuch(nonesuch const &)=delete
void operator=(nonesuch &&)=delete
nonesuch(nonesuch const &&)=delete
void operator=(nonesuch const &)=delete
abstract output adapter interface
Definition json.hpp:13470
virtual void write_characters(const CharType *s, std::size_t length)=0
virtual void write_character(CharType c)=0
output_adapter_protocol & operator=(output_adapter_protocol &&) noexcept=default
output_adapter_protocol(output_adapter_protocol &&) noexcept=default
output_adapter_protocol & operator=(const output_adapter_protocol &)=default
output_adapter_protocol(const output_adapter_protocol &)=default
struct to capture the start position of the current token
Definition json.hpp:2593
std::size_t lines_read
the number of lines read
Definition json.hpp:2599
std::size_t chars_read_current_line
the number of characters read in the current line
Definition json.hpp:2597
std::size_t chars_read_total
the total number of characters read
Definition json.hpp:2595
constexpr operator size_t() const
conversion to size_t to preserve SAX interface
Definition json.hpp:2602
static constexpr T value
Definition json.hpp:3182
SAX interface.
Definition json.hpp:5843
virtual bool start_object(std::size_t elements)=0
the beginning of an object was read
virtual bool string(string_t &val)=0
a string was read
virtual bool null()=0
a null value was read
json_sax & operator=(json_sax &&) noexcept=default
virtual bool end_array()=0
the end of an array was read
virtual bool key(string_t &val)=0
an object key was read
virtual bool binary(binary_t &val)=0
a binary string was read
virtual bool start_array(std::size_t elements)=0
the beginning of an array was read
json_sax(json_sax &&) noexcept=default
virtual bool boolean(bool val)=0
a boolean value was read
json_sax(const json_sax &)=default
json_sax & operator=(const json_sax &)=default
virtual bool end_object()=0
the end of an object was read
virtual bool number_unsigned(number_unsigned_t val)=0
an unsigned integer number was read
virtual bool number_float(number_float_t val, const string_t &s)=0
an floating-point number was read
virtual ~json_sax()=default
virtual bool number_integer(number_integer_t val)=0
an integer number was read