Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TAO_Intrusive_Ref_Count_Handle< T > Class Template Reference

#include <Intrusive_Ref_Count_Handle_T.h>

Collaboration diagram for TAO_Intrusive_Ref_Count_Handle< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Intrusive_Ref_Count_Handle (void)
 Default Constructor - enters the "nil" state.
 TAO_Intrusive_Ref_Count_Handle (T *p, bool take_ownership=true)
 TAO_Intrusive_Ref_Count_Handle (const TAO_Intrusive_Ref_Count_Handle &b)
 Copy Constructor - claims a "copy" of rhs object's reference to T.
 ~TAO_Intrusive_Ref_Count_Handle (void)
 Destructor.
TAO_Intrusive_Ref_Count_Handleoperator= (T *p)
TAO_Intrusive_Ref_Count_Handleoperator= (const TAO_Intrusive_Ref_Count_Handle &b)
T * operator-> () const
 Const Accessor to underlying pointer (T*) using arrow (->) operator.
bool is_nil (void) const
T * in (void) const
 Used to pass the underlying pointer as an "IN" argument to a method.
T *& inout (void)
 Used to pass the underlying pointer as an "IN/OUT" argument to a method.
T *& out (void)
 Used to pass the underlying pointer as an "OUT" argument to a method.
T * _retn (void)

Private Member Functions

void claim (void)
void drop (void)

Private Attributes

T * ptr_

template<typename T>
class TAO_Intrusive_Ref_Count_Handle< T >


Constructor & Destructor Documentation

template<typename T>
TAO_Intrusive_Ref_Count_Handle< T >::TAO_Intrusive_Ref_Count_Handle void   ) 
 

Default Constructor - enters the "nil" state.

template<typename T>
TAO_Intrusive_Ref_Count_Handle< T >::TAO_Intrusive_Ref_Count_Handle T *  p,
bool  take_ownership = true
 

Ctor - By default, takes ownership of passed-in "copy" of reference to T. But the second argument (bool) can be changed from the default value of 'true' to the non-default value of 'false'. The second argument dictates whether or not this handle object should take ownership of the passed-in pointer to the T object. By default, it takes ownership, leaving the reference counter of the T object unchanged. When it is instructed to not take ownership (false value for second arg), then the reference counter of the T object will be incremented so that this handle object has its own "copy".

template<typename T>
TAO_Intrusive_Ref_Count_Handle< T >::TAO_Intrusive_Ref_Count_Handle const TAO_Intrusive_Ref_Count_Handle< T > &  b  ) 
 

Copy Constructor - claims a "copy" of rhs object's reference to T.

template<typename T>
TAO_Intrusive_Ref_Count_Handle< T >::~TAO_Intrusive_Ref_Count_Handle void   ) 
 

Destructor.


Member Function Documentation

template<typename T>
T* TAO_Intrusive_Ref_Count_Handle< T >::_retn void   ) 
 

Used to take-away the underlying pointer from this smart pointer object. Caller becomes responsibe for the returned "copy" to the reference. Always leaves the smart pointer in the "nil" state upon return.

template<typename T>
void TAO_Intrusive_Ref_Count_Handle< T >::claim void   )  [private]
 

Claim a "copy" of the reference-counted object by adding one to its reference counter. Do nothing if this smart pointer object is currently in the "nil" state.

template<typename T>
void TAO_Intrusive_Ref_Count_Handle< T >::drop void   )  [private]
 

Drop our "copy" of the reference-counted object by removing one from its reference counter. Do nothing if this smart pointer object is currently in the "nil" state. Note that this method will always leave this smart pointer in the "nil" state upon its return.

template<typename T>
T* TAO_Intrusive_Ref_Count_Handle< T >::in void   )  const
 

Used to pass the underlying pointer as an "IN" argument to a method.

template<typename T>
T*& TAO_Intrusive_Ref_Count_Handle< T >::inout void   ) 
 

Used to pass the underlying pointer as an "IN/OUT" argument to a method.

template<typename T>
bool TAO_Intrusive_Ref_Count_Handle< T >::is_nil void   )  const
 

Returns true if underlying pointer is NULL (0). Returns false otherwise.

template<typename T>
T* TAO_Intrusive_Ref_Count_Handle< T >::operator->  )  const
 

Const Accessor to underlying pointer (T*) using arrow (->) operator.

template<typename T>
TAO_Intrusive_Ref_Count_Handle& TAO_Intrusive_Ref_Count_Handle< T >::operator= const TAO_Intrusive_Ref_Count_Handle< T > &  b  ) 
 

Assignment Operator with const TAO_Smart_Ptr<T>& argument. Claims a "copy" of rhs object's reference to T.

template<typename T>
TAO_Intrusive_Ref_Count_Handle& TAO_Intrusive_Ref_Count_Handle< T >::operator= T *  p  ) 
 

Assignment Operator with T* argument. Takes ownership of passed-in "copy" of reference to T.

template<typename T>
T*& TAO_Intrusive_Ref_Count_Handle< T >::out void   ) 
 

Used to pass the underlying pointer as an "OUT" argument to a method.


Member Data Documentation

template<typename T>
T* TAO_Intrusive_Ref_Count_Handle< T >::ptr_ [private]
 

The underlying pointer to the (intrusively) reference-counted object. Set to 0 when this smart pointer is in the "nil" state. Otherwise, this smart pointer always owns a (reference-counted) "copy" of the object pointed to by the ptr_ data member.


The documentation for this class was generated from the following file:
Generated on Thu Feb 16 03:50:04 2006 for TAO by  doxygen 1.3.9.1