ROSE  0.11.96.11
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://github.com/matzke1/sawyer.
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 
14 namespace Sawyer {
15 namespace Document {
16 
21 class SAWYER_EXPORT TextMarkup: public BaseMarkup {
22  bool doPageHeader_, doPageFooter_;
23 public:
24  TextMarkup()
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; }
45 private:
46  void init();
47  std::string finalizeDocument(const std::string &s_);
48 };
49 
50 } // namespace
51 } // namespace
52 
53 #endif
Sawyer::Document::TextMarkup::doingPageHeader
TextMarkup & doingPageHeader(bool b)
Property: Whether to create a page header.
Definition: DocumentTextMarkup.h:35
Sawyer::Document::TextMarkup::doingPageFooter
bool doingPageFooter() const
Property: Whether to create a page footer.
Definition: DocumentTextMarkup.h:41
Sawyer::Document::TextMarkup::doingPageHeader
bool doingPageHeader() const
Property: Whether to create a page header.
Definition: DocumentTextMarkup.h:34
Sawyer::Document::BaseMarkup
Base class for various documentation markup systems.
Definition: DocumentBaseMarkup.h:18
Sawyer::Document::TextMarkup::doingPageFooter
TextMarkup & doingPageFooter(bool b)
Property: Whether to create a page footer.
Definition: DocumentTextMarkup.h:42
Sawyer
Name space for the entire library.
Definition: Access.h:13
Sawyer::Document::TextMarkup
Renders markup as plain text.
Definition: DocumentTextMarkup.h:21