iRoCS Toolbox  1.1.0
Public Member Functions
svt::PrettyOptionPrinter Class Reference

The PrettyOptionPrinter class contains mehtods for pretty printing of commandline options. More...

#include <PrettyOptionPrinter.hh>

Collaboration diagram for svt::PrettyOptionPrinter:

Public Member Functions

 PrettyOptionPrinter (std::ostream &os, int indentColumn=30)
 
int indentColumn () const
 get / set start column for pretty printing of command line options More...
 
void printDefListParagraph (const std::string &item, const std::string &description)
 print one paragraph of a definition list. More...
 
void printHeader (const std::string &header)
 
void printOption (const ParamInfo &param)
 pretty print command line option. More...
 
void printOptions (std::string header, const std::vector< ParamInfo > &params)
 print subHeader and all options contained in the vector. More...
 
void printSubHeader (const std::string &header)
 
void setIndentColumn (int column)
 

Detailed Description

The PrettyOptionPrinter class contains mehtods for pretty printing of commandline options.

Definition at line 75 of file PrettyOptionPrinter.hh.

Constructor & Destructor Documentation

◆ PrettyOptionPrinter()

svt::PrettyOptionPrinter::PrettyOptionPrinter ( std::ostream &  os,
int  indentColumn = 30 
)
inline

Definition at line 79 of file PrettyOptionPrinter.hh.

Member Function Documentation

◆ printOption()

void svt::PrettyOptionPrinter::printOption ( const ParamInfo param)

pretty print command line option.

Description is written as a block starting from prettyPrintDescrColumn()

Parameters
paraminfos from the parameter

Referenced by PrettyOptionPrinter(), and setIndentColumn().

◆ printOptions()

void svt::PrettyOptionPrinter::printOptions ( std::string  header,
const std::vector< ParamInfo > &  params 
)

print subHeader and all options contained in the vector.

Parameters
headerheader passed to printSubHeader
paramsvector of ParamInfos to be printed

Referenced by PrettyOptionPrinter().

◆ printDefListParagraph()

void svt::PrettyOptionPrinter::printDefListParagraph ( const std::string &  item,
const std::string &  description 
)

print one paragraph of a definition list.

Parameters
itemitem to be defined, e.g. "--gamma value"
descriptiontext, for this item. Will be intented at indentColumn() and wrapped at column 78

Referenced by PrettyOptionPrinter().

◆ printHeader()

void svt::PrettyOptionPrinter::printHeader ( const std::string &  header)
inline

Definition at line 125 of file PrettyOptionPrinter.hh.

◆ printSubHeader()

void svt::PrettyOptionPrinter::printSubHeader ( const std::string &  header)
inline

Definition at line 132 of file PrettyOptionPrinter.hh.

◆ indentColumn()

int svt::PrettyOptionPrinter::indentColumn ( ) const
inline

get / set start column for pretty printing of command line options

Parameters

Definition at line 152 of file PrettyOptionPrinter.hh.

◆ setIndentColumn()

void svt::PrettyOptionPrinter::setIndentColumn ( int  column)
inline

Definition at line 157 of file PrettyOptionPrinter.hh.


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