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 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
|
<!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>MySQL++ Reference Manual</title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MySQL++ SSQLS v2 Translator: ParseV2::Option Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MySQL++ SSQLS v2 Translator
 <span id="projectnumber">3.2.5</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="classParseV2.html">ParseV2</a></li><li class="navelem"><a class="el" href="classParseV2_1_1Option.html">Option</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="#pro-static-methods">Static Protected Member Functions</a> |
<a href="classParseV2_1_1Option-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ParseV2::Option Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Base class for known SSQLS v2 'option' directives.
<a href="classParseV2_1_1Option.html#details">More...</a></p>
<p><code>#include <<a class="el" href="parsev2_8h_source.html">parsev2.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for ParseV2::Option:</div>
<div class="dyncontent">
<div class="center"><img src="classParseV2_1_1Option__inherit__graph.png" border="0" usemap="#ParseV2_1_1Option_inherit__map" alt="Inheritance graph"/></div>
<map name="ParseV2_1_1Option_inherit__map" id="ParseV2_1_1Option_inherit__map">
<area shape="rect" title="Base class for known SSQLS v2 'option' directives." alt="" coords="158,93,278,119"/>
<area shape="rect" href="classParseV2_1_1AccessorStyleOption.html" title="'option accessor_style' directive line" alt="" coords="339,5,542,31"/>
<area shape="rect" href="classParseV2_1_1ExceptionOnSchemaMismatchOption.html" title="'option exception_on_schema_mismatch' directive line" alt="" coords="338,55,543,93"/>
<area shape="rect" href="classParseV2_1_1HeaderExtensionOption.html" title="'option header_extension' directive line" alt="" coords="349,117,531,156"/>
<area shape="rect" href="classParseV2_1_1ImplementationExtensionOption.html" title="'option implementation_extension' directive line" alt="" coords="326,180,555,219"/>
<area shape="rect" href="classParseV2_1_1Line.html" title="Base class for parsed SSQLS v2 declaration lines." alt="" coords="5,93,110,119"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ParseV2::Option:</div>
<div class="dyncontent">
<div class="center"><img src="classParseV2_1_1Option__coll__graph.png" border="0" usemap="#ParseV2_1_1Option_coll__map" alt="Collaboration graph"/></div>
<map name="ParseV2_1_1Option_coll__map" id="ParseV2_1_1Option_coll__map">
<area shape="rect" title="Base class for known SSQLS v2 'option' directives." alt="" coords="5,79,124,104"/>
<area shape="rect" href="classParseV2_1_1Line.html" title="Base class for parsed SSQLS v2 declaration lines." alt="" coords="12,5,117,31"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a456be9380b3e3457794a6851fb9b7356"><td class="memItemLeft" align="right" valign="top"><a id="a456be9380b3e3457794a6851fb9b7356"></a>
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Option.html#a456be9380b3e3457794a6851fb9b7356">~Option</a> ()</td></tr>
<tr class="memdesc:a456be9380b3e3457794a6851fb9b7356"><td class="mdescLeft"> </td><td class="mdescRight">Virtual dtor, since this is a base class. <br /></td></tr>
<tr class="separator:a456be9380b3e3457794a6851fb9b7356"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classParseV2_1_1Line"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classParseV2_1_1Line')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classParseV2_1_1Line.html">ParseV2::Line</a></td></tr>
<tr class="memitem:aff17fe2a6e9ffca4cfc9590b43cd9015 inherit pub_methods_classParseV2_1_1Line"><td class="memItemLeft" align="right" valign="top"><a id="aff17fe2a6e9ffca4cfc9590b43cd9015"></a>
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Line.html#aff17fe2a6e9ffca4cfc9590b43cd9015">~Line</a> ()</td></tr>
<tr class="memdesc:aff17fe2a6e9ffca4cfc9590b43cd9015 inherit pub_methods_classParseV2_1_1Line"><td class="mdescLeft"> </td><td class="mdescRight">Virtual dtor, since this is a base class. <br /></td></tr>
<tr class="separator:aff17fe2a6e9ffca4cfc9590b43cd9015 inherit pub_methods_classParseV2_1_1Line"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7b009a7af2f3f28522ee4879cdc5a714 inherit pub_methods_classParseV2_1_1Line"><td class="memItemLeft" align="right" valign="top"><a id="a7b009a7af2f3f28522ee4879cdc5a714"></a>
virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Line.html#a7b009a7af2f3f28522ee4879cdc5a714">print</a> (std::ostream &os) const =0</td></tr>
<tr class="memdesc:a7b009a7af2f3f28522ee4879cdc5a714 inherit pub_methods_classParseV2_1_1Line"><td class="mdescLeft"> </td><td class="mdescRight">Print line's contents out to a stream in SSQLS v2 form. <br /></td></tr>
<tr class="separator:a7b009a7af2f3f28522ee4879cdc5a714 inherit pub_methods_classParseV2_1_1Line"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a53cc8e9341f541bb753b1c49eed14380"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classParseV2_1_1Option.html">Option</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Option.html#a53cc8e9341f541bb753b1c49eed14380">parse</a> (const <a class="el" href="classParseV2.html#a82c28f8cd009372d06cd0bd39927ff34">StringList</a> &tl, bool subdirective, const <a class="el" href="classParseV2_1_1File.html">File</a> &file)</td></tr>
<tr class="memdesc:a53cc8e9341f541bb753b1c49eed14380"><td class="mdescLeft"> </td><td class="mdescRight">Attempt to create an <a class="el" href="classParseV2_1_1Option.html" title="Base class for known SSQLS v2 'option' directives.">Option</a> object from information in the passed StringList. <a href="#a53cc8e9341f541bb753b1c49eed14380">More...</a><br /></td></tr>
<tr class="separator:a53cc8e9341f541bb753b1c49eed14380"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_static_methods_classParseV2_1_1Line"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classParseV2_1_1Line')"><img src="closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="classParseV2_1_1Line.html">ParseV2::Line</a></td></tr>
<tr class="memitem:aa826982abc96f7d5013440572a0dafe1 inherit pub_static_methods_classParseV2_1_1Line"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classParseV2_1_1Line.html">Line</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Line.html#aa826982abc96f7d5013440572a0dafe1">parse</a> (const <a class="el" href="classParseV2.html#a82c28f8cd009372d06cd0bd39927ff34">StringList</a> &tl, bool subdirective, const <a class="el" href="classParseV2_1_1File.html">File</a> &file)</td></tr>
<tr class="memdesc:aa826982abc96f7d5013440572a0dafe1 inherit pub_static_methods_classParseV2_1_1Line"><td class="mdescLeft"> </td><td class="mdescRight">Virtual ctor, creating one of our subclass objects based on what we're passed. <a href="classParseV2_1_1Line.html#aa826982abc96f7d5013440572a0dafe1">More...</a><br /></td></tr>
<tr class="separator:aa826982abc96f7d5013440572a0dafe1 inherit pub_static_methods_classParseV2_1_1Line"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aef17c339ffb010ead58c8a814317a7a6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Option.html#aef17c339ffb010ead58c8a814317a7a6">Option</a> (const std::string &<a class="el" href="classParseV2_1_1Option.html#ae0724c95b0f0e6282039742526183954">value</a>)</td></tr>
<tr class="memdesc:aef17c339ffb010ead58c8a814317a7a6"><td class="mdescLeft"> </td><td class="mdescRight">Protected ctor, so we cannot be directly instantiated. <a href="#aef17c339ffb010ead58c8a814317a7a6">More...</a><br /></td></tr>
<tr class="separator:aef17c339ffb010ead58c8a814317a7a6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae0724c95b0f0e6282039742526183954"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Option.html#ae0724c95b0f0e6282039742526183954">value</a> () const</td></tr>
<tr class="memdesc:ae0724c95b0f0e6282039742526183954"><td class="mdescLeft"> </td><td class="mdescRight">Return the option's value in string form, unmodified from the original parse. <a href="#ae0724c95b0f0e6282039742526183954">More...</a><br /></td></tr>
<tr class="separator:ae0724c95b0f0e6282039742526183954"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_methods_classParseV2_1_1Line"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classParseV2_1_1Line')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classParseV2_1_1Line.html">ParseV2::Line</a></td></tr>
<tr class="memitem:a7b9e9c446ef2a7985598b2f4cb0e2820 inherit pro_methods_classParseV2_1_1Line"><td class="memItemLeft" align="right" valign="top"><a id="a7b9e9c446ef2a7985598b2f4cb0e2820"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Line.html#a7b9e9c446ef2a7985598b2f4cb0e2820">Line</a> ()</td></tr>
<tr class="memdesc:a7b9e9c446ef2a7985598b2f4cb0e2820 inherit pro_methods_classParseV2_1_1Line"><td class="mdescLeft"> </td><td class="mdescRight">Protected ctor, to prevent instantiation. <br /></td></tr>
<tr class="separator:a7b9e9c446ef2a7985598b2f4cb0e2820 inherit pro_methods_classParseV2_1_1Line"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a75272b425b1f9a14b016083f31754b30"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1Option.html#a75272b425b1f9a14b016083f31754b30">parse_bool</a> (const std::string &<a class="el" href="classParseV2_1_1Option.html#ae0724c95b0f0e6282039742526183954">value</a>)</td></tr>
<tr class="memdesc:a75272b425b1f9a14b016083f31754b30"><td class="mdescLeft"> </td><td class="mdescRight">Convert a string expressing a boolean value to a <code>bool</code>. <a href="#a75272b425b1f9a14b016083f31754b30">More...</a><br /></td></tr>
<tr class="separator:a75272b425b1f9a14b016083f31754b30"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for known SSQLS v2 'option' directives. </p>
<p>There are subclasses for all known SSQLS v2 options, having the same name, but with different capitalization and an "Option" suffix. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="aef17c339ffb010ead58c8a814317a7a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef17c339ffb010ead58c8a814317a7a6">◆ </a></span>Option()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ParseV2::Option::Option </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Protected ctor, so we cannot be directly instantiated. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">value</td><td>the option's value </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a53cc8e9341f541bb753b1c49eed14380"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53cc8e9341f541bb753b1c49eed14380">◆ </a></span>parse()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classParseV2_1_1Option.html">ParseV2::Option</a> * ParseV2::Option::parse </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classParseV2.html#a82c28f8cd009372d06cd0bd39927ff34">StringList</a> & </td>
<td class="paramname"><em>tl</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>subdirective</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classParseV2_1_1File.html">File</a> & </td>
<td class="paramname"><em>file</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Attempt to create an <a class="el" href="classParseV2_1_1Option.html" title="Base class for known SSQLS v2 'option' directives.">Option</a> object from information in the passed StringList. </p>
<p>This is a kind of pre-processor for the <a class="el" href="classParseV2_1_1Option.html" title="Base class for known SSQLS v2 'option' directives.">Option</a> subclass's ctors, creating an object of one of those subclasses only if the given StringList makes sense, passing those values as ctor parameters. </p>
<p class="reference">References <a class="el" href="classParseV2_1_1File.html#a398eef7e1fe978865b26b24e8efb7443">ParseV2::File::parse_error()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classParseV2_1_1Line.html#aa826982abc96f7d5013440572a0dafe1">ParseV2::Line::parse()</a>.</p>
</div>
</div>
<a id="a75272b425b1f9a14b016083f31754b30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75272b425b1f9a14b016083f31754b30">◆ </a></span>parse_bool()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool ParseV2::Option::parse_bool </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert a string expressing a boolean value to a <code>bool</code>. </p>
<p>If we cannot recognize the value, we return true because SSQLS v2 options all default to false. The assumption is is that if the option directive is present, the value is most likely truthy.</p>
<p>As a consequence, the only thing this function recognizes is "0", "false", "no", and "off", with any mix of upper and lower case. All else is considered <code>true</code>. </p>
</div>
</div>
<a id="ae0724c95b0f0e6282039742526183954"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0724c95b0f0e6282039742526183954">◆ </a></span>value()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const char* ParseV2::Option::value </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the option's value in string form, unmodified from the original parse. </p>
<p>Subclasses typically either expose this function in their public interface with a different, more appropriate name, or they define a wholly different method returning a reduced or more type-safe version of this value. </p>
<p class="reference">Referenced by <a class="el" href="classParseV2_1_1HeaderExtensionOption.html#ab01027b479c78ab0ba43036d8f25ba0b">ParseV2::HeaderExtensionOption::extension()</a>, and <a class="el" href="classParseV2_1_1ImplementationExtensionOption.html#a5827f0777dbb37eab3d59b9955447769">ParseV2::ImplementationExtensionOption::extension()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="parsev2_8h_source.html">parsev2.h</a></li>
<li>parsev2.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 21 2019 05:32:22 for MySQL++ SSQLS v2 Translator by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
|