MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <ManPage.hpp>
Static Public Member Functions | |
static std::ostream & | begin_bold (std::ostream &str) |
static std::ostream & | end_bold (std::ostream &str) |
static std::ostream & | bold (std::ostream &str, const std::string &s) |
static std::ostream & | begin_italic (std::ostream &str) |
static std::ostream & | end_italic (std::ostream &str) |
static std::ostream & | italic (std::ostream &str, const std::string &s) |
static std::ostream & | begin_section (std::ostream &str, const std::string &name) |
static std::ostream & | begin_subsection (std::ostream &str, const std::string &name) |
static std::ostream & | begin_paragraph (std::ostream &str) |
static std::ostream & | begin_hanging_paragraph (std::ostream &str) |
static std::ostream & | begin_indent (std::ostream &str) |
static std::ostream & | end_indent (std::ostream &str) |
static std::ostream & | begin_manpage (std::ostream &str, const std::string &name, int section) |
static std::ostream & | write_text (std::ostream &str, bool hanging_indent, const std::string &text) |
Definition at line 39 of file ManPage.hpp.
static std::ostream& ManPage::begin_bold | ( | std::ostream & | str | ) | [inline, static] |
Definition at line 42 of file ManPage.hpp.
Referenced by bold(), CLArgFlag::make_literal_man_string(), CLArgFlag::make_man_string(), CLArgToggle::manstr(), and CLArgImpl::print_man().
{ return str << std::endl << ".B" << std::endl; }
static std::ostream& ManPage::begin_hanging_paragraph | ( | std::ostream & | str | ) | [inline, static] |
Definition at line 83 of file ManPage.hpp.
Referenced by CLArgImpl::print_man(), and write_text().
{ return str << std::endl << ".HP " << std::endl; }
static std::ostream& ManPage::begin_indent | ( | std::ostream & | str | ) | [inline, static] |
Definition at line 88 of file ManPage.hpp.
Referenced by CLArgImpl::print_man().
{ return str << std::endl << ".RS " << std::endl; }
static std::ostream& ManPage::begin_italic | ( | std::ostream & | str | ) | [inline, static] |
Definition at line 55 of file ManPage.hpp.
Referenced by italic().
{ return str << std::endl << ".I" << std::endl; }
static std::ostream& ManPage::begin_manpage | ( | std::ostream & | str, |
const std::string & | name, | ||
int | section | ||
) | [inline, static] |
Definition at line 97 of file ManPage.hpp.
Referenced by CLArgImpl::print_man().
{ return str << std::endl << ".TH " << name << " " << section << std::endl; }
static std::ostream& ManPage::begin_paragraph | ( | std::ostream & | str | ) | [inline, static] |
Definition at line 78 of file ManPage.hpp.
Referenced by CLArgImpl::print_man(), and write_text().
{ return str << std::endl << ".P " << std::endl; }
static std::ostream& ManPage::begin_section | ( | std::ostream & | str, |
const std::string & | name | ||
) | [inline, static] |
Definition at line 68 of file ManPage.hpp.
Referenced by CLArgImpl::print_man().
{ return str << std::endl << ".SH " << name << std::endl; }
static std::ostream& ManPage::begin_subsection | ( | std::ostream & | str, |
const std::string & | name | ||
) | [inline, static] |
Definition at line 73 of file ManPage.hpp.
{ return str << std::endl << ".SS " << name << std::endl; }
static std::ostream& ManPage::bold | ( | std::ostream & | str, |
const std::string & | s | ||
) | [inline, static] |
Definition at line 50 of file ManPage.hpp.
References begin_bold(), and end_bold().
Referenced by CLArgFlag::make_literal_man_string(), CLArgs::KeyWordArg::manstr(), and CLArgImpl::print_man().
{ return end_bold( begin_bold( str ) << s ); }
static std::ostream& ManPage::end_bold | ( | std::ostream & | str | ) | [inline, static] |
Definition at line 46 of file ManPage.hpp.
Referenced by bold(), CLArgFlag::make_literal_man_string(), CLArgFlag::make_man_string(), CLArgToggle::manstr(), and CLArgImpl::print_man().
{
return str << std::endl;
}
static std::ostream& ManPage::end_indent | ( | std::ostream & | str | ) | [inline, static] |
Definition at line 92 of file ManPage.hpp.
Referenced by CLArgImpl::print_man().
{ return str << std::endl << ".RE " << std::endl; }
static std::ostream& ManPage::end_italic | ( | std::ostream & | str | ) | [inline, static] |
static std::ostream& ManPage::italic | ( | std::ostream & | str, |
const std::string & | s | ||
) | [inline, static] |
Definition at line 63 of file ManPage.hpp.
References begin_italic(), and end_italic().
{ return end_italic( begin_italic( str ) << s ); }
std::ostream & ManPage::write_text | ( | std::ostream & | str, |
bool | hanging_indent, | ||
const std::string & | text | ||
) | [static] |
Definition at line 35 of file ManPage.cpp.
References begin_hanging_paragraph(), begin_paragraph(), and n.
Referenced by CLArgImpl::print_man().
{ std::string::size_type i = 0, j; if( hanging_indent ) begin_hanging_paragraph( str ); else begin_paragraph( str ); const std::string::size_type n = text.size(); while( i != n ) { if( text[i] == '\n' ) { begin_paragraph( str ); ++i; continue; } j = text.find( "\n", i ); if( j == std::string::npos ) j = n; if( text[i] == '.' ) str << '\\'; str << text.substr( i, j - i ); i = j; } return str; }