Public Member Functions | Protected Attributes

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 419 of file Stub.h.


Constructor & Destructor Documentation

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

Definition at line 355 of file Stub.inl.

  : p_ (p)
{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::TAO_Stub_Auto_Ptr");
}

TAO_Stub_Auto_Ptr::TAO_Stub_Auto_Ptr ( TAO_Stub_Auto_Ptr ap  ) 

Definition at line 394 of file Stub.inl.

  : p_ (rhs.release ())
{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::TAO_Stub_Auto_Ptr");
}

TAO_Stub_Auto_Ptr::~TAO_Stub_Auto_Ptr ( void   ) 

Definition at line 412 of file Stub.inl.

{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::~TAO_Stub_Auto_Ptr");
  if (this->get() != 0)
    this->get ()->_decr_refcnt ();
}


Member Function Documentation

TAO_Stub * TAO_Stub_Auto_Ptr::get ( void   )  const

Definition at line 362 of file Stub.inl.

{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::get");
  return this->p_;
}

TAO_Stub & TAO_Stub_Auto_Ptr::operator* ( void   )  const

Definition at line 422 of file Stub.inl.

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

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

Definition at line 387 of file Stub.inl.

{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::operator->");
  return this->get ();
}

TAO_Stub_Auto_Ptr & TAO_Stub_Auto_Ptr::operator= ( TAO_Stub_Auto_Ptr rhs  ) 

Definition at line 401 of file Stub.inl.

{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::operator=");
  if (this != &rhs)
    {
      this->reset (rhs.release ());
    }
  return *this;
}

TAO_Stub * TAO_Stub_Auto_Ptr::release ( void   ) 

Definition at line 369 of file Stub.inl.

{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::release");
  TAO_Stub *old = this->p_;
  this->p_ = 0;
  return old;
}

void TAO_Stub_Auto_Ptr::reset ( TAO_Stub p = 0  ) 

Definition at line 378 of file Stub.inl.

{
  ACE_TRACE ("TAO_Stub_Auto_Ptr::reset");
  if (this->get () != p && this->get () != 0)
    this->get ()->_decr_refcnt ();
  this->p_ = p;
}


Member Data Documentation

Definition at line 436 of file Stub.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines