TAO_Stub_Auto_Ptr Class Reference

Implements the draft C++ standard auto_ptr abstraction. This class allows one to work Stub Objects *Only*! More...

#include <Stub.h>

Collaboration diagram for TAO_Stub_Auto_Ptr:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Stub_Auto_Ptr (TAO_Stub *p=0)
 TAO_Stub_Auto_Ptr (TAO_Stub_Auto_Ptr &ap)
TAO_Stub_Auto_Ptroperator= (TAO_Stub_Auto_Ptr &rhs)
 ~TAO_Stub_Auto_Ptr (void)
TAO_Stuboperator * () const
TAO_Stubget (void) const
TAO_Stubrelease (void)
void reset (TAO_Stub *p=0)
TAO_Stuboperator-> () const

Protected Attributes

TAO_Stubp_

Detailed Description

Implements the draft C++ standard auto_ptr abstraction. This class allows one to work Stub Objects *Only*!

Definition at line 418 of file Stub.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_Stub_Auto_Ptr::TAO_Stub_Auto_Ptr ( TAO_Stub p = 0  )  [explicit]

Definition at line 342 of file Stub.inl.

References ACE_TRACE.

00343   : p_ (p)
00344 {
00345   ACE_TRACE ("TAO_Stub_Auto_Ptr::TAO_Stub_Auto_Ptr");
00346 }

ACE_INLINE TAO_Stub_Auto_Ptr::TAO_Stub_Auto_Ptr ( TAO_Stub_Auto_Ptr ap  ) 

Definition at line 381 of file Stub.inl.

References ACE_TRACE.

00382   : p_ (rhs.release ())
00383 {
00384   ACE_TRACE ("TAO_Stub_Auto_Ptr::TAO_Stub_Auto_Ptr");
00385 }

ACE_INLINE TAO_Stub_Auto_Ptr::~TAO_Stub_Auto_Ptr ( void   ) 

Definition at line 399 of file Stub.inl.

References ACE_TRACE.

00400 {
00401   ACE_TRACE ("TAO_Stub_Auto_Ptr::~TAO_Stub_Auto_Ptr");
00402   if (this->get() != 0)
00403     this->get ()->_decr_refcnt ();
00404 }


Member Function Documentation

ACE_INLINE TAO_Stub * TAO_Stub_Auto_Ptr::get ( void   )  const

Definition at line 349 of file Stub.inl.

References ACE_TRACE, and p_.

Referenced by operator *(), operator->(), operator>>(), reset(), CORBA::Object::tao_object_initialize(), and CORBA::ORB::url_ior_string_to_object().

00350 {
00351   ACE_TRACE ("TAO_Stub_Auto_Ptr::get");
00352   return this->p_;
00353 }

ACE_INLINE TAO_Stub & TAO_Stub_Auto_Ptr::operator * (  )  const

Definition at line 409 of file Stub.inl.

References ACE_TRACE, and get().

00410 {
00411   ACE_TRACE ("TAO_Stub_Auto_Ptr::operator *()");
00412   // @@ Potential problem if this->p_ is zero!
00413   return *this->get ();
00414 }

ACE_INLINE TAO_Stub * TAO_Stub_Auto_Ptr::operator-> (  )  const

Definition at line 374 of file Stub.inl.

References ACE_TRACE, and get().

00375 {
00376   ACE_TRACE ("TAO_Stub_Auto_Ptr::operator->");
00377   return this->get ();
00378 }

ACE_INLINE TAO_Stub_Auto_Ptr & TAO_Stub_Auto_Ptr::operator= ( TAO_Stub_Auto_Ptr rhs  ) 

Definition at line 388 of file Stub.inl.

References ACE_TRACE, release(), and reset().

00389 {
00390   ACE_TRACE ("TAO_Stub_Auto_Ptr::operator=");
00391   if (this != &rhs)
00392     {
00393       this->reset (rhs.release ());
00394     }
00395   return *this;
00396 }

ACE_INLINE TAO_Stub * TAO_Stub_Auto_Ptr::release ( void   ) 

Definition at line 356 of file Stub.inl.

References ACE_TRACE, and p_.

Referenced by CORBA::Object::_set_policy_overrides(), TAO_CORBALOC_Parser::make_stub_from_mprofile(), operator=(), operator>>(), CORBA::Object::tao_object_initialize(), and CORBA::ORB::url_ior_string_to_object().

00357 {
00358   ACE_TRACE ("TAO_Stub_Auto_Ptr::release");
00359   TAO_Stub *old = this->p_;
00360   this->p_ = 0;
00361   return old;
00362 }

ACE_INLINE void TAO_Stub_Auto_Ptr::reset ( TAO_Stub p = 0  ) 

Definition at line 365 of file Stub.inl.

References ACE_TRACE, get(), and p_.

Referenced by operator=().

00366 {
00367   ACE_TRACE ("TAO_Stub_Auto_Ptr::reset");
00368   if (this->get () != p && this->get () != 0)
00369     this->get ()->_decr_refcnt ();
00370   this->p_ = p;
00371 }


Member Data Documentation

TAO_Stub* TAO_Stub_Auto_Ptr::p_ [protected]

Definition at line 435 of file Stub.h.

Referenced by get(), release(), and reset().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:39:46 2010 for TAO by  doxygen 1.4.7