28#include "../io/filesystem.hpp"
29#include "../ui/error.hpp"
55 std::vector<std::string>
getHelpArticle(
const std::string& sTopic);
60 static std::string
getArgAtPos(
const std::string& sCmd,
unsigned int pos);
This class handles the documentation index and provides lookup functionalities to obtain the correspo...
~Documentation()
The destructor closes the internal file stream, if it is still open.
void addFileToDocumentationIndex(const std::string &sFileName)
This member function is used to add documentation index entries to the index during a plugin or packa...
std::string getHelpArticleID(const std::string &sTopic)
This member function returns the article ID corresponding to the queried topic.
std::vector< DocumentationEntry > vDocIndexTable
std::string getHelpIdxKey(const std::string &sTopic)
This member function returns an index key, which corresponds to the queried topic.
void removeFromDocIndex(const std::string &_sID)
This member function removes the index entry passed to the function from the documentation index.
std::vector< std::string > getHelpArticle(const std::string &sTopic)
This member function returns the documentation article, which corresponds to the passed documentation...
void createDocumentationIndex(bool bLoadUserLangFiles=true)
This member function loads the index files to memory.
void addEntry(const DocumentationEntry &entry, const std::vector< std::string > &keyWords)
Add a new entry to the documentation index respecting already existing versions of the new entry....
std::vector< std::string > getDocIndex() const
This member function returns the key list for the documentation index prepared for the corresponding ...
int findPositionUsingIdxKeys(const std::string &sIdxKeys) const
Finds the best match of a documentation entry using a list of index keys. If multiple matches have be...
std::string getHelpArticleTitle(const std::string &_sIdxKey)
This member function returns the documentation article title corresponding to the queried index key.
Documentation()
The default constructor.
static std::string getArgAtPos(const std::string &sCmd, unsigned int pos)
This static member is a fallback for the XML-parsing logic-stuff.
std::map< std::string, int > mDocumentationIndex
int findPositionInDocumentationIndex(const std::string &sTopic) const
This private member function returns the position of the queried topic in the documentation index tab...
This class implements the basic input/ output file system and provides functionalities to work with f...
This structure defines a single entry in the documentation index.