head	1.1;
access;
symbols
	REL7_3_STABLE:1.1.0.2;
locks; strict;
comment	@# @;


1.1
date	2002.08.10.21.03.37;	author jtv;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Added Ray Dassen's Debian stuff, autoconf updates, and .cvsignore files;
added doxygen-generated reference documentation
@
text
@<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>cursor.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.16 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>cursor.h</h1><a href="cursor_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*-------------------------------------------------------------------------</font>
00002 <font class="comment"> *</font>
00003 <font class="comment"> *   FILE</font>
00004 <font class="comment"> *      pqxx/cursor.h</font>
00005 <font class="comment"> *</font>
00006 <font class="comment"> *   DESCRIPTION</font>
00007 <font class="comment"> *      definition of the pqxx::Cursor class.</font>
00008 <font class="comment"> *   pqxx::Cursor represents a database cursor.</font>
00009 <font class="comment"> *</font>
00010 <font class="comment"> * Copyright (c) 2001-2002, Jeroen T. Vermeulen &lt;jtv@@xs4all.nl&gt;</font>
00011 <font class="comment"> *</font>
00012 <font class="comment"> *-------------------------------------------------------------------------</font>
00013 <font class="comment"> */</font>
00014 <font class="preprocessor">#ifndef PQXX_CURSOR_H</font>
00015 <font class="preprocessor"></font><font class="preprocessor">#define PQXX_CURSOR_H</font>
00016 <font class="preprocessor"></font>
00017 <font class="preprocessor">#include "<a class="code" href="util_8h.html">pqxx/util.h</a>"</font>
00018 
00019 <font class="comment">/* (A quick note on binary cursors:</font>
00020 <font class="comment"> * These will require a lot of work.  First off, conversion to C++ datatypes</font>
00021 <font class="comment"> * becomes more complex.  Second, some tradeoffs will need to be made between</font>
00022 <font class="comment"> * dynamic (flexible) type handling and static (fast) type handling.)</font>
00023 <font class="comment"> */</font>
00024 
00025 <font class="comment">/* Methods tested in eg. self-test program test1 are marked with "//[t1]"</font>
00026 <font class="comment"> */</font>
00027 
00028 <font class="keyword">namespace </font>pqxx
00029 {
00030 <font class="keyword">class </font>Result;
00031 <font class="keyword">class </font>Transaction;
00032 
00034 
<a name="l00041"></a><a class="code" href="classpqxx_1_1Cursor.html">00041</a> <font class="keyword">class </font><a class="code" href="compiler_8h.html#a0">PQXX_LIBEXPORT</a> <a class="code" href="classpqxx_1_1Cursor.html">Cursor</a>
00042 {
00043 <font class="keyword">public</font>:
00045 
00053   <a class="code" href="classpqxx_1_1Cursor.html">Cursor</a>(<a class="code" href="classpqxx_1_1Transaction.html">Transaction</a> &amp;T,
00054          <font class="keyword">const</font> <font class="keywordtype">char</font> Query[], 
00055          PGSTD::string BaseName=<font class="stringliteral">"cur"</font>,
00056          <a class="code" href="namespacepqxx.html#a1">Result_size_type</a> Count=NEXT());                                <font class="comment">//[t3]</font>
00057 
00059   <a class="code" href="namespacepqxx.html#a1">Result_size_type</a> SetCount(<a class="code" href="namespacepqxx.html#a1">Result_size_type</a>);                          <font class="comment">//[t19]</font>
00060 
00062 
00064   <a class="code" href="classpqxx_1_1Result.html">Result</a> Fetch(<a class="code" href="namespacepqxx.html#a1">Result_size_type</a> Count);                                 <font class="comment">//[t19]</font>
00065 
00067   <font class="keywordtype">void</font> Move(<a class="code" href="namespacepqxx.html#a1">Result_size_type</a> Count);                                    <font class="comment">//[t3]</font>
00068 
00070 
<a name="l00074"></a><a class="code" href="classpqxx_1_1Cursor.html#d0">00074</a>   <font class="keyword">static</font> <a class="code" href="namespacepqxx.html#a1">Result_size_type</a> ALL() { <font class="keywordflow">return</font> <a class="code" href="namespacepqxx.html#a4">Result_size_type_max</a>; }        <font class="comment">//[t3]</font>
00075 
<a name="l00077"></a><a class="code" href="classpqxx_1_1Cursor.html#d1">00077</a>   <font class="keyword">static</font> <a class="code" href="namespacepqxx.html#a1">Result_size_type</a> NEXT() { <font class="keywordflow">return</font> 1; }                          <font class="comment">//[t19]</font>
00078 
<a name="l00080"></a><a class="code" href="classpqxx_1_1Cursor.html#d2">00080</a>   <font class="keyword">static</font> <a class="code" href="namespacepqxx.html#a1">Result_size_type</a> PRIOR() { <font class="keywordflow">return</font> -1; }                        <font class="comment">//[t19]</font>
00081 
00084 
<a name="l00088"></a><a class="code" href="classpqxx_1_1Cursor.html#d3">00088</a>   <font class="keyword">static</font> <a class="code" href="namespacepqxx.html#a1">Result_size_type</a> BACKWARD_ALL()                                <font class="comment">//[t19]</font>
00089         { <font class="keywordflow">return</font> <a class="code" href="namespacepqxx.html#a3">Result_size_type_min</a> + 1; }
00090 
00092 
00099   Cursor &amp;operator&gt;&gt;(Result &amp;);                                         <font class="comment">//[t3]</font>
00100 
<a name="l00102"></a><a class="code" href="classpqxx_1_1Cursor.html#a5">00102</a>   operator bool()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> !m_Done; }                             <font class="comment">//[t3]</font>
<a name="l00104"></a><a class="code" href="classpqxx_1_1Cursor.html#a6">00104</a> <font class="comment">  bool operator!() const { return m_Done; }                             //[t3]</font>
00105 
<a name="l00107"></a><a class="code" href="classpqxx_1_1Cursor.html#a7">00107</a>   <a class="code" href="classpqxx_1_1Cursor.html">Cursor</a> &amp;operator+=(<a class="code" href="namespacepqxx.html#a1">Result_size_type</a> N) { Move(N); <font class="keywordflow">return</font> *<font class="keyword">this</font>;}      <font class="comment">//[t19]</font>
<a name="l00109"></a><a class="code" href="classpqxx_1_1Cursor.html#a8">00109</a> <font class="comment">  Cursor &amp;operator-=(Result_size_type N) { Move(-N); return *this;}     //[t19]</font>
00110 
00111 <font class="keyword">private</font>:
00112   PGSTD::string MakeFetchCmd(<a class="code" href="namespacepqxx.html#a1">Result_size_type</a>) <font class="keyword">const</font>;
00113 
00114   <a class="code" href="classpqxx_1_1Transaction.html">Transaction</a> &amp;m_Trans;
00115   PGSTD::string m_Name;
00116   <a class="code" href="namespacepqxx.html#a1">Result_size_type</a> m_Count;
00117   <font class="keywordtype">bool</font> m_Done;
00118 
00119   <font class="comment">// Not allowed:</font>
00120   <a class="code" href="classpqxx_1_1Cursor.html">Cursor</a>(<font class="keyword">const</font> <a class="code" href="classpqxx_1_1Cursor.html">Cursor</a> &amp;);
00121   <a class="code" href="classpqxx_1_1Cursor.html">Cursor</a> &amp;operator=(<font class="keyword">const</font> <a class="code" href="classpqxx_1_1Cursor.html">Cursor</a> &amp;);
00122 };
00123 
00124 }
00125 
00126 <font class="preprocessor">#endif</font>
00127 <font class="preprocessor"></font>
</pre></div><hr><address align="right"><small>Generated on Sat Aug 10 21:52:38 2002 for libpqxx by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.16 </small></address>
</body>
</html>
@
