ROSE  0.9.9.139
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 
13 namespace Sawyer {
14 namespace Document {
15 
20 class SAWYER_EXPORT TextMarkup: public BaseMarkup {
21  bool doPageHeader_, doPageFooter_;
22 public:
23  TextMarkup()
24  : doPageHeader_(true), doPageFooter_(true) {
25  init();
26  }
27 
28  virtual void emit(const std::string &doc) /*override*/;
29 
33  bool doingPageHeader() const { return doPageHeader_; }
34  TextMarkup& doingPageHeader(bool b) { doPageHeader_ = b; return *this; }
40  bool doingPageFooter() const { return doPageFooter_; }
41  TextMarkup& doingPageFooter(bool b) { doPageFooter_ = b; return *this; }
44 private:
45  void init();
46  std::string finalizeDocument(const std::string &s_);
47 };
48 
49 } // namespace
50 } // namespace
51 
52 #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:11
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.