ROSE 0.11.145.147
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Sawyer::Document::BaseMarkup Class Referenceabstract

Description

Base class for various documentation markup systems.

Definition at line 18 of file DocumentBaseMarkup.h.

#include <Sawyer/DocumentBaseMarkup.h>

Inheritance diagram for Sawyer::Document::BaseMarkup:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::Document::BaseMarkup:
Collaboration graph
[legend]

Public Member Functions

BaseMarkuptitle (const std::string &pageName, const std::string &chapterNumber, const std::string &chapterTitle)
 Set title properties.
 
BaseMarkupversion (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.
 
BaseMarkuppageName (const std::string &s)
 Property: Page name.
 
const std::string & chapterNumber () const
 Property: Chapter number.
 
BaseMarkupchapterNumber (const std::string &s)
 Property: Chapter number.
 
const std::string & chapterNumberOrDefault () const
 Property: Chapter number.
 
const std::string & chapterTitle () const
 Property: Chapter title.
 
BaseMarkupchapterTitle (const std::string &s)
 Property: Chapter title.
 
const std::string & chapterTitleOrDefault () const
 Property: Chapter title.
 
const std::string & versionString () const
 Property: Version string.
 
BaseMarkupversionString (const std::string &s)
 Property: Version string.
 
const std::string & versionStringOrDefault () const
 Property: Version string.
 
const std::string & versionDate () const
 Property: Version date.
 
BaseMarkupversionDate (const std::string &s)
 Property: Version date.
 
const std::string & versionDateOrDefault () const
 Property: Version date.
 
- Public Member Functions inherited from Sawyer::Document::Markup::Grammar
Grammarwith (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)
 

Constructor & Destructor Documentation

◆ BaseMarkup()

Sawyer::Document::BaseMarkup::BaseMarkup ( )
inlineprotected

Definition at line 26 of file DocumentBaseMarkup.h.

Member Function Documentation

◆ pageName() [1/2]

const std::string & Sawyer::Document::BaseMarkup::pageName ( ) const
inline

Property: Page name.

The page name is normally a single word, like "emacs".

Definition at line 36 of file DocumentBaseMarkup.h.

◆ pageName() [2/2]

BaseMarkup & Sawyer::Document::BaseMarkup::pageName ( const std::string &  s)
inline

Property: Page name.

The page name is normally a single word, like "emacs".

Definition at line 37 of file DocumentBaseMarkup.h.

◆ chapterNumber() [1/2]

const std::string & Sawyer::Document::BaseMarkup::chapterNumber ( ) const
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.

◆ chapterNumber() [2/2]

BaseMarkup & Sawyer::Document::BaseMarkup::chapterNumber ( const std::string &  s)
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.

◆ chapterNumberOrDefault()

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.

◆ chapterTitle() [1/2]

const std::string & Sawyer::Document::BaseMarkup::chapterTitle ( ) const
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.

◆ chapterTitle() [2/2]

BaseMarkup & Sawyer::Document::BaseMarkup::chapterTitle ( const std::string &  s)
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.

◆ chapterTitleOrDefault()

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.

◆ versionString() [1/2]

const std::string & Sawyer::Document::BaseMarkup::versionString ( ) const
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.

◆ versionString() [2/2]

BaseMarkup & Sawyer::Document::BaseMarkup::versionString ( const std::string &  s)
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.

◆ versionStringOrDefault()

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.

◆ versionDate() [1/2]

const std::string & Sawyer::Document::BaseMarkup::versionDate ( ) const
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.

◆ versionDate() [2/2]

BaseMarkup & Sawyer::Document::BaseMarkup::versionDate ( const std::string &  s)
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.

◆ versionDateOrDefault()

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.

◆ title()

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.

◆ version()

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.

◆ emit()

virtual bool Sawyer::Document::BaseMarkup::emit ( const std::string &  doc)
pure virtual

Emit documentation to output.

Implemented in Sawyer::Document::PodMarkup, and Sawyer::Document::TextMarkup.

◆ leftJustify()

static std::string Sawyer::Document::BaseMarkup::leftJustify ( const std::string &  ,
size_t  width 
)
static

Left justify a string in a field of width N (or more).

String should not contain linefeeds.

◆ finalizeDocument()

virtual std::string Sawyer::Document::BaseMarkup::finalizeDocument ( const std::string &  s)
inlineprotectedvirtual

Definition at line 115 of file DocumentBaseMarkup.h.


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