Difference between revisions of "Libzim"

Jump to navigation Jump to search
Line 94: Line 94:
</source>
</source>


=== Methods ===
== using the Search-class ==
==== Article  File::getArticle(char ns, const QUnicodeString& title, bool collate = false) ====
returns an object of an article


==== std::string Article::getPage(bool layout = true, unsigned maxRecurse = 10) ====
The class ''zim::Search'' adds 2 search features to zimlib. Both fill a result object of type zim::Search::Results. This result object is actually a ''std::vector'' of a ''zim::SearchResult''. The ''zim::SearchResult'' holds a article and a priority. Since copying large result sets is quite expensive, all search methods of this expects a reference to a existing ''zim::Search::Results'', which is filled.
returns the content of an article
 
The simpler searches articles by title either by a praefix or by a range of titles. You pass a namespace and either a single ''std::string'' and you get all articles, whose title starts with that string or you pass two strings and you get all articles whose title is between these strings (including the passed strings).