1 #ifndef _JSONTOARTICLECONVERTER_H
2 #define _JSONTOARTICLECONVERTER_H
5 #include "ArticleCollection.h"
7 //! convert links in json form to article
8 class JsonToArticleConverter
11 //! create a new instance
12 JsonToArticleConverter()
13 : moreData(false), continueString("") {}
15 /*! convert JSON data to Article
16 * convert string containing json data, which represents the links, to an article.
17 * \param json json data
18 * \param articleCache reference to global (ew) article collection
19 * \returns pointer to generated article. YOU free it!
21 Article
* convertToArticle(std::string json
, ArticleCollection
& articleCache
);
23 /*!Returns whether there's more data to fetch.
24 * JSON data says there's more links to fetch
26 bool hasMoreData() const
31 /*! Get the continuation data, if #hasMoreData is true
32 * \return continution string
34 std::string
getContinuationData() const
36 return continueString
;
40 //! more data available
42 //! string required for API operation
43 std::string continueString
;
46 #endif /* _JSONTOARTICLECONVERTER_H */