📄 otl3_input_iterator.htm
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Sergei Kuchin">
<meta name="GENERATOR" content="Mozilla/4.77 [en] (Win95; U) [Netscape]">
<meta name="KeyWords" content="OTL, Oracle, ODBC, DB2, CLI, database API, C++, Template Library">
<title>OTL 4.0, STL-compliant iinput iterator</title>
</head>
<body>
<center>
<h1>
OTL 4.0, STL-compliant OTL input iterator</h1></center>
<h1>
STL-compliant OTL input iterator</h1>
<h1>
otl_input_iterator<T, Distance></h1>
<table CELLSPACING=0 CELLPADDING=0 WIDTH="100%" >
<tr>
<td ALIGN=LEFT><img SRC="iterator.gif" height=38 width=194></td>
<td ALIGN=RIGHT><img SRC="type.gif" height=39 width=194></td>
</tr>
<tr>
<td ALIGN=LEFT VALIGN=TOP><b>Category</b>: iterators</td>
<td ALIGN=RIGHT VALIGN=TOP><b>Component type</b>: type</td>
</tr>
</table>
<h3>
Description</h3>
<tt>otl_input_iterator</tt> is an <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a> that performs input of objects of type <tt>T</tt> from a particular
<a href="otl3_stream_class.htm">otl_stream</a>.
When end of stream is reached, the <tt>otl_input_iterator</tt> takes on
a special <i>end of stream</i> value, which is a past-the-end iterator.
Note that all of the restrictions of an <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a> must be obeyed, including the restrictions on the ordering
of <tt>operator*</tt> and <tt>operator++</tt> operations.
<h3>
Definition</h3>
Defined in the OTL header file.
<h3>
Template parameters</h3>
<table BORDER=2 >
<tr>
<th>Parameter </th>
<th>Description </th>
<th>Default </th>
</tr>
<tr>
<td VALIGN=TOP><tt>T</tt></td>
<td VALIGN=TOP>The <tt>otl_input_iterator</tt>'s value type. <tt>Operator*</tt>
returns a <tt>const T&</tt>. </td>
<td VALIGN=TOP> </td>
</tr>
<tr>
<td VALIGN=TOP><tt>Distance</tt></td>
<td VALIGN=TOP>The <tt>otl_input_iterator</tt>'s distance type. </td>
<td VALIGN=TOP><tt>ptrdiff_t</tt></td>
</tr>
</table>
<h3>
Model of</h3>
<a href="http://www.sgi.com/tech/stl/InputIterator.html">Input Iterator</a>
<h3>
Type requirements</h3>
The value type <tt>T</tt> must be a type such that <tt>s >> T</tt> is a
valid expression.
<p>The value type <tt>T</tt> must be a model of <a href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default
Constructible</a>.
<p>The distance type must, as described in the <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a> requirements, be a signed integral type.
<h3>
Public base classes</h3>
None.
<h3>
Members</h3>
<table BORDER=2 >
<tr>
<th>Member </th>
<th>Where defined </th>
<th>Description </th>
</tr>
<tr>
<td VALIGN=TOP><tt>otl_input_iterator()</tt></td>
<td VALIGN=TOP><tt>otl_input_iterator</tt></td>
<td VALIGN=TOP>See below. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>otl_input_iterator(otl_stream&)</tt></td>
<td VALIGN=TOP><tt>otl_input_iterator</tt></td>
<td VALIGN=TOP>See below. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>otl_input_iterator(const otl_input_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>otl_input_iterator& operator=(const otl_stream&)</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>const T& operator*() const</tt></td>
<td VALIGN=TOP><a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a></td>
<td VALIGN=TOP>Returns the next object in the stream. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>otl_input_iterator& operator++()</tt></td>
<td VALIGN=TOP><a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a></td>
<td VALIGN=TOP>Preincrement. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>otl_input_iterator& operator++(int)</tt></td>
<td VALIGN=TOP><a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a></td>
<td VALIGN=TOP>Postincrement. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>bool operator==(const otl_input_iterator&, const
otl_input_iterator&)</tt></td>
<td VALIGN=TOP><a href="http://www.sgi.com/tech/stl/trivial.html">Trivial
iterator</a></td>
<td VALIGN=TOP>The equality operator. This is a global function, not a
member function. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>input_iterator_tag iterator_category(const otl_input_iterator&)</tt></td>
<td VALIGN=TOP><a href="http://www.sgi.com/tech/stl/iterator_tags.html">iterator
tags</a></td>
<td VALIGN=TOP>Returns the iterator's category. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>T* value_type(const otl_input_iterator&)</tt></td>
<td VALIGN=TOP><a href="http://www.sgi.com/tech/stl/iterator_tags.html">iterator
tags</a></td>
<td VALIGN=TOP>Returns the iterator's value type. </td>
</tr>
<tr>
<td VALIGN=TOP><tt>Distance* distance_type(const otl_input_iterator&)</tt></td>
<td VALIGN=TOP><a href="http://www.sgi.com/tech/stl/iterator_tags.html">iterator
tags</a></td>
<td VALIGN=TOP>Returns the iterator's distance type. < </td>
</tr>
</table>
<h3>
New members</h3>
These members are not defined in the <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a> requirements, but are specific to <tt>otl_input_iterator</tt>.
<br>
<table BORDER=2 >
<tr>
<th>Function </th>
<th>Description </th>
</tr>
<tr>
<td VALIGN=TOP><tt>otl_input_iterator()</tt></td>
<td VALIGN=TOP>The default constructor: Constructs an end-of-stream iterator.
This is a past-the-end iterator, and it is useful when constructing a "range".</td>
</tr>
<tr>
<td VALIGN=TOP><tt>otl_input_iterator(otl_stream& s)</tt></td>
<td VALIGN=TOP>Creates an <tt>otl_input_iterator</tt> that reads values
from the OTL stream <tt>s</tt>. When <tt>s</tt> reaches end of stream,
this iterator will compare equal to an end-of-stream iterator created using
the default constructor. </td>
</tr>
</table>
<h3>
Notes</h3>
<h3>
See also</h3>
<a href="otl3_output_iterator.htm">otl_output_iterator</a>, <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
Iterator</a>, <a href="http://www.sgi.com/tech/stlOutputIterator.html">Output
Iterator</a>
<p>
<hr WIDTH="100%">
<center>
<p><a href="otl3.htm">Contents</a> <a href="home.htm">Go Home</a></center>
<p>Copyright © 1996, 2008, Sergei Kuchin, email: <a href="mailto:skuchin@aceweb.com">skuchin@aceweb.com</a>,
<a href="mailto:skuchin@gmail.com">skuchin@gmail.com</a>. <script Language="JavaScript"><!-- hide from oldgmailsers
var modDate = new Date(document.lastModified)
document.write("<i> Last Updated:</i> " + (modDate.getMonth()+1) + "/" +
modDate.getDate() + "/" + "0"+(modDate.getYear())%100+".");
//-->
</script>
<p><i>Permission to use, copy, modify and redistribute this document for
any purpose is hereby granted without fee, provided that the above copyright
notice appear in all copies.</i>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -