8#ifndef Sawyer_Document_BaseMarkup_H
9#define Sawyer_Document_BaseMarkup_H
11#include <Sawyer/DocumentMarkup.h>
12#include <Sawyer/Sawyer.h>
19 std::string pageName_;
20 std::string chapterNumber_;
21 std::string chapterTitle_;
22 std::string versionStr_;
23 std::string versionDate_;
36 const std::string&
pageName()
const {
return pageName_; }
80 const std::string&
versionDate()
const {
return versionDate_; }
88 BaseMarkup&
title(
const std::string &pageName,
const std::string &chapterNumber,
const std::string &chapterTitle);
99 virtual bool emit(
const std::string &doc) = 0;
115 virtual std::string finalizeDocument(
const std::string &s) {
return s; }
Base class for various documentation markup systems.
const std::string & versionStringOrDefault() const
Property: Version string.
const std::string & versionDateOrDefault() const
Property: Version date.
static std::string escapeSingleQuoted(const std::string &)
Escape single quoted string content.
const std::string & versionDate() const
Property: Version date.
BaseMarkup & pageName(const std::string &s)
Property: Page name.
const std::string & chapterTitle() const
Property: Chapter title.
static std::string makeOneLine(const std::string &)
Remove linefeeds.
BaseMarkup & chapterNumber(const std::string &s)
Property: Chapter number.
const std::string & chapterNumber() const
Property: Chapter number.
BaseMarkup & chapterTitle(const std::string &s)
Property: Chapter title.
BaseMarkup & version(const std::string &versionString, const std::string &versionDate)
Set version properties.
BaseMarkup & versionDate(const std::string &s)
Property: Version date.
virtual std::string operator()(const std::string &)
Parse input to generate POD.
const std::string & pageName() const
Property: Page name.
static bool hasNonSpace(const std::string &)
True if this string contains any non-blank characters.
const std::string & chapterNumberOrDefault() const
Property: Chapter number.
BaseMarkup & title(const std::string &pageName, const std::string &chapterNumber, const std::string &chapterTitle)
Set title properties.
virtual bool emit(const std::string &doc)=0
Emit documentation to output.
const std::string & versionString() const
Property: Version string.
const std::string & chapterTitleOrDefault() const
Property: Chapter title.
BaseMarkup & versionString(const std::string &s)
Property: Version string.
static std::string leftJustify(const std::string &, size_t width)
Left justify a string in a field of width N (or more).