Forbid copy c'tor and assignment in ArticleCollection
[dueringa_WikiWalker.git] / src / JsonToArticleConverter.h
blob7e83b7019924a7ea4d5ff68d401d5bb43cc3d8bd
1 #ifndef _JSONTOARTICLECONVERTER_H
2 #define _JSONTOARTICLECONVERTER_H
4 #include "Article.h"
5 #include "ArticleCollection.h"
7 //! convert links in json form to article
8 class JsonToArticleConverter
10 public:
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
28 return moreData;
31 /*! Get the continuation data, if #hasMoreData is true
32 * \return continution string
34 std::string getContinuationData() const
36 return continueString;
39 private:
40 //! more data available
41 bool moreData;
42 //! string required for API operation
43 std::string continueString;
46 #endif /* _JSONTOARTICLECONVERTER_H */