32 #if !defined(MYSQLPP_SCOPEDCONNECTION_H)
33 #define MYSQLPP_SCOPEDCONNECTION_H
39 #if !defined(DOXYGEN_IGNORE)
41 class MYSQLPP_EXPORT Connection;
42 class MYSQLPP_EXPORT ConnectionPool;
48 class MYSQLPP_EXPORT ScopedConnection
60 explicit ScopedConnection(ConnectionPool& pool,
bool safe =
false);
68 Connection* operator->()
const {
return connection_; }
71 Connection& operator*()
const {
return *connection_; }
74 operator void*()
const {
return connection_; }
80 ScopedConnection(
const ScopedConnection& no_copies);
81 const ScopedConnection& operator=(
const ScopedConnection& no_copies);
83 ConnectionPool& pool_;
84 Connection*
const connection_;
89 #endif // !defined(MYSQLPP_SCOPEDCONNECTION_H)