|
tgbotxx 1.1.9.2
Telegram Bot C++ Library
|
#include <type_traits>#include <cstdint>#include <ctime>#include <iostream>#include <memory>#include <nlohmann/json.hpp>#include <sstream>#include <string>#include <tgbotxx/Exception.hpp>#include <tgbotxx/utils/Ptr.hpp>#include <vector>Go to the source code of this file.
Macros | |
| #define | OBJECT_SERIALIZE_FIELD(json, json_field, field) json[json_field] = field; |
| Available objects: https://core.telegram.org/bots/api#available-types. | |
| #define | OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field) |
| #define | OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field) |
| #define | OBJECT_SERIALIZE_FIELD_PTR_ARRAY_ARRAY(json, json_field, array_array_field) |
| #define | OBJECT_SERIALIZE_FIELD_ENUM(json, enum_name, json_field, field) json[json_field] = enum_name##ToString(field) |
| #define | OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional) |
| Deserialize. | |
| #define | OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional) |
| #define | OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field, optional) |
| #define | OBJECT_DESERIALIZE_FIELD_PTR_ARRAY_ARRAY(json, json_field, array_array_field, optional) |
| #define | OBJECT_DESERIALIZE_FIELD_ENUM(json, enum_name, json_field, field, default_value, optional) |
| #define OBJECT_DESERIALIZE_FIELD | ( | json, | |
| json_field, | |||
| field, | |||
| default_value, | |||
| optional | |||
| ) |
Deserialize.
Definition at line 46 of file Object.hpp.
| #define OBJECT_DESERIALIZE_FIELD_ENUM | ( | json, | |
| enum_name, | |||
| json_field, | |||
| field, | |||
| default_value, | |||
| optional | |||
| ) |
Definition at line 137 of file Object.hpp.
| #define OBJECT_DESERIALIZE_FIELD_PTR | ( | json, | |
| json_field, | |||
| field, | |||
| optional | |||
| ) |
Definition at line 72 of file Object.hpp.
| #define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY | ( | json, | |
| json_field, | |||
| array_field, | |||
| optional | |||
| ) |
Definition at line 89 of file Object.hpp.
| #define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY_ARRAY | ( | json, | |
| json_field, | |||
| array_array_field, | |||
| optional | |||
| ) |
Definition at line 110 of file Object.hpp.
| #define OBJECT_SERIALIZE_FIELD | ( | json, | |
| json_field, | |||
| field | |||
| ) | json[json_field] = field; |
Available objects: https://core.telegram.org/bots/api#available-types.
Helper macros to de/serialize objects Serialize
Definition at line 19 of file Object.hpp.
| #define OBJECT_SERIALIZE_FIELD_ENUM | ( | json, | |
| enum_name, | |||
| json_field, | |||
| field | |||
| ) | json[json_field] = enum_name##ToString(field) |
Definition at line 42 of file Object.hpp.
| #define OBJECT_SERIALIZE_FIELD_PTR | ( | json, | |
| json_field, | |||
| field | |||
| ) |
Definition at line 22 of file Object.hpp.
| #define OBJECT_SERIALIZE_FIELD_PTR_ARRAY | ( | json, | |
| json_field, | |||
| array_field | |||
| ) |
Definition at line 27 of file Object.hpp.
| #define OBJECT_SERIALIZE_FIELD_PTR_ARRAY_ARRAY | ( | json, | |
| json_field, | |||
| array_array_field | |||
| ) |
Definition at line 32 of file Object.hpp.