From b22c20c4db8c35eaee99075d055f74697c5805b8 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Sun, 15 Jan 2017 02:33:59 +0300 Subject: Docs --- docs/d7/d1a/_tg_type_parser_8h.html | 169 +++++++++++++++ docs/d7/d1a/_tg_type_parser_8h_source.html | 322 +++++++++++++++++++++++++++++ 2 files changed, 491 insertions(+) create mode 100644 docs/d7/d1a/_tg_type_parser_8h.html create mode 100644 docs/d7/d1a/_tg_type_parser_8h_source.html (limited to 'docs/d7/d1a') diff --git a/docs/d7/d1a/_tg_type_parser_8h.html b/docs/d7/d1a/_tg_type_parser_8h.html new file mode 100644 index 0000000..58367d6 --- /dev/null +++ b/docs/d7/d1a/_tg_type_parser_8h.html @@ -0,0 +1,169 @@ + + + + + + + +tgbot-cpp: include/tgbot/TgTypeParser.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TgTypeParser.h File Reference
+
+
+
#include <string>
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/json_parser.hpp>
+#include "tgbot/types/User.h"
+#include "tgbot/types/Chat.h"
+#include "tgbot/types/Message.h"
+#include "tgbot/types/PhotoSize.h"
+#include "tgbot/types/Audio.h"
+#include "tgbot/types/Document.h"
+#include "tgbot/types/Sticker.h"
+#include "tgbot/types/Video.h"
+#include "tgbot/types/Contact.h"
+#include "tgbot/types/Location.h"
+#include "tgbot/types/Update.h"
+#include "tgbot/types/UserProfilePhotos.h"
+#include "tgbot/types/File.h"
+#include "tgbot/types/ReplyKeyboardMarkup.h"
+#include "tgbot/types/KeyboardButton.h"
+#include "tgbot/types/ReplyKeyboardRemove.h"
+#include "tgbot/types/ForceReply.h"
+#include "tgbot/types/ChatMember.h"
+#include "tgbot/types/ResponseParameters.h"
+#include "tgbot/types/GenericReply.h"
+#include "tgbot/types/InlineQuery.h"
+#include "tgbot/types/InlineQueryResult.h"
+#include "tgbot/types/InlineQueryResultCachedAudio.h"
+#include "tgbot/types/InlineQueryResultCachedDocument.h"
+#include "tgbot/types/InlineQueryResultCachedGif.h"
+#include "tgbot/types/InlineQueryResultCachedMpeg4Gif.h"
+#include "tgbot/types/InlineQueryResultCachedPhoto.h"
+#include "tgbot/types/InlineQueryResultCachedSticker.h"
+#include "tgbot/types/InlineQueryResultCachedVideo.h"
+#include "tgbot/types/InlineQueryResultCachedVoice.h"
+#include "tgbot/types/InlineQueryResultArticle.h"
+#include "tgbot/types/InlineQueryResultAudio.h"
+#include "tgbot/types/InlineQueryResultContact.h"
+#include "tgbot/types/InlineQueryResultGame.h"
+#include "tgbot/types/InlineQueryResultDocument.h"
+#include "tgbot/types/InlineQueryResultGif.h"
+#include "tgbot/types/InlineQueryResultLocation.h"
+#include "tgbot/types/InlineQueryResultMpeg4Gif.h"
+#include "tgbot/types/InlineQueryResultPhoto.h"
+#include "tgbot/types/InlineQueryResultVenue.h"
+#include "tgbot/types/InlineQueryResultVideo.h"
+#include "tgbot/types/InlineQueryResultVoice.h"
+#include "tgbot/types/ChosenInlineResult.h"
+#include "tgbot/types/CallbackQuery.h"
+#include "tgbot/types/InlineKeyboardMarkup.h"
+#include "tgbot/types/InlineKeyboardButton.h"
+#include "tgbot/types/WebhookInfo.h"
+#include "tgbot/types/InputMessageContent.h"
+#include "tgbot/types/InputTextMessageContent.h"
+#include "tgbot/types/InputLocationMessageContent.h"
+#include "tgbot/types/InputVenueMessageContent.h"
+#include "tgbot/types/InputContactMessageContent.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  TgBot::TgTypeParser
 
+ + + +

+Namespaces

 TgBot
 
+
+
+ + + + diff --git a/docs/d7/d1a/_tg_type_parser_8h_source.html b/docs/d7/d1a/_tg_type_parser_8h_source.html new file mode 100644 index 0000000..5dae1eb --- /dev/null +++ b/docs/d7/d1a/_tg_type_parser_8h_source.html @@ -0,0 +1,322 @@ + + + + + + + +tgbot-cpp: include/tgbot/TgTypeParser.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TgTypeParser.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Oleg Morozenkov
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all
12  * copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  */
22 
23 #ifndef TGBOT_CPP_TGTYPEPARSER_H
24 #define TGBOT_CPP_TGTYPEPARSER_H
25 
26 #include <string>
27 
28 #include <boost/property_tree/ptree.hpp>
29 #include <boost/property_tree/json_parser.hpp>
30 
31 #include "tgbot/types/User.h"
32 #include "tgbot/types/Chat.h"
33 #include "tgbot/types/Message.h"
34 #include "tgbot/types/PhotoSize.h"
35 #include "tgbot/types/Audio.h"
36 #include "tgbot/types/Document.h"
37 #include "tgbot/types/Sticker.h"
38 #include "tgbot/types/Video.h"
39 #include "tgbot/types/Contact.h"
40 #include "tgbot/types/Location.h"
41 #include "tgbot/types/Update.h"
43 #include "tgbot/types/File.h"
47 #include "tgbot/types/ForceReply.h"
48 #include "tgbot/types/ChatMember.h"
83 
84 namespace TgBot {
85 
86 class TgTypeParser {
87 
88 public:
89  template<typename T>
90  using JsonToTgTypeFunc = std::shared_ptr<T> (TgTypeParser::*)(const boost::property_tree::ptree&) const;
91 
92  template<typename T>
93  using TgTypeToJsonFunc = std::string (TgTypeParser::*)(const std::shared_ptr<T>&) const;
94 
95  static TgTypeParser& getInstance();
96 
97  Chat::Ptr parseJsonAndGetChat(const boost::property_tree::ptree& data) const;
98  std::string parseChat(const Chat::Ptr& object) const;
99  User::Ptr parseJsonAndGetUser(const boost::property_tree::ptree& data) const;
100  std::string parseUser(const User::Ptr& object) const;
101  MessageEntity::Ptr parseJsonAndGetEntity(const boost::property_tree::ptree& data) const;
102  Message::Ptr parseJsonAndGetMessage(const boost::property_tree::ptree& data) const;
103  std::string parseMessage(const Message::Ptr& object) const;
104  PhotoSize::Ptr parseJsonAndGetPhotoSize(const boost::property_tree::ptree& data) const;
105  std::string parsePhotoSize(const PhotoSize::Ptr& object) const;
106  Audio::Ptr parseJsonAndGetAudio(const boost::property_tree::ptree& data) const;
107  std::string parseAudio(const Audio::Ptr& object) const;
108  Document::Ptr parseJsonAndGetDocument(const boost::property_tree::ptree& data) const;
109  std::string parseDocument(const Document::Ptr& object) const;
110  Sticker::Ptr parseJsonAndGetSticker(const boost::property_tree::ptree& data) const;
111  std::string parseSticker(const Sticker::Ptr& object) const;
112  Video::Ptr parseJsonAndGetVideo(const boost::property_tree::ptree& data) const;
113  std::string parseVideo(const Video::Ptr& object) const;
114  Contact::Ptr parseJsonAndGetContact(const boost::property_tree::ptree& data) const;
115  std::string parseContact(const Contact::Ptr& object) const;
116  Location::Ptr parseJsonAndGetLocation(const boost::property_tree::ptree& data) const;
117  std::string parseLocation(const Location::Ptr& object) const;
118  Update::Ptr parseJsonAndGetUpdate(const boost::property_tree::ptree& data) const;
119  std::string parseUpdate(const Update::Ptr& object) const;
120  UserProfilePhotos::Ptr parseJsonAndGetUserProfilePhotos(const boost::property_tree::ptree& data) const;
121  std::string parseUserProfilePhotos(const UserProfilePhotos::Ptr& object) const;
122 
123  File::Ptr parseJsonAndGetFile(const boost::property_tree::ptree& data) const;
124  std::string parseFile(const File::Ptr& object) const;
125 
126  ReplyKeyboardMarkup::Ptr parseJsonAndGetReplyKeyboardMarkup(const boost::property_tree::ptree& data) const;
127  std::string parseReplyKeyboardMarkup(const ReplyKeyboardMarkup::Ptr& object) const;
128 
129  KeyboardButton::Ptr parseJsonAndGetKeyboardButton(const boost::property_tree::ptree& data) const;
130  std::string parseKeyboardButton(const KeyboardButton::Ptr& object) const;
131 
132  ReplyKeyboardRemove::Ptr parseJsonAndGetReplyKeyboardRemove(const boost::property_tree::ptree& data) const;
133  std::string parseReplyKeyboardRemove(const ReplyKeyboardRemove::Ptr& object) const;
134 
135  ForceReply::Ptr parseJsonAndGetForceReply(const boost::property_tree::ptree& data) const;
136  std::string parseForceReply(const ForceReply::Ptr& object) const;
137 
138  ChatMember::Ptr parseJsonAndGetChatMember(const boost::property_tree::ptree& data) const;
139  std::string parseChatMember(const ChatMember::Ptr& object) const;
140 
141  ResponseParameters::Ptr parseJsonAndGetResponseParameters(const boost::property_tree::ptree& data) const;
142  std::string parseResponseParameters(const ResponseParameters::Ptr& object) const;
143 
144  GenericReply::Ptr parseJsonAndGetGenericReply(const boost::property_tree::ptree& data) const;
145  std::string parseGenericReply(const GenericReply::Ptr& object) const;
146 
147  InlineQuery::Ptr parseJsonAndGetInlineQuery(const boost::property_tree::ptree& data) const;
148  std::string parseInlineQuery(const InlineQuery::Ptr& object) const;
149 
150  InlineQueryResult::Ptr parseJsonAndGetInlineQueryResult(const boost::property_tree::ptree& data) const;
151  std::string parseInlineQueryResult(const InlineQueryResult::Ptr& object) const;
152 
153  InlineQueryResultCachedAudio::Ptr parseJsonAndGetInlineQueryResultCachedAudio(const boost::property_tree::ptree& data) const;
155 
156  InlineQueryResultCachedDocument::Ptr parseJsonAndGetInlineQueryResultCachedDocument(const boost::property_tree::ptree& data) const;
158 
159  InlineQueryResultCachedGif::Ptr parseJsonAndGetInlineQueryResultCachedGif(const boost::property_tree::ptree& data) const;
160  std::string parseInlineQueryResultCachedGif(const InlineQueryResultCachedGif::Ptr& object) const;
161 
162  InlineQueryResultCachedMpeg4Gif::Ptr parseJsonAndGetInlineQueryResultCachedMpeg4Gif(const boost::property_tree::ptree& data) const;
164 
165  InlineQueryResultCachedPhoto::Ptr parseJsonAndGetInlineQueryResultCachedPhoto(const boost::property_tree::ptree& data) const;
167 
168  InlineQueryResultCachedSticker::Ptr parseJsonAndGetInlineQueryResultCachedSticker(const boost::property_tree::ptree& data) const;
170 
171  InlineQueryResultCachedVideo::Ptr parseJsonAndGetInlineQueryResultCachedVideo(const boost::property_tree::ptree& data) const;
173 
174  InlineQueryResultCachedVoice::Ptr parseJsonAndGetInlineQueryResultCachedVoice(const boost::property_tree::ptree& data) const;
176 
177  InlineQueryResultArticle::Ptr parseJsonAndGetInlineQueryResultArticle(const boost::property_tree::ptree& data) const;
178  std::string parseInlineQueryResultArticle(const InlineQueryResultArticle::Ptr& object) const;
179 
180  InlineQueryResultAudio::Ptr parseJsonAndGetInlineQueryResultAudio(const boost::property_tree::ptree& data) const;
181  std::string parseInlineQueryResultAudio(const InlineQueryResultAudio::Ptr& object) const;
182 
183  InlineQueryResultContact::Ptr parseJsonAndGetInlineQueryResultContact(const boost::property_tree::ptree& data) const;
184  std::string parseInlineQueryResultContact(const InlineQueryResultContact::Ptr& object) const;
185 
186  InlineQueryResultGame::Ptr parseJsonAndGetInlineQueryResultGame(const boost::property_tree::ptree& data) const;
187  std::string parseInlineQueryResultGame(const InlineQueryResultGame::Ptr& object) const;
188 
189  InlineQueryResultDocument::Ptr parseJsonAndGetInlineQueryResultDocument(const boost::property_tree::ptree& data) const;
190  std::string parseInlineQueryResultDocument(const InlineQueryResultDocument::Ptr& object) const;
191 
192  InlineQueryResultLocation::Ptr parseJsonAndGetInlineQueryResultLocation(const boost::property_tree::ptree& data) const;
193  std::string parseInlineQueryResultLocation(const InlineQueryResultLocation::Ptr& object) const;
194 
195  InlineQueryResultVenue::Ptr parseJsonAndGetInlineQueryResultVenue(const boost::property_tree::ptree& data) const;
196  std::string parseInlineQueryResultVenue(const InlineQueryResultVenue::Ptr& object) const;
197 
198  InlineQueryResultVoice::Ptr parseJsonAndGetInlineQueryResultVoice(const boost::property_tree::ptree& data) const;
199  std::string parseInlineQueryResultVoice(const InlineQueryResultVoice::Ptr& object) const;
200 
201  InlineQueryResultPhoto::Ptr parseJsonAndGetInlineQueryResultPhoto(const boost::property_tree::ptree& data) const;
202  std::string parseInlineQueryResultPhoto(const InlineQueryResultPhoto::Ptr& object) const;
203  InlineQueryResultGif::Ptr parseJsonAndGetInlineQueryResultGif(const boost::property_tree::ptree& data) const;
204  std::string parseInlineQueryResultGif(const InlineQueryResultGif::Ptr& object) const;
205  InlineQueryResultMpeg4Gif::Ptr parseJsonAndGetInlineQueryResultMpeg4Gif(const boost::property_tree::ptree& data) const;
206  std::string parseInlineQueryResultMpeg4Gif(const InlineQueryResultMpeg4Gif::Ptr& object) const;
207  InlineQueryResultVideo::Ptr parseJsonAndGetInlineQueryResultVideo(const boost::property_tree::ptree& data) const;
208  std::string parseInlineQueryResultVideo(const InlineQueryResultVideo::Ptr& object) const;
209  ChosenInlineResult::Ptr parseJsonAndGetChosenInlineResult(const boost::property_tree::ptree& data) const;
210  std::string parseChosenInlineResult(const ChosenInlineResult::Ptr& object) const;
211 
212  CallbackQuery::Ptr parseJsonAndGetCallbackQuery(const boost::property_tree::ptree& data) const;
213  std::string parseCallbackQuery(const CallbackQuery::Ptr& object) const;
214  InlineKeyboardMarkup::Ptr parseJsonAndGetInlineKeyboardMarkup(const boost::property_tree::ptree& data) const;
215  std::string parseInlineKeyboardMarkup(const InlineKeyboardMarkup::Ptr& object) const;
216  InlineKeyboardButton::Ptr parseJsonAndGetInlineKeyboardButton(const boost::property_tree::ptree& data) const;
217  std::string parseInlineKeyboardButton(const InlineKeyboardButton::Ptr& object) const;
218 
219  WebhookInfo::Ptr parseJsonAndGetWebhookInfo(const boost::property_tree::ptree& data) const;
220  std::string parseWebhookInfo(const WebhookInfo::Ptr& object) const;
221 
222  InputMessageContent::Ptr parseJsonAndGetInputMessageContent(const boost::property_tree::ptree& data) const;
223  std::string parseInputMessageContent(const InputMessageContent::Ptr& object) const;
224 
225  InputTextMessageContent::Ptr parseJsonAndGetInputTextMessageContent(const boost::property_tree::ptree& data) const;
226  std::string parseInputTextMessageContent(const InputTextMessageContent::Ptr& object) const;
227 
228  InputLocationMessageContent::Ptr parseJsonAndGetInputLocationMessageContent(const boost::property_tree::ptree& data) const;
230 
231  InputVenueMessageContent::Ptr parseJsonAndGetInputVenueMessageContent(const boost::property_tree::ptree& data) const;
232  std::string parseInputVenueMessageContent(const InputVenueMessageContent::Ptr& object) const;
233 
234  InputContactMessageContent::Ptr parseJsonAndGetInputContactMessageContent(const boost::property_tree::ptree& data) const;
235  std::string parseInputContactMessageContent(const InputContactMessageContent::Ptr& object) const;
236 
237  inline boost::property_tree::ptree parseJson(const std::string& json) const {
238  boost::property_tree::ptree tree;
239  std::istringstream input(json);
240  boost::property_tree::read_json(input, tree);
241  return tree;
242  }
243 
244  template<typename T>
245  std::shared_ptr<T> tryParseJson(JsonToTgTypeFunc<T> parseFunc, const boost::property_tree::ptree& data, const std::string& keyName) const {
246  auto treeItem = data.find(keyName);
247  if (treeItem == data.not_found()) {
248  return std::shared_ptr<T>();
249  }
250  return (this->*parseFunc)(treeItem->second);
251  }
252 
253  template<typename T>
254  std::vector<std::shared_ptr<T>> parseJsonAndGetArray(JsonToTgTypeFunc<T> parseFunc, const boost::property_tree::ptree& data) const {
255  std::vector<std::shared_ptr<T>> result;
256  for (const std::pair<const std::string, boost::property_tree::ptree>& innerTreeItem : data) {
257  result.push_back((this->*parseFunc)(innerTreeItem.second));
258  }
259  return result;
260  }
261 
262  template<typename T>
263  std::vector<T> parseJsonAndGetArray(std::function<T(const boost::property_tree::ptree&)> parseFunc, const boost::property_tree::ptree& data, const std::string& keyName) const {
264  std::vector<T> result;
265  auto treeItem = data.find(keyName);
266  if (treeItem == data.not_found()) {
267  return result;
268  }
269  for (const std::pair<const std::string, boost::property_tree::ptree>& innerTreeItem : treeItem->second) {
270  result.push_back(parseFunc(innerTreeItem.second));
271  }
272  return result;
273  }
274 
275  template<typename T>
276  std::vector<std::shared_ptr<T>> parseJsonAndGetArray(JsonToTgTypeFunc<T> parseFunc, const boost::property_tree::ptree& data, const std::string& keyName) const {
277  std::vector<std::shared_ptr<T>> result;
278  auto treeItem = data.find(keyName);
279  if (treeItem == data.not_found()) {
280  return result;
281  }
282  for (const std::pair<const std::string, boost::property_tree::ptree>& innerTreeItem : treeItem->second) {
283  result.push_back((this->*parseFunc)(innerTreeItem.second));
284  }
285  return result;
286  }
287 
288  template<typename T>
289  std::vector<std::vector<std::shared_ptr<T>>> parseJsonAndGet2DArray(JsonToTgTypeFunc<T> parseFunc, const boost::property_tree::ptree& data, const std::string& keyName) const {
290  std::vector<std::vector<std::shared_ptr<T>>> result;
291  auto treeItem = data.find(keyName);
292  if (treeItem == data.not_found()) {
293  return result;
294  }
295  for (const std::pair<const std::string, boost::property_tree::ptree>& innerTreeItem : treeItem->second) {
296  std::vector<std::shared_ptr<T>> innerResult;
297  for (const std::pair<const std::string, boost::property_tree::ptree>& innerInnerTreeItem : innerTreeItem.second) {
298  innerResult.push_back((this->*parseFunc)(innerInnerTreeItem.second));
299  }
300  result.push_back(innerResult);
301  }
302  return result;
303  }
304 
305  template<typename T>
306  std::string parseArray(TgTypeToJsonFunc<T> parseFunc, const std::vector<std::shared_ptr<T>>& objects) const {
307  if (objects.empty())
308  return "";
309  std::string result;
310  result += '[';
311  for (const std::shared_ptr<T>& item : objects) {
312  result += (this->*parseFunc)(item);
313  result += ',';
314  }
315  result.erase(result.length() - 1);
316  result += ']';
317  return result;
318  }
319 
320  template<typename T>
321  std::string parseArray(std::function<T(const T&)> parseFunc, const std::vector<T>& objects) const {
322  if (objects.empty())
323  return "";
324  std::string result;
325  result += '[';
326  for (const T& item : objects) {
327  result += parseFunc(item);
328  result += ',';
329  }
330  result.erase(result.length() - 1);
331  result += ']';
332  return result;
333  }
334 
335  template<typename T>
336  std::string parse2DArray(TgTypeToJsonFunc<T> parseFunc, const std::vector<std::vector<std::shared_ptr<T>>>& objects) const {
337  if (objects.empty())
338  return "";
339  std::string result;
340  result += '[';
341  for (const std::vector<std::shared_ptr<T>>& item : objects) {
342  result += parseArray(parseFunc, item);
343  result += ',';
344  }
345  result.erase(result.length() - 1);
346  result += ']';
347  return result;
348  }
349 
350 private:
351  template<typename T>
352  void appendToJson(std::string& json, const std::string& varName, const T& value) const {
353  if (value == 0) {
354  return;
355  }
356  json += '"';
357  json += varName;
358  json += "\":";
359  json += value;
360  json += ',';
361  }
362 
363  void appendToJson(std::string& json, const std::string& varName, const bool& value) const {
364  if (value == 0) {
365  return;
366  }
367  json += '"';
368  json += varName;
369  json += "\":";
370  json += (value ? "true" : "false");
371  json += ',';
372  }
373 
374  void appendToJson(std::string& json, const std::string& varName, const std::string& value) const;
375 };
376 
377 }
378 
379 #endif //TGBOT_CPP_TGTYPEPARSER_H
std::string parseArray(std::function< T(const T &)> parseFunc, const std::vector< T > &objects) const
Definition: TgTypeParser.h:321
+
std::shared_ptr< MessageEntity > Ptr
Definition: MessageEntity.h:20
+
std::shared_ptr< T > tryParseJson(JsonToTgTypeFunc< T > parseFunc, const boost::property_tree::ptree &data, const std::string &keyName) const
Definition: TgTypeParser.h:245
+ +
std::string parseInlineQueryResultCachedMpeg4Gif(const InlineQueryResultCachedMpeg4Gif::Ptr &object) const
+
std::string parseKeyboardButton(const KeyboardButton::Ptr &object) const
+
ForceReply::Ptr parseJsonAndGetForceReply(const boost::property_tree::ptree &data) const
+
std::shared_ptr< InlineQueryResultAudio > Ptr
+
Video::Ptr parseJsonAndGetVideo(const boost::property_tree::ptree &data) const
+
std::vector< std::shared_ptr< T > > parseJsonAndGetArray(JsonToTgTypeFunc< T > parseFunc, const boost::property_tree::ptree &data, const std::string &keyName) const
Definition: TgTypeParser.h:276
+
File::Ptr parseJsonAndGetFile(const boost::property_tree::ptree &data) const
+
InlineQueryResultArticle::Ptr parseJsonAndGetInlineQueryResultArticle(const boost::property_tree::ptree &data) const
+ +
std::shared_ptr< T >(TgTypeParser::*)(const boost::property_tree::ptree &) const JsonToTgTypeFunc
Definition: TgTypeParser.h:90
+
std::shared_ptr< File > Ptr
Definition: File.h:24
+
std::shared_ptr< InlineKeyboardButton > Ptr
+
InputTextMessageContent::Ptr parseJsonAndGetInputTextMessageContent(const boost::property_tree::ptree &data) const
+ + +
std::shared_ptr< Sticker > Ptr
Definition: Sticker.h:40
+
CallbackQuery::Ptr parseJsonAndGetCallbackQuery(const boost::property_tree::ptree &data) const
+
InlineQueryResultGame::Ptr parseJsonAndGetInlineQueryResultGame(const boost::property_tree::ptree &data) const
+
std::shared_ptr< InlineQueryResultVenue > Ptr
+
Audio::Ptr parseJsonAndGetAudio(const boost::property_tree::ptree &data) const
+ + +
static TgTypeParser & getInstance()
+
std::shared_ptr< InputLocationMessageContent > Ptr
+
std::shared_ptr< Audio > Ptr
Definition: Audio.h:38
+
std::string parseArray(TgTypeToJsonFunc< T > parseFunc, const std::vector< std::shared_ptr< T >> &objects) const
Definition: TgTypeParser.h:306
+
std::shared_ptr< InputMessageContent > Ptr
+
InlineQueryResultVenue::Ptr parseJsonAndGetInlineQueryResultVenue(const boost::property_tree::ptree &data) const
+
InlineQueryResultContact::Ptr parseJsonAndGetInlineQueryResultContact(const boost::property_tree::ptree &data) const
+
std::shared_ptr< InlineQueryResultArticle > Ptr
+
std::string parseDocument(const Document::Ptr &object) const
+
std::string parseAudio(const Audio::Ptr &object) const
+ +
std::shared_ptr< CallbackQuery > Ptr
Definition: CallbackQuery.h:22
+
std::string parse2DArray(TgTypeToJsonFunc< T > parseFunc, const std::vector< std::vector< std::shared_ptr< T >>> &objects) const
Definition: TgTypeParser.h:336
+
std::shared_ptr< InputTextMessageContent > Ptr
+ +
InlineKeyboardMarkup::Ptr parseJsonAndGetInlineKeyboardMarkup(const boost::property_tree::ptree &data) const
+
std::string parseForceReply(const ForceReply::Ptr &object) const
+ + +
std::shared_ptr< InlineQueryResultGif > Ptr
+
std::shared_ptr< InlineQueryResultCachedVideo > Ptr
+ + +
std::shared_ptr< InlineQueryResultContact > Ptr
+
InlineQueryResultDocument::Ptr parseJsonAndGetInlineQueryResultDocument(const boost::property_tree::ptree &data) const
+
InlineQueryResultCachedSticker::Ptr parseJsonAndGetInlineQueryResultCachedSticker(const boost::property_tree::ptree &data) const
+
InputLocationMessageContent::Ptr parseJsonAndGetInputLocationMessageContent(const boost::property_tree::ptree &data) const
+
std::string parseInlineQueryResultCachedAudio(const InlineQueryResultCachedAudio::Ptr &object) const
+
std::string parseVideo(const Video::Ptr &object) const
+
std::string parseInlineQueryResultArticle(const InlineQueryResultArticle::Ptr &object) const
+
InputContactMessageContent::Ptr parseJsonAndGetInputContactMessageContent(const boost::property_tree::ptree &data) const
+
std::shared_ptr< Update > Ptr
Definition: Update.h:42
+
Definition: Api.h:44
+
std::shared_ptr< InlineQueryResultMpeg4Gif > Ptr
+
std::string parseUpdate(const Update::Ptr &object) const
+ +
std::string parseInlineQueryResultCachedGif(const InlineQueryResultCachedGif::Ptr &object) const
+ + +
std::string parseInlineQueryResultVenue(const InlineQueryResultVenue::Ptr &object) const
+ +
Chat::Ptr parseJsonAndGetChat(const boost::property_tree::ptree &data) const
+ +
std::string parseWebhookInfo(const WebhookInfo::Ptr &object) const
+
std::string parseSticker(const Sticker::Ptr &object) const
+
InputMessageContent::Ptr parseJsonAndGetInputMessageContent(const boost::property_tree::ptree &data) const
+
User::Ptr parseJsonAndGetUser(const boost::property_tree::ptree &data) const
+
std::shared_ptr< InlineKeyboardMarkup > Ptr
+
std::string parseInlineQueryResultCachedVideo(const InlineQueryResultCachedVideo::Ptr &object) const
+ + +
std::shared_ptr< KeyboardButton > Ptr
+ +
std::shared_ptr< Message > Ptr
Definition: Message.h:52
+
std::string parseInlineQueryResultVideo(const InlineQueryResultVideo::Ptr &object) const
+
std::shared_ptr< InlineQueryResultCachedSticker > Ptr
+
InlineQueryResultVoice::Ptr parseJsonAndGetInlineQueryResultVoice(const boost::property_tree::ptree &data) const
+
std::vector< std::vector< std::shared_ptr< T > > > parseJsonAndGet2DArray(JsonToTgTypeFunc< T > parseFunc, const boost::property_tree::ptree &data, const std::string &keyName) const
Definition: TgTypeParser.h:289
+
std::string parseInputMessageContent(const InputMessageContent::Ptr &object) const
+ +
InlineQueryResultCachedVoice::Ptr parseJsonAndGetInlineQueryResultCachedVoice(const boost::property_tree::ptree &data) const
+
std::shared_ptr< Location > Ptr
Definition: Location.h:37
+
std::string parseInlineKeyboardMarkup(const InlineKeyboardMarkup::Ptr &object) const
+ + +
std::string parseReplyKeyboardRemove(const ReplyKeyboardRemove::Ptr &object) const
+
std::string parseInputLocationMessageContent(const InputLocationMessageContent::Ptr &object) const
+
InputVenueMessageContent::Ptr parseJsonAndGetInputVenueMessageContent(const boost::property_tree::ptree &data) const
+
WebhookInfo::Ptr parseJsonAndGetWebhookInfo(const boost::property_tree::ptree &data) const
+
ReplyKeyboardMarkup::Ptr parseJsonAndGetReplyKeyboardMarkup(const boost::property_tree::ptree &data) const
+
std::string parseInlineQueryResultVoice(const InlineQueryResultVoice::Ptr &object) const
+ +
std::shared_ptr< ChosenInlineResult > Ptr
+
std::shared_ptr< InlineQueryResultVideo > Ptr
+
std::string parseInlineQueryResultContact(const InlineQueryResultContact::Ptr &object) const
+
std::string parseFile(const File::Ptr &object) const
+
std::shared_ptr< InlineQueryResultVoice > Ptr
+ +
std::shared_ptr< InlineQueryResult > Ptr
+
std::shared_ptr< InlineQueryResultCachedDocument > Ptr
+
MessageEntity::Ptr parseJsonAndGetEntity(const boost::property_tree::ptree &data) const
+
std::string parseInlineQueryResultMpeg4Gif(const InlineQueryResultMpeg4Gif::Ptr &object) const
+ +
InlineQueryResultAudio::Ptr parseJsonAndGetInlineQueryResultAudio(const boost::property_tree::ptree &data) const
+
std::shared_ptr< InlineQueryResultLocation > Ptr
+
std::shared_ptr< UserProfilePhotos > Ptr
+
std::shared_ptr< InlineQueryResultDocument > Ptr
+
Message::Ptr parseJsonAndGetMessage(const boost::property_tree::ptree &data) const
+
std::shared_ptr< WebhookInfo > Ptr
Definition: WebhookInfo.h:20
+
std::shared_ptr< InputContactMessageContent > Ptr
+
GenericReply::Ptr parseJsonAndGetGenericReply(const boost::property_tree::ptree &data) const
+ + +
std::string parseInlineQueryResultPhoto(const InlineQueryResultPhoto::Ptr &object) const
+
std::shared_ptr< ReplyKeyboardRemove > Ptr
+
std::shared_ptr< InlineQueryResultCachedMpeg4Gif > Ptr
+
std::string parseChat(const Chat::Ptr &object) const
+
std::string parseInlineQueryResult(const InlineQueryResult::Ptr &object) const
+
std::shared_ptr< GenericReply > Ptr
Definition: GenericReply.h:37
+
std::string parseChosenInlineResult(const ChosenInlineResult::Ptr &object) const
+ +
std::string parseInputVenueMessageContent(const InputVenueMessageContent::Ptr &object) const
+
std::shared_ptr< InlineQueryResultGame > Ptr
+
std::string parseChatMember(const ChatMember::Ptr &object) const
+
InlineQueryResultCachedMpeg4Gif::Ptr parseJsonAndGetInlineQueryResultCachedMpeg4Gif(const boost::property_tree::ptree &data) const
+
std::shared_ptr< ResponseParameters > Ptr
+ + +
std::string parseInlineQueryResultCachedDocument(const InlineQueryResultCachedDocument::Ptr &object) const
+
std::vector< std::shared_ptr< T > > parseJsonAndGetArray(JsonToTgTypeFunc< T > parseFunc, const boost::property_tree::ptree &data) const
Definition: TgTypeParser.h:254
+
std::string parseLocation(const Location::Ptr &object) const
+
ResponseParameters::Ptr parseJsonAndGetResponseParameters(const boost::property_tree::ptree &data) const
+
std::string parseInlineQueryResultCachedSticker(const InlineQueryResultCachedSticker::Ptr &object) const
+
InlineQueryResultVideo::Ptr parseJsonAndGetInlineQueryResultVideo(const boost::property_tree::ptree &data) const
+
std::shared_ptr< Document > Ptr
Definition: Document.h:40
+
std::shared_ptr< Chat > Ptr
Definition: Chat.h:38
+
std::string parseReplyKeyboardMarkup(const ReplyKeyboardMarkup::Ptr &object) const
+
ChosenInlineResult::Ptr parseJsonAndGetChosenInlineResult(const boost::property_tree::ptree &data) const
+
KeyboardButton::Ptr parseJsonAndGetKeyboardButton(const boost::property_tree::ptree &data) const
+
std::string parseUserProfilePhotos(const UserProfilePhotos::Ptr &object) const
+
InlineQueryResultCachedDocument::Ptr parseJsonAndGetInlineQueryResultCachedDocument(const boost::property_tree::ptree &data) const
+
Document::Ptr parseJsonAndGetDocument(const boost::property_tree::ptree &data) const
+
std::shared_ptr< PhotoSize > Ptr
Definition: PhotoSize.h:38
+
std::string parseMessage(const Message::Ptr &object) const
+ +
std::string parseInlineKeyboardButton(const InlineKeyboardButton::Ptr &object) const
+
+
UserProfilePhotos::Ptr parseJsonAndGetUserProfilePhotos(const boost::property_tree::ptree &data) const
+ +
std::shared_ptr< ReplyKeyboardMarkup > Ptr
+
std::string parseResponseParameters(const ResponseParameters::Ptr &object) const
+
std::string parsePhotoSize(const PhotoSize::Ptr &object) const
+ +
std::vector< T > parseJsonAndGetArray(std::function< T(const boost::property_tree::ptree &)> parseFunc, const boost::property_tree::ptree &data, const std::string &keyName) const
Definition: TgTypeParser.h:263
+
PhotoSize::Ptr parseJsonAndGetPhotoSize(const boost::property_tree::ptree &data) const
+ + +
std::string(TgTypeParser::*)(const std::shared_ptr< T > &) const TgTypeToJsonFunc
Definition: TgTypeParser.h:93
+
std::string parseInlineQueryResultAudio(const InlineQueryResultAudio::Ptr &object) const
+
std::shared_ptr< Video > Ptr
Definition: Video.h:40
+
Sticker::Ptr parseJsonAndGetSticker(const boost::property_tree::ptree &data) const
+
std::string parseInlineQueryResultLocation(const InlineQueryResultLocation::Ptr &object) const
+
std::shared_ptr< Contact > Ptr
Definition: Contact.h:38
+
std::string parseGenericReply(const GenericReply::Ptr &object) const
+ +
Update::Ptr parseJsonAndGetUpdate(const boost::property_tree::ptree &data) const
+
InlineKeyboardButton::Ptr parseJsonAndGetInlineKeyboardButton(const boost::property_tree::ptree &data) const
+ +
InlineQueryResultCachedGif::Ptr parseJsonAndGetInlineQueryResultCachedGif(const boost::property_tree::ptree &data) const
+
std::string parseInputTextMessageContent(const InputTextMessageContent::Ptr &object) const
+
std::string parseInlineQueryResultGame(const InlineQueryResultGame::Ptr &object) const
+
InlineQuery::Ptr parseJsonAndGetInlineQuery(const boost::property_tree::ptree &data) const
+
std::string parseInlineQueryResultGif(const InlineQueryResultGif::Ptr &object) const
+
InlineQueryResultPhoto::Ptr parseJsonAndGetInlineQueryResultPhoto(const boost::property_tree::ptree &data) const
+
std::shared_ptr< InlineQueryResultCachedVoice > Ptr
+ +
std::shared_ptr< InlineQueryResultCachedPhoto > Ptr
+ +
ChatMember::Ptr parseJsonAndGetChatMember(const boost::property_tree::ptree &data) const
+ +
std::shared_ptr< InlineQueryResultPhoto > Ptr
+ +
InlineQueryResult::Ptr parseJsonAndGetInlineQueryResult(const boost::property_tree::ptree &data) const
+
InlineQueryResultLocation::Ptr parseJsonAndGetInlineQueryResultLocation(const boost::property_tree::ptree &data) const
+
InlineQueryResultCachedPhoto::Ptr parseJsonAndGetInlineQueryResultCachedPhoto(const boost::property_tree::ptree &data) const
+ +
std::string parseInlineQueryResultDocument(const InlineQueryResultDocument::Ptr &object) const
+ + + +
std::string parseUser(const User::Ptr &object) const
+
std::string parseCallbackQuery(const CallbackQuery::Ptr &object) const
+
InlineQueryResultCachedVideo::Ptr parseJsonAndGetInlineQueryResultCachedVideo(const boost::property_tree::ptree &data) const
+ +
std::shared_ptr< ChatMember > Ptr
Definition: ChatMember.h:21
+ +
std::shared_ptr< InlineQuery > Ptr
Definition: InlineQuery.h:22
+
std::shared_ptr< ForceReply > Ptr
Definition: ForceReply.h:43
+
std::string parseInlineQueryResultCachedPhoto(const InlineQueryResultCachedPhoto::Ptr &object) const
+
ReplyKeyboardRemove::Ptr parseJsonAndGetReplyKeyboardRemove(const boost::property_tree::ptree &data) const
+
InlineQueryResultGif::Ptr parseJsonAndGetInlineQueryResultGif(const boost::property_tree::ptree &data) const
+
std::string parseInlineQuery(const InlineQuery::Ptr &object) const
+
std::string parseInlineQueryResultCachedVoice(const InlineQueryResultCachedVoice::Ptr &object) const
+ +
std::string parseContact(const Contact::Ptr &object) const
+
InlineQueryResultMpeg4Gif::Ptr parseJsonAndGetInlineQueryResultMpeg4Gif(const boost::property_tree::ptree &data) const
+
InlineQueryResultCachedAudio::Ptr parseJsonAndGetInlineQueryResultCachedAudio(const boost::property_tree::ptree &data) const
+
Contact::Ptr parseJsonAndGetContact(const boost::property_tree::ptree &data) const
+
std::string parseInputContactMessageContent(const InputContactMessageContent::Ptr &object) const
+
Location::Ptr parseJsonAndGetLocation(const boost::property_tree::ptree &data) const
+ +
std::shared_ptr< InlineQueryResultCachedGif > Ptr
+ +
std::shared_ptr< InputVenueMessageContent > Ptr
+
std::shared_ptr< InlineQueryResultCachedAudio > Ptr
+
boost::property_tree::ptree parseJson(const std::string &json) const
Definition: TgTypeParser.h:237
+
std::shared_ptr< User > Ptr
Definition: User.h:38
+ +
+
+ + + + -- cgit v1.2.3