ROSE  0.9.10.91
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 <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. More...
 
BaseMarkupversion (const std::string &versionString, const std::string &versionDate)
 Set version properties. More...
 
virtual std::string operator() (const std::string &)
 Parse input to generate POD. More...
 
virtual bool emit (const std::string &doc)=0
 Emit documentation to output.
 
const std::string & pageName () const
 Property: Page name. More...
 
BaseMarkuppageName (const std::string &s)
 Property: Page name. More...
 
const std::string & chapterNumber () const
 Property: Chapter number. More...
 
BaseMarkupchapterNumber (const std::string &s)
 Property: Chapter number. More...
 
const std::string & chapterNumberOrDefault () const
 Property: Chapter number. More...
 
const std::string & chapterTitle () const
 Property: Chapter title. More...
 
BaseMarkupchapterTitle (const std::string &s)
 Property: Chapter title. More...
 
const std::string & chapterTitleOrDefault () const
 Property: Chapter title. More...
 
const std::string & versionString () const
 Property: Version string. More...
 
BaseMarkupversionString (const std::string &s)
 Property: Version string. More...
 
const std::string & versionStringOrDefault () const
 Property: Version string. More...
 
const std::string & versionDate () const
 Property: Version date. More...
 
BaseMarkupversionDate (const std::string &s)
 Property: Version date. More...
 
const std::string & versionDateOrDefault () const
 Property: Version date. More...
 
- Public Member Functions inherited from Sawyer::Document::Markup::Grammar
Grammarwith (const Function::Ptr &)
 Insert function. More...
 
virtual std::string operator() (const std::string &s) const
 Evaluate an entire string. More...
 

Static Public Member Functions

static bool hasNonSpace (const std::string &)
 True if this string contains any non-blank characters. More...
 
static std::string makeOneLine (const std::string &)
 Remove linefeeds. More...
 
static std::string leftJustify (const std::string &, size_t width)
 Left justify a string in a field of width N (or more). More...
 
static std::string escapeSingleQuoted (const std::string &)
 Escape single quoted string content. More...
 
- Static Public Member Functions inherited from Sawyer::Document::Markup::Grammar
static std::string unescape (const std::string &s)
 Expand escape sequences "@@", "@{" and "@}". More...
 
static std::string escape (const std::string &s)
 Escape all special "@", "{", and "}". More...
 

Protected Member Functions

virtual std::string finalizeDocument (const std::string &s)
 

Member Function Documentation

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

virtual std::string Sawyer::Document::BaseMarkup::operator() ( const std::string &  )
virtual

Parse input to generate POD.

static bool Sawyer::Document::BaseMarkup::hasNonSpace ( const std::string &  )
static

True if this string contains any non-blank characters.

static std::string Sawyer::Document::BaseMarkup::makeOneLine ( const std::string &  )
static

Remove linefeeds.

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.

static std::string Sawyer::Document::BaseMarkup::escapeSingleQuoted ( const std::string &  )
static

Escape single quoted string content.


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