~mysql/mysql-connector-cpp/trunk

« back to all changes in this revision

Viewing changes to test/unit/unit_fixture.h

  • Committer: Hemant Dangi
  • Date: 2014-12-17 16:28:39 UTC
  • Revision ID: hemant.dangi@oracle.com-20141217162839-sdbpj3fcwn5gxjxh
Bug #75251: Add C++11 support and replace (deprecated in C++11) auto_ptr

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
 
2
Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
The MySQL Connector/C++ is licensed under the terms of the GPLv2
5
5
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
33
33
#include <stdlib.h>
34
34
#include <cppconn/connection.h>
35
35
 
 
36
#include <boost/scoped_ptr.hpp>
 
37
 
36
38
namespace testsuite
37
39
{
38
40
/* TODO - document */
39
 
typedef std::auto_ptr<sql::Connection> Connection;
40
 
typedef std::auto_ptr<sql::PreparedStatement> PreparedStatement;
 
41
typedef boost::scoped_ptr<sql::Connection> Connection;
 
42
typedef boost::scoped_ptr<sql::PreparedStatement> PreparedStatement;
41
43
typedef sql::ParameterMetaData ParameterMetaData;
42
 
typedef std::auto_ptr<sql::Statement> Statement;
43
 
typedef std::auto_ptr<sql::Savepoint> Savepoint;
44
 
typedef std::auto_ptr<sql::ResultSet> ResultSet;
 
44
typedef boost::scoped_ptr<sql::Statement> Statement;
 
45
typedef boost::scoped_ptr<sql::Savepoint> Savepoint;
 
46
typedef boost::scoped_ptr<sql::ResultSet> ResultSet;
45
47
typedef sql::Driver Driver;
46
48
typedef sql::ResultSetMetaData ResultSetMetaData;
47
49
typedef sql::DatabaseMetaData DatabaseMetaData;
308
310
   * Returns a Connector/C++ connection object
309
311
   *
310
312
   * Note: you are responsible for handling the object, you might
311
 
   * want to use typedef std::auto_ptr<sql::Connection>con(getConnection())
 
313
   * want to use typedef boost::scoped_ptr<sql::Connection>con(getConnection())
312
314
   * or similar for convenience reasons.
313
315
   *
314
316
   * @throws SQLException &