• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/programmer_reference/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>Release 4.0: C++ ostream objects</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
10    <link rel="up" href="upgrade_4_0_toc.html" title="Chapter��37.��Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0" />
11    <link rel="prev" href="upgrade_4_0_java.html" title="Release 4.0: Java CLASSPATH environment variable" />
12    <link rel="next" href="upgrade_4_0_asr.html" title="Release 4.0: application-specific recovery" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Release 4.0: C++ ostream objects</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="upgrade_4_0_java.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��37.��Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0</th>
23          <td width="20%" align="right">��<a accesskey="n" href="upgrade_4_0_asr.html">Next</a></td>
24        </tr>
25      </table>
26      <hr />
27    </div>
28    <div class="sect1" lang="en" xml:lang="en">
29      <div class="titlepage">
30        <div>
31          <div>
32            <h2 class="title" style="clear: both"><a id="upgrade_4_0_cxx"></a>Release 4.0: C++ ostream objects</h2>
33          </div>
34        </div>
35      </div>
36      <p>In the 4.0 release, the Berkeley DB C++ API has been changed to use the ISO
37standard C++ API in preference to the older, less portable interfaces,
38where available.  This means the Berkeley DB methods that used to take an
39ostream object as a parameter now expect a std::ostream.  Specifically,
40the following methods have changed:</p>
41      <pre class="programlisting">DbEnv::set_error_stream
42Db::set_error_stream
43Db::verify</pre>
44      <p>On many platforms, the old and the new C++ styles are interchangeable;
45on some platforms (notably Windows systems), they are incompatible. If
46your code uses these methods and you have trouble with the 4.0 release,
47you should update code that looks like this:</p>
48      <pre class="programlisting">#include &lt;iostream.h&gt;
49#include &lt;db_cxx.h&gt;
50
51void foo(Db db) {
52	db.set_error_stream(&amp;cerr);
53}</pre>
54      <p>to look like this:</p>
55      <pre class="programlisting">#include &lt;iostream&gt;
56#include &lt;db_cxx.h&gt;
57
58using std::cerr;
59
60void foo(Db db) {
61	db.set_error_stream(&amp;cerr);
62}</pre>
63    </div>
64    <div class="navfooter">
65      <hr />
66      <table width="100%" summary="Navigation footer">
67        <tr>
68          <td width="40%" align="left"><a accesskey="p" href="upgrade_4_0_java.html">Prev</a>��</td>
69          <td width="20%" align="center">
70            <a accesskey="u" href="upgrade_4_0_toc.html">Up</a>
71          </td>
72          <td width="40%" align="right">��<a accesskey="n" href="upgrade_4_0_asr.html">Next</a></td>
73        </tr>
74        <tr>
75          <td width="40%" align="left" valign="top">Release 4.0: Java CLASSPATH environment variable��</td>
76          <td width="20%" align="center">
77            <a accesskey="h" href="index.html">Home</a>
78          </td>
79          <td width="40%" align="right" valign="top">��Release 4.0: application-specific recovery</td>
80        </tr>
81      </table>
82    </div>
83  </body>
84</html>
85