ROSE  0.9.10.69
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
TextMarkup & doingPageFooter(bool b)
Property: Whether to create a page footer.
Renders markup as plain text.
TextMarkup & doingPageHeader(bool b)
Property: Whether to create a page header.
Name space for the entire library.
Definition: Access.h:13
bool doingPageFooter() const
Property: Whether to create a page footer.
Base class for various documentation markup systems.
bool doingPageHeader() const
Property: Whether to create a page header.