ROSE 0.11.145.147
|
Base class for various documentation markup systems.
Definition at line 18 of file DocumentBaseMarkup.h.
#include <Sawyer/DocumentBaseMarkup.h>
Public Member Functions | |
BaseMarkup & | title (const std::string &pageName, const std::string &chapterNumber, const std::string &chapterTitle) |
Set title properties. | |
BaseMarkup & | version (const std::string &versionString, const std::string &versionDate) |
Set version properties. | |
virtual std::string | operator() (const std::string &) |
Parse input to generate POD. | |
virtual bool | emit (const std::string &doc)=0 |
Emit documentation to output. | |
const std::string & | pageName () const |
Property: Page name. | |
BaseMarkup & | pageName (const std::string &s) |
Property: Page name. | |
const std::string & | chapterNumber () const |
Property: Chapter number. | |
BaseMarkup & | chapterNumber (const std::string &s) |
Property: Chapter number. | |
const std::string & | chapterNumberOrDefault () const |
Property: Chapter number. | |
const std::string & | chapterTitle () const |
Property: Chapter title. | |
BaseMarkup & | chapterTitle (const std::string &s) |
Property: Chapter title. | |
const std::string & | chapterTitleOrDefault () const |
Property: Chapter title. | |
const std::string & | versionString () const |
Property: Version string. | |
BaseMarkup & | versionString (const std::string &s) |
Property: Version string. | |
const std::string & | versionStringOrDefault () const |
Property: Version string. | |
const std::string & | versionDate () const |
Property: Version date. | |
BaseMarkup & | versionDate (const std::string &s) |
Property: Version date. | |
const std::string & | versionDateOrDefault () const |
Property: Version date. | |
Public Member Functions inherited from Sawyer::Document::Markup::Grammar | |
Grammar & | with (const Function::Ptr &) |
Insert function. | |
virtual std::string | operator() (const std::string &s) const |
Evaluate an entire string. | |
Static Public Member Functions | |
static bool | hasNonSpace (const std::string &) |
True if this string contains any non-blank characters. | |
static std::string | makeOneLine (const std::string &) |
Remove linefeeds. | |
static std::string | leftJustify (const std::string &, size_t width) |
Left justify a string in a field of width N (or more). | |
static std::string | escapeSingleQuoted (const std::string &) |
Escape single quoted string content. | |
Static Public Member Functions inherited from Sawyer::Document::Markup::Grammar | |
static std::string | unescape (const std::string &s) |
Expand escape sequences "@@", "@{" and "@}". | |
static std::string | escape (const std::string &s) |
Escape all special "@", "{", and "}". | |
Protected Member Functions | |
virtual std::string | finalizeDocument (const std::string &s) |
|
inlineprotected |
Definition at line 26 of file DocumentBaseMarkup.h.
|
inline |
Property: Page name.
The page name is normally a single word, like "emacs".
Definition at line 36 of file DocumentBaseMarkup.h.
|
inline |
Property: Page name.
The page name is normally a single word, like "emacs".
Definition at line 37 of file DocumentBaseMarkup.h.
|
inline |
Property: Chapter number.
The chapter "number", which could also be a non-numeric string. Man pages have standard numbers such as "1" for command-line tools. The chapterNumberOrDefault returns either the value previously set, or some default.
Definition at line 46 of file DocumentBaseMarkup.h.
|
inline |
Property: Chapter number.
The chapter "number", which could also be a non-numeric string. Man pages have standard numbers such as "1" for command-line tools. The chapterNumberOrDefault returns either the value previously set, or some default.
Definition at line 47 of file DocumentBaseMarkup.h.
const std::string & Sawyer::Document::BaseMarkup::chapterNumberOrDefault | ( | ) | const |
Property: Chapter number.
The chapter "number", which could also be a non-numeric string. Man pages have standard numbers such as "1" for command-line tools. The chapterNumberOrDefault returns either the value previously set, or some default.
|
inline |
Property: Chapter title.
The chapter name should be something short enough to fit centered at the top of the man page, sharing the first line with the page name. It should have Title Capitalization. The chapterTitleOrDefault returns either the value previously set, or some default.
Definition at line 58 of file DocumentBaseMarkup.h.
|
inline |
Property: Chapter title.
The chapter name should be something short enough to fit centered at the top of the man page, sharing the first line with the page name. It should have Title Capitalization. The chapterTitleOrDefault returns either the value previously set, or some default.
Definition at line 59 of file DocumentBaseMarkup.h.
const std::string & Sawyer::Document::BaseMarkup::chapterTitleOrDefault | ( | ) | const |
Property: Chapter title.
The chapter name should be something short enough to fit centered at the top of the man page, sharing the first line with the page name. It should have Title Capitalization. The chapterTitleOrDefault returns either the value previously set, or some default.
|
inline |
Property: Version string.
The version string usually appears on the left side of the bottom line of the man page, sharing that area also with the version date and page name. The versionStringOrDefault returns either the value previously set, or some default.
Definition at line 69 of file DocumentBaseMarkup.h.
|
inline |
Property: Version string.
The version string usually appears on the left side of the bottom line of the man page, sharing that area also with the version date and page name. The versionStringOrDefault returns either the value previously set, or some default.
Definition at line 70 of file DocumentBaseMarkup.h.
const std::string & Sawyer::Document::BaseMarkup::versionStringOrDefault | ( | ) | const |
Property: Version string.
The version string usually appears on the left side of the bottom line of the man page, sharing that area also with the version date and page name. The versionStringOrDefault returns either the value previously set, or some default.
|
inline |
Property: Version date.
The version date usually appears centered on the last line of output, sharing that line with the version string and page name. The versionDateOrDefault returns either the value previously set, or some default.
Definition at line 80 of file DocumentBaseMarkup.h.
|
inline |
Property: Version date.
The version date usually appears centered on the last line of output, sharing that line with the version string and page name. The versionDateOrDefault returns either the value previously set, or some default.
Definition at line 81 of file DocumentBaseMarkup.h.
const std::string & Sawyer::Document::BaseMarkup::versionDateOrDefault | ( | ) | const |
Property: Version date.
The version date usually appears centered on the last line of output, sharing that line with the version string and page name. The versionDateOrDefault returns either the value previously set, or some default.
BaseMarkup & Sawyer::Document::BaseMarkup::title | ( | const std::string & | pageName, |
const std::string & | chapterNumber, | ||
const std::string & | chapterTitle | ||
) |
Set title properties.
This functions is a shortcut for setting the pageName, chapterNumber, and chapterTitle properties.
BaseMarkup & Sawyer::Document::BaseMarkup::version | ( | const std::string & | versionString, |
const std::string & | versionDate | ||
) |
Set version properties.
This function is a shortcut for setting the versionString and versionDate properties.
|
pure virtual |
Emit documentation to output.
Implemented in Sawyer::Document::PodMarkup, and Sawyer::Document::TextMarkup.
|
static |
Left justify a string in a field of width N (or more).
String should not contain linefeeds.
|
inlineprotectedvirtual |
Definition at line 115 of file DocumentBaseMarkup.h.