#include <Refcounted_Auto_Ptr.h>
Collaboration diagram for ACE_Refcounted_Auto_Ptr:

Public Methods | |
| ACE_Refcounted_Auto_Ptr (X *p=0) | |
Constructor that initializes an ACE_Refcounted_Auto_Ptr to point to the result immediately. More... | |
| ACE_Refcounted_Auto_Ptr (const ACE_Refcounted_Auto_Ptr< X, ACE_LOCK > &r) | |
Copy constructor binds the created object and r to the same ACE_Refcounted_Auto_Ptr_Rep. An ACE_Refcounted_Auto_Ptr_Rep is created if necessary. More... | |
| virtual | ~ACE_Refcounted_Auto_Ptr (void) |
| Destructor. More... | |
| void | operator= (const ACE_Refcounted_Auto_Ptr< X, ACE_LOCK > &r) |
Assignment operator that binds the current object and r to the same ACE_Refcounted_Auto_Ptr_Rep. An ACE_Refcounted_Auto_Ptr_Rep is created if necessary. More... | |
| int | operator== (const ACE_Refcounted_Auto_Ptr< X, ACE_LOCK > &r) const |
| Equality operator that returns 1 if both ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> objects point to the same ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> object. Attention: It also returns 1 if both objects have just been instantiated and not used yet. More... | |
| int | operator!= (const ACE_Refcounted_Auto_Ptr< X, ACE_LOCK > &r) const |
| Inequality operator, which is the opposite of equality. More... | |
| X * | operator-> (void) const |
| Redirection operator. More... | |
| X & | operator * () const |
| X * | release (void) |
| Sets the pointer value to 0 and returns its old value. More... | |
| void | reset (X *p=0) |
| Invokes delete on the previous pointer value and then sets the pointer value to the specified value. More... | |
| X * | get (void) const |
| Get the pointer value. More... | |
| int | count (void) const |
| Get the reference count value. More... | |
| int | null (void) const |
| Allows us to check for NULL on all ACE_Refcounted_Auto_Ptr objects. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Protected Types | |
| typedef ACE_Refcounted_Auto_Ptr_Rep< X, ACE_LOCK > | AUTO_REFCOUNTED_PTR_REP |
| the ACE_Refcounted_Auto_Ptr_Rep. More... | |
Protected Attributes | |
| AUTO_REFCOUNTED_PTR_REP * | rep_ |
| Protect operations on the <ACE_Refcounted_Auto_Ptr>. More... | |
Definition at line 39 of file Refcounted_Auto_Ptr.h.
|
|||||
|
the ACE_Refcounted_Auto_Ptr_Rep.
Definition at line 102 of file Refcounted_Auto_Ptr.h. |
|
||||||||||
|
Constructor that initializes an
Definition at line 151 of file Refcounted_Auto_Ptr.i.
00152 : rep_ (AUTO_REFCOUNTED_PTR_REP::create (p)) 00153 { 00154 } |
|
||||||||||
|
Copy constructor binds the created object and
Definition at line 157 of file Refcounted_Auto_Ptr.i.
00158 : rep_ (AUTO_REFCOUNTED_PTR_REP::attach (((ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &) r).rep_)) 00159 { 00160 } |
|
||||||||||
|
Destructor.
Definition at line 163 of file Refcounted_Auto_Ptr.i. References rep_.
00164 {
00165 AUTO_REFCOUNTED_PTR_REP::detach (rep_);
00166 }
|
|
||||||||||
|
Get the reference count value.
Definition at line 17 of file Refcounted_Auto_Ptr.i. References ACE_Refcounted_Auto_Ptr_Rep::count, and rep_.
00018 {
00019 return this->rep_->count ();
00020 }
|
|
||||||||||
|
Get the pointer value.
Definition at line 193 of file Refcounted_Auto_Ptr.i. References ACE_Refcounted_Auto_Ptr_Rep::get, and rep_.
00194 {
00195 // We return the ACE_Future_rep.
00196 return this->rep_->get ();
00197 }
|
|
||||||||||
|
Allows us to check for NULL on all ACE_Refcounted_Auto_Ptr objects.
Definition at line 32 of file Refcounted_Auto_Ptr.i. References ACE_Refcounted_Auto_Ptr_Rep::null, and rep_.
00033 {
00034 return this->rep_->null ();
00035 }
|
|
|||||||||
|
Definition at line 187 of file Refcounted_Auto_Ptr.i. References ACE_Refcounted_Auto_Ptr_Rep::get, and rep_.
00188 {
00189 return *this->rep_->get ();
00190 }
|
|
||||||||||
|
Inequality operator, which is the opposite of equality.
Definition at line 175 of file Refcounted_Auto_Ptr.i. References rep_.
|
|
||||||||||
|
Redirection operator.
Definition at line 181 of file Refcounted_Auto_Ptr.i. References ACE_Refcounted_Auto_Ptr_Rep::get, and rep_.
00182 {
00183 return this->rep_->get();
00184 }
|
|
||||||||||
|
Assignment operator that binds the current object and
Definition at line 212 of file Refcounted_Auto_Ptr.i. References rep_.
00213 {
00214 // assignment:
00215 //
00216 // bind <this> to the same <ACE_Refcounted_Auto_Ptr_Rep> as <r>.
00217
00218 // This will work if &r == this, by first increasing the ref count
00219 ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &r = (ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> &) rhs;
00220 AUTO_REFCOUNTED_PTR_REP::assign (this->rep_,
00221 AUTO_REFCOUNTED_PTR_REP::attach (r.rep_));
00222 }
|
|
||||||||||
|
Equality operator that returns 1 if both ACE_Refcounted_Auto_Ptr<X, ACE_LOCK> objects point to the same ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> object. Attention: It also returns 1 if both objects have just been instantiated and not used yet.
Definition at line 169 of file Refcounted_Auto_Ptr.i. References rep_.
|
|
||||||||||
|
Sets the pointer value to 0 and returns its old value.
Definition at line 200 of file Refcounted_Auto_Ptr.i. References ACE_Refcounted_Auto_Ptr_Rep::release, and rep_.
00201 {
00202 return this->rep_->release ();
00203 }
|
|
||||||||||
|
Invokes delete on the previous pointer value and then sets the pointer value to the specified value.
Definition at line 206 of file Refcounted_Auto_Ptr.i. References rep_, and ACE_Refcounted_Auto_Ptr_Rep::reset.
00207 {
00208 this->rep_->reset (p);
00209 }
|
|
|||||
|
Declare the dynamic allocation hooks.
Definition at line 98 of file Refcounted_Auto_Ptr.h. |
|
|||||
|
Protect operations on the <ACE_Refcounted_Auto_Ptr>.
Definition at line 105 of file Refcounted_Auto_Ptr.h. Referenced by count, get, null, operator *, operator!=, operator->, operator=, operator==, release, reset, and ~ACE_Refcounted_Auto_Ptr. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002