E-MailRelay
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
G::OptionsUsage::Config Struct Reference

A configuration structure for G::OptionsUsage. More...

#include <goptionsusage.h>

+ Collaboration diagram for G::OptionsUsage::Config:

Public Member Functions

Configset_separator (const std::string &)
 
Configset_column (std::size_t) noexcept
 
Configset_width (std::size_t) noexcept
 
Configset_width2 (std::size_t) noexcept
 
Configset_margin (std::size_t) noexcept
 
Configset_extra (bool=true) noexcept
 
Configset_alt_usage (bool=true) noexcept
 
Configset_level_max (unsigned int) noexcept
 
Configset_level_min (unsigned int) noexcept
 
Configset_main_tag (unsigned int) noexcept
 
Configset_tag_bits (unsigned int) noexcept
 
ConfigsetDefaults ()
 
ConfigsetWidthsWrtMargin ()
 
ConfigsetOverflowFormat (char=' ')
 

Public Attributes

std::string separator
 separator between syntax and description More...
 
std::size_t separator_spaces {1U}
 extra spaces on wrapped lines if using a separator More...
 
std::size_t column {30U}
 left hand column width if no separator (includes margin) More...
 
std::size_t width {default_}
 overall width for wrapping, or zero for none, defaults to $COLUMNS More...
 
std::size_t width2 {0U}
 width after the first line, or zero for 'width' More...
 
std::size_t margin {2U}
 spaces added to the left More...
 
std::size_t overflow {20U}
 use 'overflow' format if rhs is squashed down to this More...
 
std::size_t overflow_spaces {1U}
 'overflow' format extra spaces on wrapped lines More...
 
bool extra {false}
 include descriptions' extra text More...
 
bool alt_usage {false}
 use alternate "usage:" string More...
 
unsigned int level_max {99U}
 show options at-or-below this level More...
 
unsigned int level_min {1U}
 .. and at-or-above this level More...
 
unsigned int main_tag {0U}
 show options with this main tag, or zero for all More...
 
unsigned int tag_bits {0U}
 show options with matching tag bits, or zero for all More...
 

Static Public Attributes

static constexpr std::size_t default_ = static_cast<std::size_t>(-1)
 

Detailed Description

A configuration structure for G::OptionsUsage.

Definition at line 67 of file goptionsusage.h.

Member Function Documentation

◆ set_alt_usage()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_alt_usage ( bool  b = true)
inlinenoexcept

Definition at line 171 of file goptionsusage.h.

◆ set_column()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_column ( std::size_t  n)
inlinenoexcept

Definition at line 166 of file goptionsusage.h.

◆ set_extra()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_extra ( bool  b = true)
inlinenoexcept

Definition at line 170 of file goptionsusage.h.

◆ set_level_max()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_level_max ( unsigned int  n)
inlinenoexcept

Definition at line 172 of file goptionsusage.h.

◆ set_level_min()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_level_min ( unsigned int  n)
inlinenoexcept

Definition at line 173 of file goptionsusage.h.

◆ set_main_tag()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_main_tag ( unsigned int  n)
inlinenoexcept

Definition at line 174 of file goptionsusage.h.

◆ set_margin()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_margin ( std::size_t  n)
inlinenoexcept

Definition at line 169 of file goptionsusage.h.

◆ set_separator()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_separator ( const std::string &  s)
inline

Definition at line 165 of file goptionsusage.h.

◆ set_tag_bits()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_tag_bits ( unsigned int  n)
inlinenoexcept

Definition at line 175 of file goptionsusage.h.

◆ set_width()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_width ( std::size_t  n)
inlinenoexcept

Definition at line 167 of file goptionsusage.h.

◆ set_width2()

G::OptionsUsage::Config & G::OptionsUsage::Config::set_width2 ( std::size_t  n)
inlinenoexcept

Definition at line 168 of file goptionsusage.h.

◆ setDefaults()

G::OptionsUsage::Config & G::OptionsUsage::Config::setDefaults ( )

Definition at line 298 of file goptionsusage.cpp.

◆ setWidthsWrtMargin()

G::OptionsUsage::Config & G::OptionsUsage::Config::setWidthsWrtMargin ( )

Definition at line 307 of file goptionsusage.cpp.

Member Data Documentation

◆ alt_usage

bool G::OptionsUsage::Config::alt_usage {false}

use alternate "usage:" string

Definition at line 81 of file goptionsusage.h.

◆ column

std::size_t G::OptionsUsage::Config::column {30U}

left hand column width if no separator (includes margin)

Definition at line 73 of file goptionsusage.h.

◆ default_

constexpr std::size_t G::OptionsUsage::Config::default_ = static_cast<std::size_t>(-1)
staticconstexpr

Definition at line 69 of file goptionsusage.h.

◆ extra

bool G::OptionsUsage::Config::extra {false}

include descriptions' extra text

Definition at line 80 of file goptionsusage.h.

◆ level_max

unsigned int G::OptionsUsage::Config::level_max {99U}

show options at-or-below this level

Definition at line 83 of file goptionsusage.h.

◆ level_min

unsigned int G::OptionsUsage::Config::level_min {1U}

.. and at-or-above this level

Definition at line 84 of file goptionsusage.h.

◆ main_tag

unsigned int G::OptionsUsage::Config::main_tag {0U}

show options with this main tag, or zero for all

Definition at line 85 of file goptionsusage.h.

◆ margin

std::size_t G::OptionsUsage::Config::margin {2U}

spaces added to the left

Definition at line 76 of file goptionsusage.h.

◆ overflow

std::size_t G::OptionsUsage::Config::overflow {20U}

use 'overflow' format if rhs is squashed down to this

Definition at line 77 of file goptionsusage.h.

◆ overflow_spaces

std::size_t G::OptionsUsage::Config::overflow_spaces {1U}

'overflow' format extra spaces on wrapped lines

Definition at line 78 of file goptionsusage.h.

◆ separator

std::string G::OptionsUsage::Config::separator

separator between syntax and description

Definition at line 71 of file goptionsusage.h.

◆ separator_spaces

std::size_t G::OptionsUsage::Config::separator_spaces {1U}

extra spaces on wrapped lines if using a separator

Definition at line 72 of file goptionsusage.h.

◆ tag_bits

unsigned int G::OptionsUsage::Config::tag_bits {0U}

show options with matching tag bits, or zero for all

Definition at line 86 of file goptionsusage.h.

◆ width

std::size_t G::OptionsUsage::Config::width {default_}

overall width for wrapping, or zero for none, defaults to $COLUMNS

Definition at line 74 of file goptionsusage.h.

◆ width2

std::size_t G::OptionsUsage::Config::width2 {0U}

width after the first line, or zero for 'width'

Definition at line 75 of file goptionsusage.h.


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