Author: wyoung
Date: Mon Jan 11 18:14:28 2010
New Revision: 2604
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2604&view=rev
Log:
Removed ScopedConnection default ctor, moving the comment explaining why
it was private and is now purposely missing into an \internal block on
existing explicit ctor.
Modified:
trunk/lib/scopedconnection.h
Modified: trunk/lib/scopedconnection.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/scopedconnection.h?rev=2604&r1=2603&r2=2604&view=diff
==============================================================================
--- trunk/lib/scopedconnection.h (original)
+++ trunk/lib/scopedconnection.h Mon Jan 11 18:14:28 2010
@@ -48,36 +48,35 @@
class MYSQLPP_EXPORT ScopedConnection
{
public:
- /// \brief Standard constructor
- ///
- /// Grabs a Connection from the specified pool.
- ///
- /// \param pool The ConnectionPool to use.
- explicit ScopedConnection(ConnectionPool& pool);
-
- /// \brief Destructor
- ///
- /// Releases the Connection back to the ConnectionPool.
- ~ScopedConnection();
+ /// \brief Standard constructor
+ ///
+ /// Grabs a Connection from the specified pool.
+ ///
+ /// \internal Note that there is no default ctor on purpose. RAII.
+ ///
+ /// \param pool The ConnectionPool to use.
+ explicit ScopedConnection(ConnectionPool& pool);
- /// \brief Access the Connection pointer
- Connection* operator->() const { return connection_; }
+ /// \brief Destructor
+ ///
+ /// Releases the Connection back to the ConnectionPool.
+ ~ScopedConnection();
- /// \brief Dereference
- Connection& operator*() const { return *connection_; }
+ /// \brief Access the Connection pointer
+ Connection* operator->() const { return connection_; }
+
+ /// \brief Dereference
+ Connection& operator*() const { return *connection_; }
private:
- // ScopedConnection objects must not be default-constructed. RAII.
- ScopedConnection();
-
- // ScopedConnection objects cannot be copied. We want them to be
+ // ScopedConnection objects cannot be copied. We want them to be
// tightly scoped to their use point, not put in containers or
// passed around promiscuously.
- ScopedConnection(const ScopedConnection& no_copies);
- const ScopedConnection& operator=(const ScopedConnection& no_copies);
+ ScopedConnection(const ScopedConnection& no_copies);
+ const ScopedConnection& operator=(const ScopedConnection& no_copies);
- ConnectionPool& pool_;
- Connection* const connection_;
+ ConnectionPool& pool_;
+ Connection* const connection_;
};
} // end namespace mysqlpp
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits