clipp::doc_formatting Class Reference

documentation formatting options More...

#include <clipp.h>

Public Types

using string = doc_string
 

Public Member Functions

doc_formattingstart_column (int col)
 determines column where documentation printing starts More...
 
int start_column () const noexcept
 
doc_formattingdoc_column (int col)
 determines column where docstrings start More...
 
int doc_column () const noexcept
 
doc_formattingindent_size (int indent)
 determines indent of documentation lines for children of a documented group More...
 
int indent_size () const noexcept
 
doc_formattingempty_label (const string &label)
 determines string to be used if a parameter has no flags and no label
More...
 
const stringempty_label () const noexcept
 
doc_formattingparam_separator (const string &sep)
 determines string for separating parameters More...
 
const stringparam_separator () const noexcept
 
doc_formattinggroup_separator (const string &sep)
 determines string for separating groups (in usage lines) More...
 
const stringgroup_separator () const noexcept
 
doc_formattingalternative_param_separator (const string &sep)
 determines string for separating alternative parameters More...
 
const stringalternative_param_separator () const noexcept
 
doc_formattingalternative_group_separator (const string &sep)
 determines string for separating alternative groups More...
 
const stringalternative_group_separator () const noexcept
 
doc_formattingflag_separator (const string &sep)
 determines string for separating flags of the same parameter More...
 
const stringflag_separator () const noexcept
 
doc_formattingsurround_labels (const string &prefix, const string &postfix)
 determnines strings surrounding parameter labels More...
 
const stringlabel_prefix () const noexcept
 
const stringlabel_postfix () const noexcept
 
doc_formattingsurround_optional (const string &prefix, const string &postfix)
 determnines strings surrounding optional parameters/groups More...
 
const stringoptional_prefix () const noexcept
 
const stringoptional_postfix () const noexcept
 
doc_formattingsurround_repeat (const string &prefix, const string &postfix)
 determnines strings surrounding repeatable parameters/groups More...
 
const stringrepeat_prefix () const noexcept
 
const stringrepeat_postfix () const noexcept
 
doc_formattingsurround_alternatives (const string &prefix, const string &postfix)
 determnines strings surrounding exclusive groups More...
 
const stringalternatives_prefix () const noexcept
 
const stringalternatives_postfix () const noexcept
 
doc_formattingsurround_alternative_flags (const string &prefix, const string &postfix)
 determnines strings surrounding alternative flags More...
 
const stringalternative_flags_prefix () const noexcept
 
const stringalternative_flags_postfix () const noexcept
 
doc_formattingsurround_group (const string &prefix, const string &postfix)
 determnines strings surrounding non-exclusive groups More...
 
const stringgroup_prefix () const noexcept
 
const stringgroup_postfix () const noexcept
 
doc_formattingsurround_joinable (const string &prefix, const string &postfix)
 determnines strings surrounding joinable groups More...
 
const stringjoinable_prefix () const noexcept
 
const stringjoinable_postfix () const noexcept
 
doc_formattingmax_flags_per_param_in_doc (int max)
 determines maximum number of flags per parameter to be printed in detailed parameter documentation lines More...
 
int max_flags_per_param_in_doc () const noexcept
 
doc_formattingmax_flags_per_param_in_usage (int max)
 determines maximum number of flags per parameter to be printed in usage lines More...
 
int max_flags_per_param_in_usage () const noexcept
 
doc_formattingline_spacing (int lines)
 determines number of empty rows after one single-line documentation entry More...
 
int line_spacing () const noexcept
 
doc_formattingparagraph_spacing (int lines)
 determines number of empty rows before and after a paragraph; a paragraph is defined by a documented group or if a parameter documentation entry used more than one line More...
 
int paragraph_spacing () const noexcept
 
doc_formattingmerge_alternative_flags_with_common_prefix (bool yes=true)
 determines if alternative flags with a common prefix should be printed in a merged fashion More...
 
bool merge_alternative_flags_with_common_prefix () const noexcept
 
doc_formattingmerge_joinable_with_common_prefix (bool yes=true)
 determines if joinable flags with a common prefix should be printed in a merged fashion More...
 
bool merge_joinable_with_common_prefix () const noexcept
 
doc_formattingsplit_alternatives (bool yes=true)
 determines if children of exclusive groups should be printed on individual lines if the exceed 'alternatives_min_split_size' More...
 
bool split_alternatives () const noexcept
 
doc_formattingalternatives_min_split_size (int size)
 determines how many children exclusive groups can have before their children are printed on individual usage lines More...
 
int alternatives_min_split_size () const noexcept
 

Detailed Description

documentation formatting options

Definition at line 5068 of file clipp.h.

Member Typedef Documentation

◆ string

Definition at line 5071 of file clipp.h.

Member Function Documentation

◆ alternative_flags_postfix()

const string& clipp::doc_formatting::alternative_flags_postfix ( ) const
inlinenoexcept

Definition at line 5177 of file clipp.h.

◆ alternative_flags_prefix()

const string& clipp::doc_formatting::alternative_flags_prefix ( ) const
inlinenoexcept

Definition at line 5176 of file clipp.h.

◆ alternative_group_separator() [1/2]

const string& clipp::doc_formatting::alternative_group_separator ( ) const
inlinenoexcept

Definition at line 5120 of file clipp.h.

◆ alternative_group_separator() [2/2]

doc_formatting& clipp::doc_formatting::alternative_group_separator ( const string sep)
inline

determines string for separating alternative groups

Definition at line 5116 of file clipp.h.

◆ alternative_param_separator() [1/2]

const string& clipp::doc_formatting::alternative_param_separator ( ) const
inlinenoexcept

Definition at line 5113 of file clipp.h.

◆ alternative_param_separator() [2/2]

doc_formatting& clipp::doc_formatting::alternative_param_separator ( const string sep)
inline

determines string for separating alternative parameters

Definition at line 5109 of file clipp.h.

◆ alternatives_min_split_size() [1/2]

int clipp::doc_formatting::alternatives_min_split_size ( ) const
inlinenoexcept

Definition at line 5269 of file clipp.h.

◆ alternatives_min_split_size() [2/2]

doc_formatting& clipp::doc_formatting::alternatives_min_split_size ( int  size)
inline

determines how many children exclusive groups can have before their children are printed on individual usage lines

Definition at line 5265 of file clipp.h.

◆ alternatives_postfix()

const string& clipp::doc_formatting::alternatives_postfix ( ) const
inlinenoexcept

Definition at line 5167 of file clipp.h.

◆ alternatives_prefix()

const string& clipp::doc_formatting::alternatives_prefix ( ) const
inlinenoexcept

Definition at line 5166 of file clipp.h.

◆ doc_column() [1/2]

int clipp::doc_formatting::doc_column ( ) const
inlinenoexcept

Definition at line 5079 of file clipp.h.

◆ doc_column() [2/2]

doc_formatting& clipp::doc_formatting::doc_column ( int  col)
inline

determines column where docstrings start

Definition at line 5078 of file clipp.h.

◆ empty_label() [1/2]

const string& clipp::doc_formatting::empty_label ( ) const
inlinenoexcept

Definition at line 5092 of file clipp.h.

◆ empty_label() [2/2]

doc_formatting& clipp::doc_formatting::empty_label ( const string label)
inline

determines string to be used if a parameter has no flags and no label

Definition at line 5088 of file clipp.h.

◆ flag_separator() [1/2]

const string& clipp::doc_formatting::flag_separator ( ) const
inlinenoexcept

Definition at line 5127 of file clipp.h.

◆ flag_separator() [2/2]

doc_formatting& clipp::doc_formatting::flag_separator ( const string sep)
inline

determines string for separating flags of the same parameter

Definition at line 5123 of file clipp.h.

◆ group_postfix()

const string& clipp::doc_formatting::group_postfix ( ) const
inlinenoexcept

Definition at line 5187 of file clipp.h.

◆ group_prefix()

const string& clipp::doc_formatting::group_prefix ( ) const
inlinenoexcept

Definition at line 5186 of file clipp.h.

◆ group_separator() [1/2]

const string& clipp::doc_formatting::group_separator ( ) const
inlinenoexcept

Definition at line 5106 of file clipp.h.

◆ group_separator() [2/2]

doc_formatting& clipp::doc_formatting::group_separator ( const string sep)
inline

determines string for separating groups (in usage lines)

Definition at line 5102 of file clipp.h.

◆ indent_size() [1/2]

int clipp::doc_formatting::indent_size ( ) const
inlinenoexcept

Definition at line 5084 of file clipp.h.

◆ indent_size() [2/2]

doc_formatting& clipp::doc_formatting::indent_size ( int  indent)
inline

determines indent of documentation lines for children of a documented group

Definition at line 5083 of file clipp.h.

◆ joinable_postfix()

const string& clipp::doc_formatting::joinable_postfix ( ) const
inlinenoexcept

Definition at line 5197 of file clipp.h.

◆ joinable_prefix()

const string& clipp::doc_formatting::joinable_prefix ( ) const
inlinenoexcept

Definition at line 5196 of file clipp.h.

◆ label_postfix()

const string& clipp::doc_formatting::label_postfix ( ) const
inlinenoexcept

Definition at line 5137 of file clipp.h.

◆ label_prefix()

const string& clipp::doc_formatting::label_prefix ( ) const
inlinenoexcept

Definition at line 5136 of file clipp.h.

◆ line_spacing() [1/2]

int clipp::doc_formatting::line_spacing ( ) const
inlinenoexcept

Definition at line 5221 of file clipp.h.

◆ line_spacing() [2/2]

doc_formatting& clipp::doc_formatting::line_spacing ( int  lines)
inline

determines number of empty rows after one single-line documentation entry

Definition at line 5217 of file clipp.h.

◆ max_flags_per_param_in_doc() [1/2]

int clipp::doc_formatting::max_flags_per_param_in_doc ( ) const
inlinenoexcept

Definition at line 5205 of file clipp.h.

◆ max_flags_per_param_in_doc() [2/2]

doc_formatting& clipp::doc_formatting::max_flags_per_param_in_doc ( int  max)
inline

determines maximum number of flags per parameter to be printed in detailed parameter documentation lines

Definition at line 5201 of file clipp.h.

◆ max_flags_per_param_in_usage() [1/2]

int clipp::doc_formatting::max_flags_per_param_in_usage ( ) const
inlinenoexcept

Definition at line 5213 of file clipp.h.

◆ max_flags_per_param_in_usage() [2/2]

doc_formatting& clipp::doc_formatting::max_flags_per_param_in_usage ( int  max)
inline

determines maximum number of flags per parameter to be printed in usage lines

Definition at line 5209 of file clipp.h.

◆ merge_alternative_flags_with_common_prefix() [1/2]

bool clipp::doc_formatting::merge_alternative_flags_with_common_prefix ( ) const
inlinenoexcept

Definition at line 5238 of file clipp.h.

◆ merge_alternative_flags_with_common_prefix() [2/2]

doc_formatting& clipp::doc_formatting::merge_alternative_flags_with_common_prefix ( bool  yes = true)
inline

determines if alternative flags with a common prefix should be printed in a merged fashion

Definition at line 5234 of file clipp.h.

◆ merge_joinable_with_common_prefix() [1/2]

bool clipp::doc_formatting::merge_joinable_with_common_prefix ( ) const
inlinenoexcept

Definition at line 5248 of file clipp.h.

◆ merge_joinable_with_common_prefix() [2/2]

doc_formatting& clipp::doc_formatting::merge_joinable_with_common_prefix ( bool  yes = true)
inline

determines if joinable flags with a common prefix should be printed in a merged fashion

Definition at line 5244 of file clipp.h.

◆ optional_postfix()

const string& clipp::doc_formatting::optional_postfix ( ) const
inlinenoexcept

Definition at line 5147 of file clipp.h.

◆ optional_prefix()

const string& clipp::doc_formatting::optional_prefix ( ) const
inlinenoexcept

Definition at line 5146 of file clipp.h.

◆ paragraph_spacing() [1/2]

int clipp::doc_formatting::paragraph_spacing ( ) const
inlinenoexcept

Definition at line 5230 of file clipp.h.

◆ paragraph_spacing() [2/2]

doc_formatting& clipp::doc_formatting::paragraph_spacing ( int  lines)
inline

determines number of empty rows before and after a paragraph; a paragraph is defined by a documented group or if a parameter documentation entry used more than one line

Definition at line 5226 of file clipp.h.

◆ param_separator() [1/2]

const string& clipp::doc_formatting::param_separator ( ) const
inlinenoexcept

Definition at line 5099 of file clipp.h.

◆ param_separator() [2/2]

doc_formatting& clipp::doc_formatting::param_separator ( const string sep)
inline

determines string for separating parameters

Definition at line 5095 of file clipp.h.

◆ repeat_postfix()

const string& clipp::doc_formatting::repeat_postfix ( ) const
inlinenoexcept

Definition at line 5157 of file clipp.h.

◆ repeat_prefix()

const string& clipp::doc_formatting::repeat_prefix ( ) const
inlinenoexcept

Definition at line 5156 of file clipp.h.

◆ split_alternatives() [1/2]

bool clipp::doc_formatting::split_alternatives ( ) const
inlinenoexcept

Definition at line 5259 of file clipp.h.

◆ split_alternatives() [2/2]

doc_formatting& clipp::doc_formatting::split_alternatives ( bool  yes = true)
inline

determines if children of exclusive groups should be printed on individual lines if the exceed 'alternatives_min_split_size'

Definition at line 5255 of file clipp.h.

◆ start_column() [1/2]

int clipp::doc_formatting::start_column ( ) const
inlinenoexcept

Definition at line 5075 of file clipp.h.

◆ start_column() [2/2]

doc_formatting& clipp::doc_formatting::start_column ( int  col)
inline

determines column where documentation printing starts

Definition at line 5074 of file clipp.h.

◆ surround_alternative_flags()

doc_formatting& clipp::doc_formatting::surround_alternative_flags ( const string prefix,
const string postfix 
)
inline

determnines strings surrounding alternative flags

Definition at line 5171 of file clipp.h.

◆ surround_alternatives()

doc_formatting& clipp::doc_formatting::surround_alternatives ( const string prefix,
const string postfix 
)
inline

determnines strings surrounding exclusive groups

Definition at line 5161 of file clipp.h.

◆ surround_group()

doc_formatting& clipp::doc_formatting::surround_group ( const string prefix,
const string postfix 
)
inline

determnines strings surrounding non-exclusive groups

Definition at line 5181 of file clipp.h.

◆ surround_joinable()

doc_formatting& clipp::doc_formatting::surround_joinable ( const string prefix,
const string postfix 
)
inline

determnines strings surrounding joinable groups

Definition at line 5191 of file clipp.h.

◆ surround_labels()

doc_formatting& clipp::doc_formatting::surround_labels ( const string prefix,
const string postfix 
)
inline

determnines strings surrounding parameter labels

Definition at line 5131 of file clipp.h.

◆ surround_optional()

doc_formatting& clipp::doc_formatting::surround_optional ( const string prefix,
const string postfix 
)
inline

determnines strings surrounding optional parameters/groups

Definition at line 5141 of file clipp.h.

◆ surround_repeat()

doc_formatting& clipp::doc_formatting::surround_repeat ( const string prefix,
const string postfix 
)
inline

determnines strings surrounding repeatable parameters/groups

Definition at line 5151 of file clipp.h.


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