File: toExtract__extractor.html

package info (click to toggle)
tora 1.3.21-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,252 kB
  • ctags: 10,397
  • sloc: cpp: 108,822; sh: 10,861; makefile: 766; xml: 69; perl: 6
file content (226 lines) | stat: -rw-r--r-- 15,242 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
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
<HTML>
<HEAD>
<TITLE>class extractor</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 extractor</h1>
		</TD>
		<TD valign="top" align="right" colspan="1"> This is an abstract class to implement part of an extractor for a database. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Full name</TH><TD><code><A HREF="toExtract.html">toExtract</A>::extractor</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="toextract_h.html">toextract.h</A>&gt;</code></TD></TR>
<TR><TH><A HREF="full-list-toExtract__extractor.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 Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref3">extractor</A></b> () 
</LI>
<LI>virtual  &nbsp;<b><A HREF="#ref4">~extractor</A></b> () 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref5">initialize</A></b> (<A HREF="toExtract.html">toExtract</A> &ext)  const
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref6">create</A></b> (<A HREF="toExtract.html">toExtract</A> &ext,
			<A HREF="/usr/lib/qt3/doc/html/qtextstream.html">QTextStream</A> &stream,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &schema,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &name)  const
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref7">describe</A></b> (<A HREF="toExtract.html">toExtract</A> &ext,
			  std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &lst,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &schema,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &name)  const
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref8">migrate</A></b> (<A HREF="toExtract.html">toExtract</A> &ext,
			 <A HREF="/usr/lib/qt3/doc/html/qtextstream.html">QTextStream</A> &stream,
			 const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
			 std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &src,
			 std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &dst)  const
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref9">drop</A></b> (<A HREF="toExtract.html">toExtract</A> &ext,
		      <A HREF="/usr/lib/qt3/doc/html/qtextstream.html">QTextStream</A> &stream,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &schema,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &name)  const
</LI>
<LI>virtual  std::list<datatype> &nbsp;<b><A HREF="#ref10">datatypes</A></b> ()  const
</LI>
</ul><h4>Protected Methods</h4><ul><LI>void &nbsp;<b><A HREF="#ref1">registerExtract</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &db,
			 const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &oper,
			 const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref2">unregisterExtract</A></b> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &db,
			   const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &oper,
			   const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type) 
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> This is an abstract class to implement part of an extractor for a database. Observe
 that an extractor must be stateless and threadsafe except for constructors and
 destructors. Use the toExtract::context function for saving context.
   </p>
<A NAME="registerExtract"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>registerExtract</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &db,
			 const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &oper,
			 const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type)
<br></td><td align="right"><h3><strong>registerExtract</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> Register an operation to be handled by this extractor.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>db</i></TD><TD align="left" valign="top">Database this extractor works on.
</TD></TR>
<TR><TD align="left" valign="top"><i>oper</i></TD><TD align="left" valign="top">What kind of operation to implement. Can be one of CREATE,
             DESCRIBE, MIGRATE or DROP.
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">The type of object that this is implemented for. Database specific.
     </TD></TR>
</TABLE></P>
<A NAME="unregisterExtract"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>unregisterExtract</strong> (const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &db,
			   const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &oper,
			   const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type)
<br></td><td align="right"><h3><strong>unregisterExtract</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> Unregister an operation to be handled by this extractor.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>db</i></TD><TD align="left" valign="top">Database this extractor works on.
</TD></TR>
<TR><TD align="left" valign="top"><i>oper</i></TD><TD align="left" valign="top">What kind of operation to implement. Can be one of CREATE,
             DESCRIBE, MIGRATE or DROP.
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">The type of object that this is implemented for. Database specific.
     </TD></TR>
</TABLE></P>
<A NAME="extractor"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>extractor</strong> ()
<br></td><td align="right"><h3><strong>extractor</strong></h3></td></tr></table><p></p><p> Create an extractor. Normally called from a statical instantiator. Should register
 objects it can handle <A HREF="toExtract__extractor.html#registerExtract">registerExtract</A>. Apart from the objects it handles one
 extractor per database can also register an empty operation and type parameter to
 <A HREF="toExtract__extractor.html#registerExtract">registerExtract</A> which will be called to initialize an extractor once per
 constructed toExtract object.
 operation. 
     </p>
<A NAME="~extractor"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> &nbsp;<strong>~extractor</strong> ()
<br></td><td align="right"><h3><strong>~extractor</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p> Destructor.
     </p>
<A NAME="initialize"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>initialize</strong> (<A HREF="toExtract.html">toExtract</A> &ext)
<br></td><td align="right"><h3><strong>initialize</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> Initiate an extractor for a given connection. Can be used to set up states necessary
 for further processing. Should probably set blocksize to be used for resizing (toExtract::setBlocksize).
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ext</i></TD><TD align="left" valign="top">Extractor to generate script.
     </TD></TR>
</TABLE></P>
<A NAME="create"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>create</strong> (<A HREF="toExtract.html">toExtract</A> &ext,
			<A HREF="/usr/lib/qt3/doc/html/qtextstream.html">QTextStream</A> &stream,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &schema,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,
			const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &name)
<br></td><td align="right"><h3><strong>create</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> Called to generate a script to recreate a database object.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ext</i></TD><TD align="left" valign="top">Extractor to generate script.
</TD></TR>
<TR><TD align="left" valign="top"><i>stream</i></TD><TD align="left" valign="top">Stream to write script to.
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">Type of object to recreate.
</TD></TR>
<TR><TD align="left" valign="top"><i>schema</i></TD><TD align="left" valign="top">Specify the schema of the output script or description. If empty
               don't specify any object. If the string "1" use same object as input.
               Otherwise use the specified schema.
</TD></TR>
<TR><TD align="left" valign="top"><i>owner</i></TD><TD align="left" valign="top">Owner of database object.
</TD></TR>
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of database object.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A string containing a script to recreate an object.
     </p>
<A NAME="describe"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>describe</strong> (<A HREF="toExtract.html">toExtract</A> &ext,
			  std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &lst,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &schema,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,
			  const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &name)
<br></td><td align="right"><h3><strong>describe</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> Called to describe a database object.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ext</i></TD><TD align="left" valign="top">Extractor to generate script.
</TD></TR>
<TR><TD align="left" valign="top"><i>lst</i></TD><TD align="left" valign="top">List of descriptions for the object. Should be appended.
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">Type of object to recreate.
</TD></TR>
<TR><TD align="left" valign="top"><i>schema</i></TD><TD align="left" valign="top">Specify the schema of the output script or description. If empty
               don't specify any object. If the string "1" use same object as input.
               Otherwise use the specified schema.
</TD></TR>
<TR><TD align="left" valign="top"><i>owner</i></TD><TD align="left" valign="top">Owner of database object.
</TD></TR>
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of database object.
     </TD></TR>
</TABLE></P>
<A NAME="migrate"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>migrate</strong> (<A HREF="toExtract.html">toExtract</A> &ext,
			 <A HREF="/usr/lib/qt3/doc/html/qtextstream.html">QTextStream</A> &stream,
			 const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
			 std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &src,
			 std::list<<A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A>> &dst)
<br></td><td align="right"><h3><strong>migrate</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> Called to generate a script to migrate a database object from one description to
 another description.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ext</i></TD><TD align="left" valign="top">Extractor to generate script.
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">Type of object to migrate.
</TD></TR>
<TR><TD align="left" valign="top"><i>src</i></TD><TD align="left" valign="top">Source description list.
</TD></TR>
<TR><TD align="left" valign="top"><i>dst</i></TD><TD align="left" valign="top">Destination description list.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A script to change the src database object to dst.
     </p>
<A NAME="drop"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>drop</strong> (<A HREF="toExtract.html">toExtract</A> &ext,
		      <A HREF="/usr/lib/qt3/doc/html/qtextstream.html">QTextStream</A> &stream,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &type,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &schema,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &owner,
		      const <A HREF="/usr/lib/qt3/doc/html/qstring.html">QString</A> &name)
<br></td><td align="right"><h3><strong>drop</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> Called to generate a script to drop an object.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>ext</i></TD><TD align="left" valign="top">Extractor to generate script.
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">Type of object to recreate.
</TD></TR>
<TR><TD align="left" valign="top"><i>schema</i></TD><TD align="left" valign="top">Specify the schema of the output script or description. If empty
               don't specify any object. If the string "1" use same object as input.
               Otherwise use the specified schema.
</TD></TR>
<TR><TD align="left" valign="top"><i>owner</i></TD><TD align="left" valign="top">Owner of database object.
</TD></TR>
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of database object.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A string containing a script to recreate an object.
     </p>
<A NAME="datatypes"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td> std::list<datatype> &nbsp;<strong>datatypes</strong> ()
<br></td><td align="right"><h3><strong>datatypes</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> Get the available datatypes for the database.
     </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>