File: classParseV2_1_1File.html

package info (click to toggle)
mysql%2B%2B 3.2.5-2.3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,356 kB
  • sloc: cpp: 35,788; sh: 3,693; perl: 789; makefile: 728
file content (195 lines) | stat: -rwxr-xr-x 11,430 bytes parent folder | download | duplicates (3)
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
<!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::File 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
       &#160;<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&amp;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_1File.html">File</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classParseV2_1_1File-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ParseV2::File Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Holds information about an SSQLS v2 file we're parsing.  
 <a href="classParseV2_1_1File.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="parsev2_8h_source.html">parsev2.h</a>&gt;</code></p>
<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:a00e1ed751956f1c35bfbe1bf4025ca2e"><td class="memItemLeft" align="right" valign="top"><a id="a00e1ed751956f1c35bfbe1bf4025ca2e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1File.html#a00e1ed751956f1c35bfbe1bf4025ca2e">File</a> (const char *file_name)</td></tr>
<tr class="memdesc:a00e1ed751956f1c35bfbe1bf4025ca2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a file for reading, using the search path to file the file if the direct path isn't readable. <br /></td></tr>
<tr class="separator:a00e1ed751956f1c35bfbe1bf4025ca2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57054380470df2373f99236d7d6884bc"><td class="memItemLeft" align="right" valign="top"><a id="a57054380470df2373f99236d7d6884bc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1File.html#a57054380470df2373f99236d7d6884bc">error</a> (const std::string &amp;msg) const</td></tr>
<tr class="memdesc:a57054380470df2373f99236d7d6884bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Throw a <a class="el" href="classParseV2_1_1FileException.html" title="Exception object thrown to indicate a file I/O error.">FileException</a> containing the given message. <br /></td></tr>
<tr class="separator:a57054380470df2373f99236d7d6884bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec27eaef06e40671bbb8228c4fd29471"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1File.html#aec27eaef06e40671bbb8228c4fd29471">error</a> (const std::ostringstream &amp;msg) const</td></tr>
<tr class="separator:aec27eaef06e40671bbb8228c4fd29471"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add3240e9094fe7066e23c5e9f0051cb2"><td class="memItemLeft" align="right" valign="top"><a id="add3240e9094fe7066e23c5e9f0051cb2"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1File.html#add3240e9094fe7066e23c5e9f0051cb2">name</a> () const</td></tr>
<tr class="memdesc:add3240e9094fe7066e23c5e9f0051cb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the file's name. <br /></td></tr>
<tr class="separator:add3240e9094fe7066e23c5e9f0051cb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a398eef7e1fe978865b26b24e8efb7443"><td class="memItemLeft" align="right" valign="top"><a id="a398eef7e1fe978865b26b24e8efb7443"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1File.html#a398eef7e1fe978865b26b24e8efb7443">parse_error</a> (const std::string &amp;msg) const</td></tr>
<tr class="memdesc:a398eef7e1fe978865b26b24e8efb7443"><td class="mdescLeft">&#160;</td><td class="mdescRight">Throw a <a class="el" href="classParseV2_1_1ParseException.html" title="Exception object thrown by File::error() to report an SSQLS v2 parsing error.">ParseException</a> containing the given message and our stored info about the file name and current line. <br /></td></tr>
<tr class="separator:a398eef7e1fe978865b26b24e8efb7443"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b57fdcc906c83f0315b373f0e8e5763"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1File.html#a6b57fdcc906c83f0315b373f0e8e5763">parse_error</a> (const std::ostringstream &amp;msg) const</td></tr>
<tr class="separator:a6b57fdcc906c83f0315b373f0e8e5763"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c547ea1669eaba62bfe8e440427cb83"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classParseV2_1_1File.html#a8c547ea1669eaba62bfe8e440427cb83">read_line</a> (std::string &amp;line, bool &amp;subdirective)</td></tr>
<tr class="memdesc:a8c547ea1669eaba62bfe8e440427cb83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a line in from a file.  <a href="#a8c547ea1669eaba62bfe8e440427cb83">More...</a><br /></td></tr>
<tr class="separator:a8c547ea1669eaba62bfe8e440427cb83"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Holds information about an SSQLS v2 file we're parsing. </p>
<p>This class exists simply because there's so much file-related processing in the parser, and it's confusing to have it scattered about. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aec27eaef06e40671bbb8228c4fd29471"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec27eaef06e40671bbb8228c4fd29471">&#9670;&nbsp;</a></span>error()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ParseV2::File::error </td>
          <td>(</td>
          <td class="paramtype">const std::ostringstream &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section see"><dt>See also</dt><dd>error(const std::string&amp;) </dd></dl>

<p class="reference">References <a class="el" href="classParseV2_1_1File.html#a57054380470df2373f99236d7d6884bc">error()</a>.</p>

</div>
</div>
<a id="a6b57fdcc906c83f0315b373f0e8e5763"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b57fdcc906c83f0315b373f0e8e5763">&#9670;&nbsp;</a></span>parse_error()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ParseV2::File::parse_error </td>
          <td>(</td>
          <td class="paramtype">const std::ostringstream &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section see"><dt>See also</dt><dd>parse_error(const std::string&amp;) </dd></dl>

<p class="reference">References <a class="el" href="classParseV2_1_1File.html#a57054380470df2373f99236d7d6884bc">error()</a>.</p>

</div>
</div>
<a id="a8c547ea1669eaba62bfe8e440427cb83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c547ea1669eaba62bfe8e440427cb83">&#9670;&nbsp;</a></span>read_line()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ParseV2::File::read_line </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>subdirective</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a line in from a file. </p>
<p>We read the line from our internal file object, trimming any trailing comment. Does <em>not</em> trim whitespace; we depend on ParseV2::tokenize() to cope with that. Sets subdirective flag if we see leading whitespace before we trim it away, as indented lines are interpreted differently by <a class="el" href="classParseV2_1_1File.html" title="Holds information about an SSQLS v2 file we&#39;re parsing.">File</a>'s users.</p>
<dl class="section return"><dt>Returns</dt><dd>false if our internal file object is in an error condition on entering or exiting this function. </dd></dl>

<p class="reference">Referenced by <a class="el" href="classParseV2.html#a3d4d6a0732b282675a789f3d34447eda">ParseV2::ParseV2()</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:21 for MySQL++ SSQLS v2 Translator by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>