File: Poco.Util.HelpFormatter.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (176 lines) | stat: -rw-r--r-- 13,358 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Util::HelpFormatter</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Util.html" class="namespace">Poco::Util</a></h1>
<h1 class="symbol">class HelpFormatter</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Util<br />
<b>Package:</b> Options<br />
<b>Header:</b> Poco/Util/HelpFormatter.h</p>
<h2>Description</h2>
<div class="description">
<p>This class formats a help message from an <a href="Poco.Util.OptionSet.html" title="class Poco::Util::OptionSet">OptionSet</a>. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Util.HelpFormatter.html#16596" title="Poco::Util::HelpFormatter::calcIndent()">calcIndent</a>, <a href="Poco.Util.HelpFormatter.html#16617" title="Poco::Util::HelpFormatter::clearWord()">clearWord</a>, <a href="Poco.Util.HelpFormatter.html#16582" title="Poco::Util::HelpFormatter::format()">format</a>, <a href="Poco.Util.HelpFormatter.html#16599" title="Poco::Util::HelpFormatter::formatOption()">formatOption</a>, <a href="Poco.Util.HelpFormatter.html#16597" title="Poco::Util::HelpFormatter::formatOptions()">formatOptions</a>, <a href="Poco.Util.HelpFormatter.html#16603" title="Poco::Util::HelpFormatter::formatText()">formatText</a>, <a href="Poco.Util.HelpFormatter.html#16612" title="Poco::Util::HelpFormatter::formatWord()">formatWord</a>, <a href="Poco.Util.HelpFormatter.html#16572" title="Poco::Util::HelpFormatter::getCommand()">getCommand</a>, <a href="Poco.Util.HelpFormatter.html#16581" title="Poco::Util::HelpFormatter::getFooter()">getFooter</a>, <a href="Poco.Util.HelpFormatter.html#16578" title="Poco::Util::HelpFormatter::getHeader()">getHeader</a>, <a href="Poco.Util.HelpFormatter.html#16589" title="Poco::Util::HelpFormatter::getIndent()">getIndent</a>, <a href="Poco.Util.HelpFormatter.html#16575" title="Poco::Util::HelpFormatter::getUsage()">getUsage</a>, <a href="Poco.Util.HelpFormatter.html#16586" title="Poco::Util::HelpFormatter::getWidth()">getWidth</a>, <a href="Poco.Util.HelpFormatter.html#16593" title="Poco::Util::HelpFormatter::isUnixStyle()">isUnixStyle</a>, <a href="Poco.Util.HelpFormatter.html#16595" title="Poco::Util::HelpFormatter::longPrefix()">longPrefix</a>, <a href="Poco.Util.HelpFormatter.html#16590" title="Poco::Util::HelpFormatter::setAutoIndent()">setAutoIndent</a>, <a href="Poco.Util.HelpFormatter.html#16570" title="Poco::Util::HelpFormatter::setCommand()">setCommand</a>, <a href="Poco.Util.HelpFormatter.html#16579" title="Poco::Util::HelpFormatter::setFooter()">setFooter</a>, <a href="Poco.Util.HelpFormatter.html#16576" title="Poco::Util::HelpFormatter::setHeader()">setHeader</a>, <a href="Poco.Util.HelpFormatter.html#16587" title="Poco::Util::HelpFormatter::setIndent()">setIndent</a>, <a href="Poco.Util.HelpFormatter.html#16591" title="Poco::Util::HelpFormatter::setUnixStyle()">setUnixStyle</a>, <a href="Poco.Util.HelpFormatter.html#16573" title="Poco::Util::HelpFormatter::setUsage()">setUsage</a>, <a href="Poco.Util.HelpFormatter.html#16584" title="Poco::Util::HelpFormatter::setWidth()">setWidth</a>, <a href="Poco.Util.HelpFormatter.html#16594" title="Poco::Util::HelpFormatter::shortPrefix()">shortPrefix</a></p>
<h2>Constructors</h2>
<h3><a name="16567">HelpFormatter</a></h3>
<p class="decl"><a href="Poco.Util.HelpFormatter.html" title="class Poco::Util::HelpFormatter">HelpFormatter</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Util.OptionSet.html" title="class Poco::Util::OptionSet">OptionSet</a> &amp; options<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Util.HelpFormatter.html" title="class Poco::Util::HelpFormatter">HelpFormatter</a>, using the given options.  </p>
<p>The <a href="Poco.Util.HelpFormatter.html" title="class Poco::Util::HelpFormatter">HelpFormatter</a> just stores a reference to the given <a href="Poco.Util.OptionSet.html" title="class Poco::Util::OptionSet">OptionSet</a>, so the <a href="Poco.Util.OptionSet.html" title="class Poco::Util::OptionSet">OptionSet</a> must not be destroyed during the lifetime of the <a href="Poco.Util.HelpFormatter.html" title="class Poco::Util::HelpFormatter">HelpFormatter</a>. </p>
</div>
<h2>Destructor</h2>
<h3><a name="16569">~HelpFormatter</a></h3>
<p class="decl">~<a href="Poco.Util.HelpFormatter.html" title="class Poco::Util::HelpFormatter">HelpFormatter</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Util.HelpFormatter.html" title="class Poco::Util::HelpFormatter">HelpFormatter</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="16582">format</a></h3>
<p class="decl">void format(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr<br />) const;</p>
<div class="description">
<p>Writes the formatted help text to the given stream. </p>
</div>
<h3><a name="16572">getCommand</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; getCommand() const;</p>
<div class="description">
<p>Returns the command name. </p>
</div>
<h3><a name="16581">getFooter</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; getFooter() const;</p>
<div class="description">
<p>Returns the footer string. </p>
</div>
<h3><a name="16578">getHeader</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; getHeader() const;</p>
<div class="description">
<p>Returns the header string. </p>
</div>
<h3><a name="16589">getIndent</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int getIndent() const;</p>
<div class="description">
<p>Returns the indentation for description continuation lines. </p>
</div>
<h3><a name="16575">getUsage</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; getUsage() const;</p>
<div class="description">
<p>Returns the usage string. </p>
</div>
<h3><a name="16586">getWidth</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int getWidth() const;</p>
<div class="description">
<p>Returns the line width for the formatted help text. </p>
<p>The default width is 72. </p>
</div>
<h3><a name="16593">isUnixStyle</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool isUnixStyle() const;</p>
<div class="description">
<p>Returns if Unix-style options are set. </p>
</div>
<h3><a name="16595">longPrefix</a></h3>
<p class="decl">std::string longPrefix() const;</p>
<div class="description">
<p>Returns the platform-specific prefix for long options. &quot;&mdash;&quot; on Unix, &quot;/&quot; on Windows and OpenVMS. </p>
</div>
<h3><a name="16590">setAutoIndent</a></h3>
<p class="decl">void setAutoIndent();</p>
<div class="description">
<p>Sets the indentation for description continuation lines so that the description text is left-aligned.  </p>
</div>
<h3><a name="16570">setCommand</a></h3>
<p class="decl">void setCommand(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; command<br />);</p>
<div class="description">
<p>Sets the command name. </p>
</div>
<h3><a name="16579">setFooter</a></h3>
<p class="decl">void setFooter(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; footer<br />);</p>
<div class="description">
<p>Sets the footer string. </p>
</div>
<h3><a name="16576">setHeader</a></h3>
<p class="decl">void setHeader(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; header<br />);</p>
<div class="description">
<p>Sets the header string. </p>
</div>
<h3><a name="16587">setIndent</a></h3>
<p class="decl">void setIndent(<br />&nbsp;&nbsp;&nbsp;&nbsp;int indent<br />);</p>
<div class="description">
<p>Sets the indentation for description continuation lines. </p>
</div>
<h3><a name="16591">setUnixStyle</a></h3>
<p class="decl">void setUnixStyle(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Enables Unix-style options. Both short and long option names are printed if Unix-style is set. Otherwise, only long option names are printed. </p>
<p>After calling <a href="Poco.Util.HelpFormatter.html#16591" title="Poco::Util::HelpFormatter::setUnixStyle()">setUnixStyle</a>(), <a href="Poco.Util.HelpFormatter.html#16590" title="Poco::Util::HelpFormatter::setAutoIndent()">setAutoIndent</a>() should be called as well to ensure proper help text formatting. </p>
</div>
<h3><a name="16573">setUsage</a></h3>
<p class="decl">void setUsage(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; usage<br />);</p>
<div class="description">
<p>Sets the usage string. </p>
</div>
<h3><a name="16584">setWidth</a></h3>
<p class="decl">void setWidth(<br />&nbsp;&nbsp;&nbsp;&nbsp;int width<br />);</p>
<div class="description">
<p>Sets the line width for the formatted help text. </p>
</div>
<h3><a name="16594">shortPrefix</a></h3>
<p class="decl">std::string shortPrefix() const;</p>
<div class="description">
<p>Returns the platform-specific prefix for short options. &quot;-&quot; on Unix, &quot;/&quot; on Windows and OpenVMS. </p>
</div>
<h3><a name="16596">calcIndent</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int calcIndent() const;</p>
<div class="description">
<p>Calculates the indentation for the option descriptions from the given options. </p>
</div>
<h3><a name="16617">clearWord</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void clearWord(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr,<br />&nbsp;&nbsp;&nbsp;&nbsp;int &amp; pos,<br />&nbsp;&nbsp;&nbsp;&nbsp;std::string &amp; word,<br />&nbsp;&nbsp;&nbsp;&nbsp;int indent<br />) const;</p>
<div class="description">
<p>Formats and then clears the given word. </p>
</div>
<h3><a name="16599">formatOption</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void formatOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Util.Option.html" title="class Poco::Util::Option">Option</a> &amp; option,<br />&nbsp;&nbsp;&nbsp;&nbsp;int width<br />) const;</p>
<div class="description">
<p>Formats an option, using the platform-specific prefixes. </p>
</div>
<h3><a name="16597">formatOptions</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void formatOptions(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr<br />) const;</p>
<div class="description">
<p>Formats all options. </p>
</div>
<h3><a name="16603">formatText</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void formatText(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; text,<br />&nbsp;&nbsp;&nbsp;&nbsp;int indent<br />) const;</p>
<div class="description">
<p>Formats the given text. </p>
</div>
<h3><a name="16607">formatText</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void formatText(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; text,<br />&nbsp;&nbsp;&nbsp;&nbsp;int indent,<br />&nbsp;&nbsp;&nbsp;&nbsp;int firstIndent<br />) const;</p>
<div class="description">
<p>Formats the given text. </p>
</div>
<h3><a name="16612">formatWord</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void formatWord(<br />&nbsp;&nbsp;&nbsp;&nbsp;std::ostream &amp; ostr,<br />&nbsp;&nbsp;&nbsp;&nbsp;int &amp; pos,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; word,<br />&nbsp;&nbsp;&nbsp;&nbsp;int indent<br />) const;</p>
<div class="description">
<p>Formats the given word. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>