Add a method to get the value of a specific tag.

Fix #258
This commit is contained in:
Matthieu Gautier
2019-09-16 10:48:36 +02:00
parent 2a6772b76d
commit 6ee174b546
3 changed files with 97 additions and 0 deletions

View File

@ -235,6 +235,27 @@ class Reader
*/
string getTags(bool original=false) const;
/**
* Get the value (as a string) of a specific tag.
*
* According to https://wiki.openzim.org/wiki/Tags
*
* @return The value of the specified tag.
* @throw std::out_of_range if the specified tag is not found.
*/
string getTagStr(const std::string& tagName) const;
/**
* Get the boolean value of a specific tag.
*
* According to https://wiki.openzim.org/wiki/Tags
*
* @return The boolean value of the specified tag.
* @throw std::out_of_range if the specified tag is not found.
* std::domain_error if the value of the tag cannot be convert to bool.
*/
bool getTagBool(const std::string& tagName) const;
/**
* Get the relations of the zim file.
*