db_iterator.htm
来自「The goal of this library is to make ODBC」· HTM 代码 · 共 623 行 · 第 1/2 页
HTM
623 行
<html>
<head>
<style>
CODE {COLOR: #990000;}
.code{COLOR: #990000}
.codeComment{COLOR: #008000}
.codeHighlight{BACKGROUND-COLOR: #FFFF00}
.codeFileName{FONT-WEIGHT: bold;}
</style>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Gradman">
<meta name="KeyWords"
content="DTL, Oracle, ODBC, database API, C++, Template Library">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<!--
-- Copyright 2000
-- Michael Gradman & Corwin Joy
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Corwin Joy & Michael Gradman make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
--
--
-- Copyright (c) 1996-1999
-- Silicon Graphics Computer Systems, Inc.
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
--
-- Copyright (c) 1994
-- Hewlett-Packard Company
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Hewlett-Packard Company makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
--
-->
<!-- Generated by htmldoc -->
<title>DB_iterator<DataObj, ParamObj></title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000EE"
vlink="#551A8B" alink="#FF0000">
<p><font size="6" face="Bookman Old Style"><em><strong><u>dtl</u></strong></em></font></p>
<p><img src="stat.gif" width="6" height="6"> <!--end header--> <br>
</p>
<h1>DB_iterator<DataObj, ParamObj></h1>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="iterator.gif" width="194" height="38"></td>
<td align="right"><img src="type.gif" width="194"
height="39"></td>
</tr>
<tr>
<td valign="top"><b>Category</b>: iterators</td>
<td align="right" valign="top"><b>Component type</b>:
type</td>
</tr>
</table>
<h3>Description</h3>
<p><tt>DB_iterator</tt><font size="2" face="Courier New"><DataObj,
ParamObj></font><tt>::iterator</tt> is an abstract base class
that manipulates objects of type <font size="2"
face="Courier New">DataObj</font> with a particular <font
size="2" face="Courier New">DBView</font><font size="2"> </font>(and
thus the database). The SQL query used by the iterator is
generated automatically based on the <font size="2"
face="Courier New">DBView </font><font size="3">and postfix
parameters specified by the </font><font size="2"
face="Courier New">BPA. </font><font size="3">Each of the
subclasses of </font><font size="2" face="Courier New">DB_iterator </font><font size="3"
face="Times New Roman">generates the type of SQL query as
suggested by its name. </font>There are four classes that
inherit from <font size="2" face="Courier New">DB_iterator: </font></p>
<ul>
<li><a href="DBView.htm"><font size="2" face="Courier New">DBView</font></a><font
size="2" face="Courier New"><DataObj, ParamObj>::</font><a
href="select_iterator.htm"><font size="2"
face="Courier New">select_iterator</font></a> - reads <font
size="2" face="Courier New">DataObj's</font> from the
database - <a
href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a></li>
<li><a href="DBView.htm"><font size="2" face="Courier New">DBView</font></a><font
size="2" face="Courier New"><DataObj, ParamObj>::</font><a
href="insert_iterator.htm"><font size="2"
face="Courier New">insert_iterator</font></a> - inserts <font
size="2" face="Courier New">DataObj's</font> into the
database - <a
href="http://www.sgi.com/tech/stl/OutputIterator.html">Output
Iterator</a></li>
<li><a href="DBView.htm"><font size="2" face="Courier New">DBView</font></a><font
size="2" face="Courier New"><DataObj, ParamObj>::</font><a
href="update_iterator.htm"><font size="2"
face="Courier New">update_iterator</font></a> - updates <font
size="2" face="Courier New">DataObj's</font> in the
database - <a
href="http://www.sgi.com/tech/stl/OutputIterator.html">Output
Iterator</a></li>
<li><a href="DBView.htm"><font size="2" face="Courier New">DBView</font></a><font
size="2" face="Courier New"><DataObj, ParamObj>::</font><a
href="delete_iterator.htm"><font size="2"
face="Courier New">delete_iterator</font></a> - deletes <font
size="2" face="Courier New">DataObj's </font>from the
database - <a
href="http://www.sgi.com/tech/stl/OutputIterator.html">Output
Iterator</a></li>
</ul>
<p> All of these subclasses inherit from the <font size="2" face="Courier New">std::iterator</font>
template defined in the C++
standard library and thus support the public typedefs <font size="2" face="Courier New">
DB_iterator::iterator_category, DB_iterator::value_type, DB_iterator::distance_type,
DB_iterator::pointer, </font> and <font size="2" face="Courier New">DB_iterator::reference</font>.</p>
<h3>Definition</h3>
<p>Defined in the <font size="2" face="Courier New">iterator.h</font>
header file. </p>
<h3>Example</h3>
<p>Inapplicable - abstract base class.</p>
<h3>Template parameters</h3>
<table border="1">
<tr>
<th>Parameter </th>
<th>Description </th>
<th>Default </th>
</tr>
<tr>
<td valign="top"><tt>DataObj</tt> </td>
<td valign="top">The type of object that will be written
to the <font size="2" face="Courier New">DBView</font>.
This object will be bound through use of the <font
size="1" face="Courier New">BCA</font><font size="2"> </font>to
the appropriate columns in the database. The set of value
types of an <tt>DBView::insert_iterator</tt> consists of
a single type, <font size="2" face="Courier New">DataObj</font>.
</td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>ParamObj</tt> </td>
<td valign="top">The type of object that will be used to
specify the postfix parameters to the <font size="2"
face="Courier New">DBView</font>.</td>
<td valign="top"><font size="2" face="Courier New">DefaultParamObj<DataObj></font>
</td>
</tr>
</table>
<h3>Model of</h3>
<p><a href="http://www.sgi.com/tech/stl/trivial.html">Trivial
Iterator</a>.</p>
<h3>Type requirements</h3>
<p><font size="2" face="Courier New">DataObj </font>and <font
size="2" face="Courier New">ParamObj</font> must each fulfill the
following requirements:. </p>
<ul>
<li>Be of a type that is not primitive or of type <font
size="2" face="Courier New">string</font><font size="2">.</font></li>
<li><font size="3">Have a publicly accessible copy
constructor (the default is OK).</font></li>
<li><font size="3">Have a publicly accessible assignment
operator (the default is OK).</font></li>
</ul>
<h3>Public base classes</h3>
<p><font size="2" face="Courier New">dtl_ios_base.</font></p>
<h3>Members</h3>
<table border="1">
<tr>
<th>Member </th>
<th>Where defined </th>
<th>Description </th>
</tr>
<tr>
<td valign="top"><tt>DB_iterator()</tt> </td>
<td valign="top"><tt>DB_iterator</tt> </td>
<td valign="top"><font size="3">Default constructor.</font></td>
</tr>
<tr>
<td valign="top"><tt>DB_iterator(DBView<DataObj,
ParamObj> &view)</tt> </td>
<td valign="top"><tt>DB_iterator</tt> </td>
<td valign="top"><font size="3">See below.</font></td>
</tr>
<tr>
<td valign="top"><tt>DB_iterator(const DB_iterator&)</tt>
</td>
<td valign="top"><a
href="http://www.sgi.com/tech/stl/trivial.html">Trivial
Iterator</a></td>
<td valign="top">The copy constructor.</td>
</tr>
<tr>
<td valign="top"><tt>DB_iterator& operator=(const
DB_iterator<DataObj, ParamObj>&)</tt> </td>
<td valign="top"><a
href="http://www.sgi.com/tech/stl/trivial.html">Trivial
Iterator</a> </td>
<td valign="top">The assignment operator </td>
</tr>
<tr>
<td valign="top"><tt>DataObj &operator*()</tt> or <tt> const DataObj
&operator*() const</tt></td>
<td valign="top"><a
href="http://www.sgi.com/tech/stl/trivial.html">Trivial
Iterator</a></td>
<td valign="top">Dereferencing operator. Returns (a
reference to) the <font size="2" face="Courier New">DataObj
</font><font size="3">pointed to in the </font><font
size="2" face="Courier New">DBView</font><font size="3">.
See Note </font><a href="#2"><font size="3">[2]</font></a><font
size="3">.</font></td>
</tr>
<tr>
<td valign="top"><tt>DB_iterator& operator++()</tt> </td>
<td valign="top"><a
href="http://www.sgi.com/tech/stl/trivial.html">Trivial
Iterator</a></td>
<td valign="top">Preincrement.<font size="2"
face="Courier New"> </font><font size="3">See Note </font><a
href="#1"><font size="3">[1]</font></a><font size="3">.</font></td>
</tr>
<tr>
<td valign="top"><tt>const DB_iterator operator++(int)</tt>
</td>
<td valign="top"><a
href="http://www.sgi.com/tech/stl/trivial.html">Trivial
Iterator</a></td>
<td valign="top">Postincrement. <font size="3">See Note </font><a
href="#1"><font size="3">[1]</font></a><font size="3">.</font></td>
</tr>
<tr>
<td valign="top"><tt>CountedPtr<DataObj> *operator->()</tt> </td>
<td valign="top"><a
href="http://www.sgi.com/tech/stl/trivial.html">Trivial
Iterator</a></td>
<td valign="top">Dereferencing operator. Returns a
pointer to the <font size="1" face="Courier New">DataObj </font><font
size="3">pointed to by the </font><font size="2"
face="Courier New">DBView</font><font size="3">.</font><font size="3">.
See Note </font><a href="#2"><font size="3">[2]</font></a><font
size="3">.</font></td>
</tr>
<tr>
<td valign="top"><font size="2" face="Courier New">ParamObj
&Params()</font></td>
<td valign="top"><font size="2" face="Courier New">DB_iterator</font></td>
<td valign="top">See below.</td>
</tr>
<tr>
<td valign="top"><font size="2" face="Courier New">void
Params(const ParamObj &params)</font></td>
<td valign="top"><font size="2" face="Courier New">DB_iterator</font></td>
<td valign="top">See below.</td>
</tr>
<tr>
<td valign="top"><font size="2" face="Courier New">const
DBView<DataObj, ParamObj> &GetView()</font></td>
<td valign="top"><font size="2" face="Courier New">DB_iterator</font></td>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?