ACE
6.3.3
|
This class implements support for a reference counted pointer. More...
#include <Bound_Ptr.h>
Public Member Functions | |
ACE_Strong_Bound_Ptr (X *p=0) | |
ACE_Strong_Bound_Ptr (auto_ptr< X > p) | |
ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr< X, ACE_LOCK > &r) | |
Copy constructor binds this and r to the same object. More... | |
ACE_Strong_Bound_Ptr (const ACE_Weak_Bound_Ptr< X, ACE_LOCK > &r) | |
Constructor binds this and r to the same object. More... | |
template<class Y > | |
ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr< Y, ACE_LOCK > &r) | |
~ACE_Strong_Bound_Ptr (void) | |
Destructor. More... | |
void | operator= (const ACE_Strong_Bound_Ptr< X, ACE_LOCK > &r) |
Assignment operator that binds this and r to the same object. More... | |
void | operator= (const ACE_Weak_Bound_Ptr< X, ACE_LOCK > &r) |
Assignment operator that binds this and r to the same object. More... | |
template<class Y > | |
ACE_Weak_Bound_Ptr< X, ACE_LOCK > & | operator= (const ACE_Strong_Bound_Ptr< Y, ACE_LOCK > &r) |
bool | operator== (const ACE_Strong_Bound_Ptr< X, ACE_LOCK > &r) const |
bool | operator== (const ACE_Weak_Bound_Ptr< X, ACE_LOCK > &r) const |
bool | operator== (X *p) const |
bool | operator!= (const ACE_Strong_Bound_Ptr< X, ACE_LOCK > &r) const |
Inequality operator, which is the opposite of equality. More... | |
bool | operator!= (const ACE_Weak_Bound_Ptr< X, ACE_LOCK > &r) const |
Inequality operator, which is the opposite of equality. More... | |
bool | operator!= (X *p) const |
Inequality operator, which is the opposite of equality. More... | |
X * | operator-> (void) const |
Redirection operator. More... | |
X & | operator* (void) const |
Dereference operator. More... | |
X * | get (void) const |
Get the pointer value. More... | |
void | reset (X *p=0) |
void | reset (auto_ptr< X > p) |
bool | null (void) const |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Private Types | |
typedef X | X_t |
typedef ACE_Bound_Ptr_Counter< ACE_LOCK > | COUNTER |
The ACE_Bound_Ptr_Counter type. More... | |
Private Attributes | |
COUNTER * | counter_ |
The reference counter. More... | |
X * | ptr_ |
The underlying object. More... | |
Friends | |
class | ACE_Weak_Bound_Ptr< X, ACE_LOCK > |
template<class Y , class L > | |
class | ACE_Strong_Bound_Ptr |
This class implements support for a reference counted pointer.
Assigning or copying instances of an ACE_Strong_Bound_Ptr will automatically increment the reference count of the underlying object. When the last instance of an ACE_Strong_Bound_Ptr that references a particular object is destroyed or overwritten, it will invoke delete on its underlying pointer.
|
private |
The ACE_Bound_Ptr_Counter type.
|
private |
|
inlineexplicit |
Constructor that initializes an ACE_Strong_Bound_Ptr to point to the object <p> immediately.
|
inlineexplicit |
Constructor that initializes an ACE_Strong_Bound_Ptr by stealing ownership of an object from an auto_ptr.
|
inline |
Copy constructor binds this
and r to the same object.
|
inline |
Constructor binds this
and r to the same object.
|
inline |
Copy constructor binds this
and r to the same object if Y* can be implicitly converted to X*.
|
inline |
Destructor.
|
inline |
Get the pointer value.
|
inline |
Allows us to check for NULL on all ACE_Strong_Bound_Ptr objects.
|
inline |
Inequality operator, which is the opposite of equality.
|
inline |
Inequality operator, which is the opposite of equality.
|
inline |
Inequality operator, which is the opposite of equality.
|
inline |
Dereference operator.
|
inline |
Redirection operator.
|
inline |
Assignment operator that binds this
and r to the same object.
|
inline |
Assignment operator that binds this
and r to the same object.
|
inline |
Assignment operator that binds this
and r to the same object if Y* can be implicitly converted to X*.
|
inline |
Equality operator that returns true
if both ACE_Strong_Bound_Ptr instances point to the same underlying object.
true
if both objects have just been instantiated and not used yet.
|
inline |
Equality operator that returns true if the ACE_Strong_Bound_Ptr and ACE_Weak_Bound_Ptr objects point to the same underlying object.
true
if both objects have just been instantiated and not used yet.
|
inline |
Equality operator that returns true
if the ACE_Strong_Bound_Ptr and the raw pointer point to the same underlying object.
|
inline |
Resets the ACE_Strong_Bound_Ptr to refer to a different underlying object.
|
inline |
Resets the ACE_Strong_Bound_Ptr to refer to a different underlying object, ownership of which is stolen from the auto_ptr.
|
friend |
|
friend |
ACE_Strong_Bound_Ptr< X, ACE_LOCK >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
|
private |
The reference counter.
|
private |
The underlying object.