odbcpp::smartptr< T > Class Template Reference
Ensure proper management of objects.
More...
#include <object.h>
List of all members.
Public Member Functions |
| operator bool () const |
| Check whetehr the pointer is null (false) or not (true).
|
| operator T * () |
| Cast to the bare pointer.
|
| operator T * () const |
| Cast to the bare pointer as a const pointer.
|
bool | operator! () const |
| Check whether the pointer is null (true) or not (false).
|
T * | operator-> () |
| Return the bare pointer.
|
const T * | operator-> () const |
| Return the bare pointer as a const pointer.
|
smartptr & | operator= (const smartptr &ptr) |
| Copy a smart pointer into this smart pointer.
|
smartptr & | operator= (T *obj) |
| Set the smart pointer with another, same as reset(obj).
|
bool | operator== (const smartptr &ptr) const |
| Compare two smart pointers (what they point too).
|
bool | operator== (const T &obj) const |
| Compare this smart pointer with a bare reference.
|
bool | operator== (const T *obj) const |
| Compare this smart pointer with a bare pointer.
|
void | reset (T *obj=0) |
| Switch the bare pointer with another.
|
| smartptr (const smartptr< T > &ptr) |
| Define a smart pointer as a copy of another, this has the effect of calling addref(); the object is not duplicated.
|
| smartptr (T *obj) |
| Define a smart pointer with the specified bare pointer.
|
| smartptr () |
| Define an empty smart pointer.
|
| ~smartptr () |
| Relase a smart pointer (call release() on the object).
|
Private Attributes |
T * | f_ptr |
| The bare pointer.
|
Detailed Description
template<class T>
class odbcpp::smartptr< T >
Ensure proper management of objects.
Definition at line 52 of file object.h.
Constructor & Destructor Documentation
Define an empty smart pointer.
Definition at line 56 of file object.h.
Define a smart pointer with the specified bare pointer.
Definition at line 60 of file object.h.
Define a smart pointer as a copy of another, this has the effect of calling addref(); the object is not duplicated.
Definition at line 64 of file object.h.
Relase a smart pointer (call release() on the object).
Definition at line 67 of file object.h.
Member Function Documentation
Check whetehr the pointer is null (false) or not (true).
Definition at line 94 of file object.h.
Check whether the pointer is null (true) or not (false).
Definition at line 97 of file object.h.
Return the bare pointer.
Definition at line 103 of file object.h.
Return the bare pointer as a const pointer.
Definition at line 100 of file object.h.
Copy a smart pointer into this smart pointer.
Definition at line 79 of file object.h.
Set the smart pointer with another, same as reset(obj).
Definition at line 75 of file object.h.
Compare two smart pointers (what they point too).
Definition at line 91 of file object.h.
Compare this smart pointer with a bare reference.
Definition at line 87 of file object.h.
Compare this smart pointer with a bare pointer.
Definition at line 83 of file object.h.
Member Data Documentation
The documentation for this class was generated from the following file: