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
|
<HTML>
<HEAD>
<TITLE>class toSQLParse</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class toSQLParse</h1>
</TD>
<TD valign="top" align="right" colspan="1"> A bunch of functions to parse and indent SQL text. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Definition</TH><TD><code>#include <<A HREF="tosqlparse_h.html">tosqlparse.h</A>></code></TD></TR>
<TR><TH><A HREF="full-list-toSQLParse.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Types</h4><ul><LI>struct <A HREF="toSQLParse__settings.html">settings</A>
</LI>
<LI>class <A HREF="toSQLParse__statement.html">statement</A>
</LI>
<LI>class <i><A HREF="toSQLParse__tokenizer.html">tokenizer</A></i>
</LI>
<LI>class <A HREF="toSQLParse__stringTokenizer.html">stringTokenizer</A>
</LI>
<LI>class <A HREF="toSQLParse__editorTokenizer.html">editorTokenizer</A>
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static std::list<statement> <b><A HREF="#ref6">parse</A></b> (tokenizer &tokens)
</LI>
<LI>static std::list<statement> <b><A HREF="#ref7">parse</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str)
</LI>
<LI>static std::list<statement> <b><A HREF="#ref8">parse</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
</LI>
<LI>static statement <b><A HREF="#ref9">parseStatement</A></b> (tokenizer &tokens)
</LI>
<LI>static statement <b><A HREF="#ref10">parseStatement</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str)
</LI>
<LI>static statement <b><A HREF="#ref11">parseStatement</A></b> (tokenizer &tokens,<A HREF="toConnection.html">toConnection</A> &conn)
</LI>
<LI>static statement <b><A HREF="#ref12">parseStatement</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref13">indent</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref14">indentStatement</A></b> (statement &stat,<A HREF="toConnection.html">toConnection</A> &conn,int level=0)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref15">indentStatement</A></b> (statement &stat,int level=0)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref16">indent</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref17">indentString</A></b> (int level)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref18">indent</A></b> (std::list<statement> &stat,<A HREF="toConnection.html">toConnection</A> &conn)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref19">indent</A></b> (std::list<statement> &stat)
</LI>
<LI>static int <b><A HREF="#ref20">countIndent</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,int &chars)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref21">indent</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &syntax)
</LI>
<LI>static <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <b><A HREF="#ref22">indent</A></b> (std::list<statement> &stat,<A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &syntax)
</LI>
<LI>static settings <b><A HREF="#ref26">getSetting</A></b> (void)
</LI>
<LI>static void <b><A HREF="#ref27">setSetting</A></b> (const settings &setting)
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> A bunch of functions to parse and indent SQL text.
</p>
<A NAME="toSQLParse__settings.html"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td><strong>settings</strong> <small>(struct)</small></td><td align="right"><h3><strong>settings</strong></h3></td></tr></table><p></p><A NAME="toSQLParse__statement.html"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td><strong>statement</strong> <small>(class)</small></td><td align="right"><h3><strong>statement</strong></h3></td></tr></table><p></p><p> Structure the statement is parsed into.
</p>
<A NAME="toSQLParse__tokenizer.html"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td><strong>tokenizer</strong> <small>(class)</small></td><td align="right"><h3><strong>tokenizer</strong></h3></td></tr></table><p></p><p> Abstract class to define a source of tokens for the parser.
</p>
<A NAME="toSQLParse__stringTokenizer.html"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td><strong>stringTokenizer</strong> <small>(class)</small></td><td align="right"><h3><strong>stringTokenizer</strong></h3></td></tr></table><p></p><p> Tokenizer class which gets tokens from a string.
</p>
<A NAME="toSQLParse__editorTokenizer.html"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td><strong>editorTokenizer</strong> <small>(class)</small></td><td align="right"><h3><strong>editorTokenizer</strong></h3></td></tr></table><p></p><p> Tokenizer class which gets tokens from an editor.
</p>
<A NAME="parse"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> std::list<statement> <strong>parse</strong> (tokenizer &tokens)
<br></td><td align="right"><h3><strong>parse</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Parse a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>tokens</i></TD><TD align="left" valign="top">Tokenizer provider to generate parsed tree from.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Parsed statement tree.
</p>
<A NAME="parse"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> std::list<statement> <strong>parse</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str)
<br></td><td align="right"><h3><strong>parse</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Parse a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to parse.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Parsed statement tree.
</p>
<A NAME="parse"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> std::list<statement> <strong>parse</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
<br></td><td align="right"><h3><strong>parse</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Parse a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to parse.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialect. (For future use)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Parsed statement tree.
</p>
<A NAME="parseStatement"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> statement <strong>parseStatement</strong> (tokenizer &tokens)
<br></td><td align="right"><h3><strong>parseStatement</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get one statement (or block) from the root of an editor or string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>tokens</i></TD><TD align="left" valign="top">Tokenizer to get tokens from.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialog. (For future use)
</TD></TR>
</TABLE></P>
<A NAME="parseStatement"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td> statement <strong>parseStatement</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str)
<br></td><td align="right"><h3><strong>parseStatement</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get one statement (or block) from the root of an editor or string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">Tokenizer to get tokens from.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialog. (For future use)
</TD></TR>
</TABLE></P>
<A NAME="parseStatement"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td> statement <strong>parseStatement</strong> (tokenizer &tokens,<A HREF="toConnection.html">toConnection</A> &conn)
<br></td><td align="right"><h3><strong>parseStatement</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get one statement (or block) from the root of an editor or string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>tokens</i></TD><TD align="left" valign="top">Tokenizer to get tokens from.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialog. (For future use)
</TD></TR>
</TABLE></P>
<A NAME="parseStatement"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td> statement <strong>parseStatement</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
<br></td><td align="right"><h3><strong>parseStatement</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get one statement (or block) from the root of an editor or string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">Tokenizer to get tokens from.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialog. (For future use)
</TD></TR>
</TABLE></P>
<A NAME="indent"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indent</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to indent.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="indentStatement"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indentStatement</strong> (statement &stat,<A HREF="toConnection.html">toConnection</A> &conn,int level=0)
<br></td><td align="right"><h3><strong>indentStatement</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a parse statement structure into a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>stat</i></TD><TD align="left" valign="top">Statement to indent.
</TD></TR>
<TR><TD align="left" valign="top"><i>level</i></TD><TD align="left" valign="top">Initial indentation level to use.
</TD></TR>
<TR><TD align="left" valign="top"><i>syntax</i></TD><TD align="left" valign="top">The syntax analyzer to use.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A string with the indented statement.
</p>
<A NAME="indentStatement"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indentStatement</strong> (statement &stat,int level=0)
<br></td><td align="right"><h3><strong>indentStatement</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a parse statement structure into a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>stat</i></TD><TD align="left" valign="top">Statement to indent.
</TD></TR>
<TR><TD align="left" valign="top"><i>level</i></TD><TD align="left" valign="top">Initial indentation level to use.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A string with the indented statement.
</p>
<A NAME="indent"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indent</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toConnection.html">toConnection</A> &conn)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to indent.
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialect. (For future use)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="indentString"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indentString</strong> (int level)
<br></td><td align="right"><h3><strong>indentString</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Create an indentation string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>level</i></TD><TD align="left" valign="top">Number of characters to indent.
</TD></TR>
</TABLE></P>
<A NAME="indent"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indent</strong> (std::list<statement> &stat,<A HREF="toConnection.html">toConnection</A> &conn)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">List of statements
</TD></TR>
<TR><TD align="left" valign="top"><i>conn</i></TD><TD align="left" valign="top">Connection to determine SQL dialect. (For future use)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="indent"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indent</strong> (std::list<statement> &stat)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>stat</i></TD><TD align="left" valign="top">List of statements
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="countIndent"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td> int <strong>countIndent</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,int &chars)
<br></td><td align="right"><h3><strong>countIndent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Count indentation level of a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to check.
</TD></TR>
<TR><TD align="left" valign="top"><i>chars</i></TD><TD align="left" valign="top">Position in string.
</TD></TR>
</TABLE></P>
<A NAME="indent"></A><A NAME="ref21"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indent</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &str,<A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &syntax)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String to indent.
</TD></TR>
<TR><TD align="left" valign="top"><i>syntax</i></TD><TD align="left" valign="top">Syntax analyzer to determine SQL dialect. (For future use)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="indent"></A><A NAME="ref22"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> <strong>indent</strong> (std::list<statement> &stat,<A HREF="toSyntaxAnalyzer.html">toSyntaxAnalyzer</A> &syntax)
<br></td><td align="right"><h3><strong>indent</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Indent a string.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>stat</i></TD><TD align="left" valign="top">List of statements
</TD></TR>
<TR><TD align="left" valign="top"><i>syntax</i></TD><TD align="left" valign="top">Syntax analyzer to determine SQL dialect. (For future use)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: An indented string.
</p>
<A NAME="getSetting"></A><A NAME="ref26"></A><table width="100%"><tr bgcolor="#eeeeee"><td> settings <strong>getSetting</strong> (void)
<br></td><td align="right"><h3><strong>getSetting</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get current settings.
</p>
<A NAME="setSetting"></A><A NAME="ref27"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>setSetting</strong> (const settings &setting)
<br></td><td align="right"><h3><strong>setSetting</strong></h3></td></tr></table><p> <small>[static]</small></p><p> Get current settings.
</p>
<HR>
<table>
<tr><td><small>Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|