Gromacs  2024.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Friends
gmx::HelpLinks Class Reference

#include <gromacs/onlinehelp/helpwritercontext.h>

Description

Hyperlink data for writing out help.

This class is separate from HelpWriterContext to allow constructing the list of links once and reusing them across multiple help writer contexts. This is used when exporting all the help from the wrapper binary to avoid repeatedly constructing the same data structure for each help item.

While the links are in principle independent of the output format, the constructor takes the output format to be able to preformat the links, avoiding repeated processing during markup substitution. Could be hidden behind the scenes in HelpWriterContext, but that would complicate the implementation.

Classes

class  Impl
 Private implementation class for HelpLinks. More...
 

Public Member Functions

 HelpLinks (HelpOutputFormat format)
 Initializes an empty links collection for the given output format.
 
void addLink (const std::string &linkName, const std::string &targetName, const std::string &displayName)
 Adds a link. More...
 

Friends

class HelpWriterContext
 Allows the context to use the links.
 

Member Function Documentation

void gmx::HelpLinks::addLink ( const std::string &  linkName,
const std::string &  targetName,
const std::string &  displayName 
)

Adds a link.

Parameters
[in]linkNameName of the link in input text.
[in]targetNameHyperlink target.
[in]displayNameText to show as the link.

Any occurrence of linkName in the text passed to markup substitution methods in HelpWriterContext is made into a hyperlink to targetName if the markup format supports that.


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