• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/docs/ref/upgrade.4.0/
1<!--$Id: cxx.so,v 1.3 2005/12/01 03:18:53 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB Reference Guide: Release 4.0: C++ ostream objects</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></b></td>
13<td align=right><a href="../upgrade.4.0/java.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.4.0/asr.html"><img src="../../images/next.gif" alt="Next"></a>
14</td></tr></table>
15<p align=center><b>Release 4.0: C++ ostream objects</b></p>
16<p>In the 4.0 release, the Berkeley DB C++ API has been changed to use the ISO
17standard C++ API in preference to the older, less portable interfaces,
18where available.  This means the Berkeley DB methods that used to take an
19ostream object as a parameter now expect a std::ostream.  Specifically,
20the following methods have changed:</p>
21<blockquote><pre>DbEnv::set_error_stream
22Db::set_error_stream
23Db::verify</pre></blockquote>
24<p>On many platforms, the old and the new C++ styles are interchangeable;
25on some platforms (notably Windows systems), they are incompatible. If
26your code uses these methods and you have trouble with the 4.0 release,
27you should update code that looks like this:</p>
28<blockquote><pre>#include &lt;iostream.h&gt;
29#include &lt;db_cxx.h&gt;
30<p>
31void foo(Db db) {
32	db.set_error_stream(&cerr);
33}</pre></blockquote>
34<p>to look like this:</p>
35<blockquote><pre>#include &lt;iostream&gt;
36#include &lt;db_cxx.h&gt;
37<p>
38using std::cerr;
39<p>
40void foo(Db db) {
41	db.set_error_stream(&cerr);
42}</pre></blockquote>
43<table width="100%"><tr><td><br></td><td align=right><a href="../upgrade.4.0/java.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.4.0/asr.html"><img src="../../images/next.gif" alt="Next"></a>
44</td></tr></table>
45<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
46</body>
47</html>
48