CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DocFormatHelper.h
Go to the documentation of this file.
1 #ifndef FWCore_ParameterSet_DocFormatHelper_h
2 #define FWCore_ParameterSet_DocFormatHelper_h
3 
4 // Used internally by ParameterSetDescription in its
5 // print function. This function is used to produce
6 // human readable documentation.
7 
8 #include <string>
9 #include <iosfwd>
10 
11 namespace edm {
12 
13  class ParameterDescriptionNode;
14 
16 
17  public:
18 
20  TOP,
21  OR,
22  XOR,
23  AND,
25  };
26 
28  brief_(false),
29  lineWidth_(80),
30  indentation_(4),
31  startColumn2_(24U),
32  section_(),
33  pass_(0),
34  column1_(0),
35  column2_(0),
36  column3_(0),
37  counter_(0),
38  parent_(OTHER)
39  { }
40 
41  void init();
42 
43  bool brief() const { return brief_; }
44  size_t lineWidth() const { return lineWidth_; }
45  int indentation() const { return indentation_; }
46  int startColumn2() const { return startColumn2_; }
47 
48  void setBrief(bool value) { brief_ = value; }
49  void setLineWidth(size_t value) { lineWidth_ = value; }
51 
52  std::string const& section() const { return section_; }
54 
55  int pass() const { return pass_; }
56  void setPass(int value) { pass_ = value; }
57 
58  size_t column1() const { return column1_; }
59  size_t column2() const { return column2_; }
60  size_t column3() const { return column3_; }
61 
62  void setAtLeast1(size_t width) { if (width > column1_) column1_ = width; }
63  void setAtLeast2(size_t width) { if (width > column2_) column2_ = width; }
64  void setAtLeast3(size_t width) { if (width > column3_) column3_ = width; }
65 
66  int counter() const { return counter_; }
67  void setCounter(int value) { counter_ = value; }
68  void incrementCounter() { ++counter_; }
69  void decrementCounter() { --counter_; }
70 
71  DescriptionParent parent() const { return parent_; }
73 
74  size_t commentWidth() const;
75 
76  static void wrapAndPrintText(std::ostream & os,
77  std::string const& text,
78  size_t indent,
79  size_t suggestedWidth);
80 
81  void indent(std::ostream & os) const;
82  void indent2(std::ostream & os) const;
83 
84  static int offsetModuleLabel() { return 2; }
85  static int offsetTopLevelPSet() { return 2; }
86  static int offsetSectionContent() { return 4; }
87 
88  private:
89 
90  bool brief_;
91  size_t lineWidth_;
93  size_t startColumn2_;
94 
96 
97  int pass_;
98 
99  size_t column1_;
100  size_t column2_;
101  size_t column3_;
102 
103  int counter_;
104 
106  };
107 }
108 #endif
static void wrapAndPrintText(std::ostream &os, std::string const &text, size_t indent, size_t suggestedWidth)
int startColumn2() const
DescriptionParent parent() const
void setCounter(int value)
size_t lineWidth() const
static int offsetModuleLabel()
int indentation() const
void setBrief(bool value)
void setAtLeast2(size_t width)
static int offsetSectionContent()
tuple text
Definition: runonSM.py:42
void indent2(std::ostream &os) const
void setPass(int value)
DescriptionParent parent_
size_t column2() const
size_t column3() const
void setAtLeast1(size_t width)
size_t column1() const
void setAtLeast3(size_t width)
volatile std::atomic< bool > shutdown_flag false
void indent(std::ostream &os) const
static int offsetTopLevelPSet()
void setSection(std::string const &value)
size_t commentWidth() const
void setParent(DescriptionParent value)
void setIndentation(int value)
void setLineWidth(size_t value)
std::string const & section() const