Gromacs  2026.0-dev-20241204-d69d709
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::IHelpTopic Class Referenceabstract

#include <gromacs/onlinehelp/ihelptopic.h>

+ Inheritance diagram for gmx::IHelpTopic:

Description

Provides a single online help topic.

Implementations of these methods should not throw, except that writeHelp() is allowed to throw on out-of-memory or I/O errors since those it cannot avoid.

Header helptopic.h contains classes that implement this interface and make it simple to write concrete help topic classes.

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 =0
 Returns whether the topic has any subtopics.
 
virtual const IHelpTopicfindSubTopic (const char *name) const =0
 Finds a subtopic by name. More...
 
virtual void writeHelp (const HelpWriterContext &context) const =0
 Prints the help text for this topic. More...
 

Member Function Documentation

virtual const IHelpTopic* gmx::IHelpTopic::findSubTopic ( const char *  name) const
pure virtual

Finds a subtopic by name.

Parameters
[in]nameName of subtopic to find.
Returns
Pointer to the found subtopic, or NULL if matching topic is not found.

Implemented in gmx::AbstractCompositeHelpTopic, and gmx::AbstractSimpleHelpTopic.

virtual const char* gmx::IHelpTopic::name ( ) const
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.

Implemented in gmx::CompositeHelpTopic< HelpText >, gmx::SimpleHelpTopic< HelpText >, gmx::AbstractCompositeHelpTopic, and gmx::AbstractSimpleHelpTopic.

virtual const char* gmx::IHelpTopic::title ( ) const
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.

Implemented in gmx::CompositeHelpTopic< HelpText >, gmx::SimpleHelpTopic< HelpText >, gmx::AbstractCompositeHelpTopic, and gmx::AbstractSimpleHelpTopic.

virtual void gmx::IHelpTopic::writeHelp ( const HelpWriterContext context) const
pure virtual

Prints the help text for this topic.

Parameters
[in]contextContext object for writing the help.
Exceptions
std::bad_allocif out of memory.
FileIOErroron any I/O error.

Implemented in gmx::AbstractCompositeHelpTopic, and gmx::AbstractSimpleHelpTopic.


The documentation for this class was generated from the following file: