File: classSimpleDB_1_1Column.html

package info (click to toggle)
simpledb 1.5-1.4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze
  • size: 888 kB
  • ctags: 238
  • sloc: cpp: 529; makefile: 127; perl: 23; sh: 9
file content (255 lines) | stat: -rw-r--r-- 13,962 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Simple&amp;nbsp;C++&amp;nbsp;ODBC&amp;nbsp;Database&amp;nbsp;API: SimpleDB::Column Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <a class="qindex" href="examples.html">Examples</a></div>
<div class="nav">
<a class="el" href="namespaceSimpleDB.html">SimpleDB</a>::<a class="el" href="classSimpleDB_1_1Column.html">Column</a></div>
<h1>SimpleDB::Column Class Reference</h1>The abstract base class for the <a class="el" href="namespaceSimpleDB.html">SimpleDB</a> types.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="Column_8h-source.html">Column.h</a>&gt;</code>
<p>
Inheritance diagram for SimpleDB::Column:<p><center><img src="classSimpleDB_1_1Column__inherit__graph.png" border="0" usemap="#SimpleDB_1_1Column__inherit__map" alt="Inheritance graph"></center>
<map name="SimpleDB_1_1Column__inherit__map">
<area href="classSimpleDB_1_1BoolColumn.html" shape="rect" coords="8,83,168,107" alt="">
<area href="classSimpleDB_1_1LongColumn.html" shape="rect" coords="192,83,354,107" alt="">
<area href="classSimpleDB_1_1StringColumn.html" shape="rect" coords="378,83,546,107" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classSimpleDB_1_1Column-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#a0">isNull</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests if the current value is NULL.  <a href="#a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#a1">bind</a> (SQLHSTMT statementHandle, int columnNumber)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This abstract function is called by <a class="el" href="classSimpleDB_1_1Query.html">Query</a> when the <a class="el" href="classSimpleDB_1_1Query.html#a2">Query.bind</a> function is invoked.  <a href="#a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#a2">oStream</a> (std::ostream &amp;oStream)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function called to write a column value to the output stream.  <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#a3">~Column</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A virtual destructor that can be overridden if required.  <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="SimpleDB::Column::Column"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#a4">Column</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor used to set initial value of columnBound variable. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#a5">value</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is to be called by all derived classes to make sure the column was bound.  <a href="#a5"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0" doxytag="SimpleDB::Column::lengthOrIndex"></a>
SQLINTEGER&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#p0">lengthOrIndex</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The lengthOrIndex variable to be sent to the SQLBindCol function. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1" doxytag="SimpleDB::Column::bound"></a>
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#p1">bound</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicates weather this column has been bound to a query. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p2" doxytag="SimpleDB::Column::name"></a>
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column.html#p2">name</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Name that can be used. <br></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSimpleDB_1_1Column_1_1UnboundException.html">UnboundException</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classSimpleDB_1_1Exception.html">Exception</a> class.  <a href="classSimpleDB_1_1Column_1_1UnboundException.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The abstract base class for the <a class="el" href="namespaceSimpleDB.html">SimpleDB</a> types. 
<p>
This type contains the actual data as well as meta-data. <dl compact><dt><b>Examples: </b></dt><dd>

<p>
<a class="el" href="complete_8cpp-example.html#_a2">complete.cpp</a>, <a class="el" href="factory_8cpp-example.html#_a16">factory.cpp</a>, and <a class="el" href="simple_8cpp-example.html#_a26">simple.cpp</a>.</dl>
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a3" doxytag="SimpleDB::Column::~Column"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual SimpleDB::Column::~Column           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A virtual destructor that can be overridden if required. 
<p>
This can be used, for example, to deallocate memory.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a1" doxytag="SimpleDB::Column::bind"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual void SimpleDB::Column::bind           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">SQLHSTMT&nbsp;</td>
          <td class="mdname" nowrap> <em>statementHandle</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>columnNumber</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This abstract function is called by <a class="el" href="classSimpleDB_1_1Query.html">Query</a> when the <a class="el" href="classSimpleDB_1_1Query.html#a2">Query.bind</a> function is invoked. 
<p>
This function has an implementation that handles making sure columns are bound. This function should be called by any derived objects.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>statementHandle</em>&nbsp;</td><td>The statementHandle columns are being bound to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>columnNumber</em>&nbsp;</td><td>The column number to bind this column to.. </td></tr>
  </table>
</dl>

<p>
Implemented in <a class="el" href="classSimpleDB_1_1StringColumn.html#a3">SimpleDB::StringColumn</a>, <a class="el" href="classSimpleDB_1_1LongColumn.html#a1">SimpleDB::LongColumn</a>, and <a class="el" href="classSimpleDB_1_1BoolColumn.html#a1">SimpleDB::BoolColumn</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a0" doxytag="SimpleDB::Column::isNull"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual bool SimpleDB::Column::isNull           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Tests if the current value is NULL. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>True if the value is NULL. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="SimpleDB::Column::oStream"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual std::ostream&amp; SimpleDB::Column::oStream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">std::ostream &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>oStream</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Function called to write a column value to the output stream. 
<p>
This function is implemented by each column type to write the value in a suitable form to the output stream.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>oStream</em>&nbsp;</td><td>Output stream object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Output stream object to which data was written. </dd></dl>

<p>
Implemented in <a class="el" href="classSimpleDB_1_1StringColumn.html#a2">SimpleDB::StringColumn</a>, <a class="el" href="classSimpleDB_1_1LongColumn.html#a0">SimpleDB::LongColumn</a>, and <a class="el" href="classSimpleDB_1_1BoolColumn.html#a0">SimpleDB::BoolColumn</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="SimpleDB::Column::value"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void SimpleDB::Column::value           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This method is to be called by all derived classes to make sure the column was bound. 
<p>
It will cause an exception to be thrown if the column wasn't bound. 
<p>
Reimplemented in <a class="el" href="classSimpleDB_1_1StringColumn.html#a4">SimpleDB::StringColumn</a>, <a class="el" href="classSimpleDB_1_1LongColumn.html#a2">SimpleDB::LongColumn</a>, and <a class="el" href="classSimpleDB_1_1BoolColumn.html#a2">SimpleDB::BoolColumn</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Column_8h-source.html">Column.h</a></ul>
<hr>
<div align="right"><small>
Copyright (C) 2005 <a target="top" href="http://www.eminence.com.au">Eminence Technology Pty Ltd</a>.<br>
Documentation pages generated by doxygen.</small><br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=129109&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
</div>