libpqxx
3.1.1
|
Reference-counted smart pointer to libpq-allocated object. More...
#include <util.hxx>
Public Types | |
typedef T | content_type |
Public Member Functions | |
PQAlloc () throw () | |
PQAlloc (const PQAlloc &rhs) throw () | |
~PQAlloc () throw () | |
PQAlloc & | operator= (const PQAlloc &rhs) throw () |
PQAlloc (T *obj) throw () | |
Assume ownership of a pointer. | |
void | swap (PQAlloc &rhs) throw () |
operator bool () const throw () | |
Is this pointer non-null? | |
bool | operator! () const throw () |
Is this pointer null? | |
T * | operator-> () const throw (std::logic_error) |
Dereference pointer. | |
T & | operator* () const throw (std::logic_error) |
Dereference pointer. | |
T * | get () const throw () |
Obtain underlying pointer. | |
void | reset () throw () |
Reference-counted smart pointer to libpq-allocated object.
Keep track of a libpq-allocated object, and free it once all references to it have died.
If the available PostgreSQL development files supply PQfreemem()
or PQfreeNotify()
, this is used to free the memory. If not, free() is used instead. This matters on Windows, where memory allocated by a DLL must be freed by the same DLL.
typedef T pqxx::internal::PQAlloc< T, DELETER >::content_type |
pqxx::internal::PQAlloc< T, DELETER >::PQAlloc | ( | ) | throw () |
pqxx::internal::PQAlloc< T, DELETER >::PQAlloc | ( | const PQAlloc< T, DELETER > & | rhs | ) | throw () |
pqxx::internal::PQAlloc< T, DELETER >::~PQAlloc | ( | ) | throw () |
|
explicit |
Assume ownership of a pointer.
T* pqxx::internal::PQAlloc< T, DELETER >::get | ( | ) | const throw () |
Obtain underlying pointer.
Ownership of the pointer's memory remains with the PQAlloc object
Referenced by pqxx::connection_base::esc_raw(), and pqxx::escape_binary().
pqxx::internal::PQAlloc< T, DELETER >::operator bool | ( | ) | const throw () |
Is this pointer non-null?
bool pqxx::internal::PQAlloc< T, DELETER >::operator! | ( | ) | const throw () |
Is this pointer null?
T& pqxx::internal::PQAlloc< T, DELETER >::operator* | ( | ) | const throw (std::logic_error) |
Dereference pointer.
Throws a logic_error if the pointer is null.
T* pqxx::internal::PQAlloc< T, DELETER >::operator-> | ( | ) | const throw (std::logic_error) |
Dereference pointer.
Throws a logic_error if the pointer is null.
Referenced by pqxx::internal::PQAlloc< const unsigned char >::operator*().
PQAlloc& pqxx::internal::PQAlloc< T, DELETER >::operator= | ( | const PQAlloc< T, DELETER > & | rhs | ) | throw () |
Referenced by pqxx::binarystring::binarystring().
void pqxx::internal::PQAlloc< T, DELETER >::reset | ( | ) | throw () |
void pqxx::internal::PQAlloc< T, DELETER >::swap | ( | PQAlloc< T, DELETER > & | rhs | ) | throw () |