Gromacs
2026.0-dev-20241106-9ba7f4d
|
#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 | |
const char * | name () const override=0 |
Returns the name of the topic. More... | |
const char * | title () const override=0 |
Returns a title for the topic. More... | |
bool | hasSubTopics () const override |
Returns whether the topic has any subtopics. | |
const IHelpTopic * | findSubTopic (const char *name) const override |
Finds a subtopic by name. More... | |
void | writeHelp (const HelpWriterContext &context) const override |
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... | |
|
overridevirtual |
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 >.
|
overridepure 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 >.
|
overridepure 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 >.
|
overridevirtual |
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.