ROSE 0.11.145.192
DocumentTextMarkup.h
1// WARNING: Changes to this file must be contributed back to Sawyer or else they will
2// be clobbered by the next update from Sawyer. The Sawyer repository is at
3// https://gitlab.com/charger7534/sawyer.git.
4
5
6
7
8#ifndef Sawyer_Document_TextMarkup_H
9#define Sawyer_Document_TextMarkup_H
10
11#include <Sawyer/DocumentBaseMarkup.h>
12#include <Sawyer/Sawyer.h>
13
14namespace Sawyer {
15namespace Document {
16
21class SAWYER_EXPORT TextMarkup: public BaseMarkup {
22 bool doPageHeader_, doPageFooter_;
23public:
25 : doPageHeader_(true), doPageFooter_(true) {
26 init();
27 }
28
29 virtual bool emit(const std::string &doc) /*override*/;
30
34 bool doingPageHeader() const { return doPageHeader_; }
35 TextMarkup& doingPageHeader(bool b) { doPageHeader_ = b; return *this; }
41 bool doingPageFooter() const { return doPageFooter_; }
42 TextMarkup& doingPageFooter(bool b) { doPageFooter_ = b; return *this; }
45private:
46 void init();
47 std::string finalizeDocument(const std::string &s_);
48};
49
50} // namespace
51} // namespace
52
53#endif
Base class for various documentation markup systems.
Renders markup as plain text.
TextMarkup & doingPageFooter(bool b)
Property: Whether to create a page footer.
bool doingPageHeader() const
Property: Whether to create a page header.
virtual bool emit(const std::string &doc)
Emit documentation to output.
TextMarkup & doingPageHeader(bool b)
Property: Whether to create a page header.
bool doingPageFooter() const
Property: Whether to create a page footer.
Sawyer support library.