Gromacs
2018.8
|
#include <gromacs/onlinehelp/helptopic.h>
Abstract base class for help topics that have simple text and no subtopics.
This class implements subtopic-related methods from IHelpTopic such that there are no subtopics. writeHelp() is also implemented such that it uses HelpTopicContext::writeTextBlock() to write out the text returned by a new virtual method helpText().
Public Member Functions | |
virtual const char * | name () const =0 |
Returns the name of the topic. More... | |
virtual const char * | title () const =0 |
Returns a title for the topic. More... | |
virtual bool | hasSubTopics () const |
Returns whether the topic has any subtopics. | |
virtual const IHelpTopic * | findSubTopic (const char *name) const |
Finds a subtopic by name. More... | |
virtual void | writeHelp (const HelpWriterContext &context) const |
Prints the help text for this topic. More... | |
Protected Member Functions | |
virtual std::string | helpText () const =0 |
Returns the help text for this topic. More... | |
|
virtual |
Finds a subtopic by name.
[in] | name | Name of subtopic to find. |
Implements gmx::IHelpTopic.
|
protectedpure virtual |
Returns the help text for this topic.
writeHelp() calls this method to obtain the actual text to format for the topic. Markup substitution etc. is done automatically by writeHelp().
Implemented in gmx::anonymous_namespace{selhelp.cpp}::KeywordDetailsHelpTopic, and gmx::SimpleHelpTopic< HelpText >.
|
pure virtual |
Returns the name of the topic.
This should be a single lowercase word, used to identify the topic. It is not used for the root of the help topic tree.
Implements gmx::IHelpTopic.
Implemented in gmx::anonymous_namespace{selhelp.cpp}::KeywordDetailsHelpTopic, and gmx::SimpleHelpTopic< HelpText >.
|
pure virtual |
Returns a title for the topic.
May return NULL, in which case the topic is omitted from normal subtopic lists and no title is printed by the methods provided in helptopic.h.
Implements gmx::IHelpTopic.
Implemented in gmx::anonymous_namespace{selhelp.cpp}::KeywordDetailsHelpTopic, and gmx::SimpleHelpTopic< HelpText >.
|
virtual |
Prints the help text for this topic.
[in] | context | Context object for writing the help. |
std::bad_alloc | if out of memory. |
FileIOError | on any I/O error. |
Implements gmx::IHelpTopic.