Gromacs
2024.4
|
Provides functionality for formatting help text for console and reStructuredText.
This module provides helper functions and classes for formatting text to the console and as reStructuredText through a single interface. The main components of the module are:
The formatting syntax for strings accepted by this module is described in Help formatting. The module is currently exposed outside GROMACS only through this formatting syntax, not any API calls.
Classes | |
class | gmx::GlobalCommandLineHelpContext |
Helper for passing CommandLineHelpContext into parse_common_args(). More... | |
class | gmx::TextTableFormatter::Impl |
Private implementation class for TextTableFormatter. More... | |
struct | gmx::TextTableFormatter::Impl::ColumnData |
Manages a single column for TextTableFormatter. More... | |
class | gmx::TextTableFormatter |
Formats rows of a table for text output. More... | |
class | gmx::HelpManager |
Helper for providing interactive online help. More... | |
class | gmx::AbstractSimpleHelpTopic |
Abstract base class for help topics that have simple text and no subtopics. More... | |
class | gmx::AbstractCompositeHelpTopic |
Abstract base class for help topics that have simple text and subtopics. More... | |
class | gmx::SimpleHelpTopic< HelpText > |
Template for simple implementation of AbstractSimpleHelpTopic. More... | |
class | gmx::CompositeHelpTopic< HelpText > |
Template for simple implementation of AbstractCompositeHelpTopic. More... | |
class | gmx::anonymous_namespace{helpwritercontext.cpp}::IWrapper |
Custom output interface for HelpWriterContext::Impl::processMarkup(). More... | |
class | gmx::anonymous_namespace{helpwritercontext.cpp}::WrapperToString |
Wraps markup output into a single string. More... | |
class | gmx::anonymous_namespace{helpwritercontext.cpp}::WrapperToVector |
Wraps markup output into a vector of string (one line per element). More... | |
class | gmx::HelpWriterContext::Impl::SharedState |
Shared, non-modifiable state for context objects. More... | |
class | gmx::HelpLinks |
Hyperlink data for writing out help. More... | |
class | gmx::HelpWriterContext |
Context information for writing out help. More... | |
class | gmx::IHelpTopic |
Provides a single online help topic. More... | |
class | gmx::RstParagraphIterator |
Iterator over reStructuredText paragraphs. More... | |
Functions | |
std::string | gmx::anonymous_namespace{helpwritercontext.cpp}::repall (const std::string &s, int nsr, const t_sandr sa[]) |
Replaces all entries from a list of replacements. | |
template<size_t nsr> | |
std::string | gmx::anonymous_namespace{helpwritercontext.cpp}::repall (const std::string &s, const t_sandr(&sa)[nsr]) |
Replaces all entries from a list of replacements. | |
std::string | gmx::anonymous_namespace{helpwritercontext.cpp}::removeExtraNewlinesRst (const std::string &text) |
Removes extra newlines from reStructuredText. More... | |
Variables | |
const char | gmx::anonymous_namespace{helpwritercontext.cpp}::g_titleChars [] = "=-^*~+#'_." |
Characters used for reStructuredText title underlining. | |
const t_sandr | gmx::anonymous_namespace{helpwritercontext.cpp}::sandrTty [] |
List of replacements for console output. More... | |
const t_sandr | gmx::anonymous_namespace{helpwritercontext.cpp}::sandrRst [] |
List of replacements for reStructuredText output. More... | |
Directories | |
directory | onlinehelp |
Help Formatting for Online Help (onlinehelp) | |
directory | tests |
Unit tests for Help Formatting for Online Help (onlinehelp). | |
Files | |
file | helpformat.cpp |
Implements functions in helpformat.h. | |
file | helpformat.h |
Declares common string formatting routines for online help. | |
file | helpmanager.cpp |
Implements gmx::HelpManager. | |
file | helpmanager.h |
Declares gmx::HelpManager. | |
file | helptopic.cpp |
Implements classes and functions from helptopic.h. | |
file | helptopic.h |
Declares helper classes for implementing gmx::IHelpTopic. | |
file | helpwritercontext.cpp |
Implements gmx::HelpWriterContext. | |
file | helpwritercontext.h |
Declares gmx::HelpWriterContext. | |
file | ihelptopic.h |
Declares gmx::IHelpTopic. | |
file | rstparser.cpp |
Implements classes from rstparser.h. | |
file | rstparser.h |
Declares classes for (partial) parsing of reStructuredText. | |
file | helpformat.cpp |
Tests for help string formatting functions and classes. | |
file | helpmanager.cpp |
Tests for help topic management and help topic formatting. | |
file | helpwritercontext.cpp |
Tests for help text formatting. | |
file | mock_helptopic.cpp |
Implements classes in mock_helptopic.h. | |
file | mock_helptopic.h |
Declares mock implementation of gmx::IHelpTopic. | |
std::string gmx::anonymous_namespace{helpwritercontext.cpp}::removeExtraNewlinesRst | ( | const std::string & | text | ) |
Removes extra newlines from reStructuredText.
[in] | text | Input text. |
text
with all sequences of more than two newlines replaced with just two newlines. std::bad_alloc | if out of memory. |
const t_sandr gmx::anonymous_namespace{helpwritercontext.cpp}::sandrRst[] |
List of replacements for reStructuredText output.
const t_sandr gmx::anonymous_namespace{helpwritercontext.cpp}::sandrTty[] |
List of replacements for console output.