TAO::Cache_ExtId Class Reference

Helper class for TAO_Transport_Cache_Manager: unifies several data items, so they can be stored together as a for a in a hash table holding the state of the Transport Cache. More...

#include <Cache_Entries.h>

Collaboration diagram for TAO::Cache_ExtId:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Cache_ExtId (void)
 Constructor.

 Cache_ExtId (TAO_Transport_Descriptor_Interface *prop)
 Constructor.

 Cache_ExtId (const Cache_ExtId &rhs)
 Copy constructor.

 ~Cache_ExtId (void)
 Destructor.

Cache_ExtIdoperator= (const Cache_ExtId &rhs)
 Assignment operator (does copy memory).

bool operator== (const Cache_ExtId &rhs) const
 Equality comparison operator (must match both id_ and kind_).

bool operator!= (const Cache_ExtId &rhs) const
 Inequality comparison operator.

u_long hash (void) const
void duplicate (void)
 Make a deep copy of the underlying pointer.

CORBA::ULong index (void) const
 Return the index value.

void index (CORBA::ULong index)
void incr_index (void)
 Increment the index value.

TAO_Transport_Descriptor_Interfaceproperty (void) const
 Get the underlying the property pointer.


Private Attributes

TAO_Transport_Descriptor_Interfacetransport_property_
 A property object that we represent.

CORBA::Boolean is_delete_
 Do we need to delete transport_property?

CORBA::ULong index_

Detailed Description

Helper class for TAO_Transport_Cache_Manager: unifies several data items, so they can be stored together as a for a in a hash table holding the state of the Transport Cache.

Definition at line 135 of file Cache_Entries.h.


Constructor & Destructor Documentation

ACE_INLINE TAO::Cache_ExtId::Cache_ExtId void   ) 
 

Constructor.

Definition at line 71 of file Cache_Entries.inl.

00072     : transport_property_ (0),
00073       is_delete_ (0),
00074       index_ (0)
00075   {
00076   }

ACE_INLINE TAO::Cache_ExtId::Cache_ExtId TAO_Transport_Descriptor_Interface prop  ) 
 

Constructor.

Definition at line 79 of file Cache_Entries.inl.

00080     : transport_property_ (prop),
00081       is_delete_ (0),
00082       index_ (0)
00083   {
00084 
00085   }

ACE_INLINE TAO::Cache_ExtId::Cache_ExtId const Cache_ExtId rhs  ) 
 

Copy constructor.

Definition at line 118 of file Cache_Entries.inl.

00119     : transport_property_ (0),
00120       is_delete_ (0),
00121       index_ (0)
00122   {
00123     *this = rhs;
00124   }

ACE_INLINE TAO::Cache_ExtId::~Cache_ExtId void   ) 
 

Destructor.

Definition at line 88 of file Cache_Entries.inl.

References is_delete_, and transport_property_.

00089   {
00090     if (this->is_delete_)
00091       delete this->transport_property_;
00092   }


Member Function Documentation

ACE_INLINE void TAO::Cache_ExtId::duplicate void   ) 
 

Make a deep copy of the underlying pointer.

Definition at line 150 of file Cache_Entries.inl.

References TAO_Transport_Descriptor_Interface::duplicate(), is_delete_, and transport_property_.

00151   {
00152     TAO_Transport_Descriptor_Interface *prop = 0;
00153 
00154     // Make a deep copy
00155     prop = this->transport_property_->duplicate ();
00156 
00157     if (prop == 0)
00158       return;
00159 
00160     // Release memory if there was some allocated in the first place
00161     if (this->is_delete_)
00162       delete this->transport_property_;
00163 
00164     this->is_delete_ = 1;
00165     this->transport_property_ = prop;
00166   }

ACE_INLINE u_long TAO::Cache_ExtId::hash void   )  const
 

function is required in order for this class to be usable by ACE_Hash_Map_Manager_Ex.

Definition at line 144 of file Cache_Entries.inl.

References TAO_Transport_Descriptor_Interface::hash(), and transport_property_.

00145   {
00146     return (this->transport_property_->hash () + this->index_);
00147   }

ACE_INLINE void TAO::Cache_ExtId::incr_index void   ) 
 

Increment the index value.

Definition at line 183 of file Cache_Entries.inl.

Referenced by TAO::Transport_Cache_Manager::find_i().

00184   {
00185     ++this->index_;
00186   }

ACE_INLINE void TAO::Cache_ExtId::index CORBA::ULong  index  ) 
 

Set the index value. This calls should not be used by any users but for the TAO_Transport_Cache_Manager class.

Definition at line 177 of file Cache_Entries.inl.

00178   {
00179     this->index_ = index;
00180   }

ACE_INLINE CORBA::ULong TAO::Cache_ExtId::index void   )  const
 

Return the index value.

Definition at line 170 of file Cache_Entries.inl.

Referenced by TAO::Transport_Cache_Manager::get_last_index_bind(), TAO::Transport_Cache_Manager::is_wakeup_useful(), and TAO::Transport_Cache_Manager::wait_for_connection().

00171   {
00172     return this->index_;
00173   }

ACE_INLINE bool TAO::Cache_ExtId::operator!= const Cache_ExtId rhs  )  const
 

Inequality comparison operator.

Definition at line 134 of file Cache_Entries.inl.

References index_, TAO_Transport_Descriptor_Interface::is_equivalent(), and transport_property_.

00135   {
00136     if (this->transport_property_->is_equivalent (rhs.transport_property_) &&
00137         this->index_ == rhs.index_)
00138       return false;
00139 
00140     return true;
00141   }

ACE_INLINE Cache_ExtId & TAO::Cache_ExtId::operator= const Cache_ExtId rhs  ) 
 

Assignment operator (does copy memory).

Definition at line 95 of file Cache_Entries.inl.

References TAO_Transport_Descriptor_Interface::duplicate(), index_, is_delete_, and transport_property_.

00096   {
00097     if (this != &rhs)
00098       {
00099         // Do a deep copy
00100         this->transport_property_ =
00101           rhs.transport_property_->duplicate ();
00102 
00103         if (this->transport_property_ == 0)
00104           {
00105             this->is_delete_ = 0;
00106             this->index_ = 0;
00107           }
00108         else
00109           {
00110             this->is_delete_ = 1;
00111             this->index_ = rhs.index_;
00112           }
00113       }
00114     return *this;
00115   }

ACE_INLINE bool TAO::Cache_ExtId::operator== const Cache_ExtId rhs  )  const
 

Equality comparison operator (must match both id_ and kind_).

Definition at line 127 of file Cache_Entries.inl.

References index_, TAO_Transport_Descriptor_Interface::is_equivalent(), and transport_property_.

00128   {
00129     return (this->transport_property_->is_equivalent (rhs.transport_property_) &&
00130             this->index_ == rhs.index_);
00131   }

ACE_INLINE TAO_Transport_Descriptor_Interface * TAO::Cache_ExtId::property void   )  const
 

Get the underlying the property pointer.

Definition at line 189 of file Cache_Entries.inl.

References transport_property_.

Referenced by TAO::Transport_Cache_Manager::bind_i(), TAO::Transport_Cache_Manager::find_i(), and TAO::Transport_Cache_Manager::is_wakeup_useful().

00190   {
00191     return this->transport_property_;
00192   }


Member Data Documentation

CORBA::ULong TAO::Cache_ExtId::index_ [private]
 

This is a supplementary index. Would be set to zero by default. Would be altered by the Transport_Cache of TAO. Please see the documentation of TAO_Transport_Cache_Manager for details.

Definition at line 196 of file Cache_Entries.h.

Referenced by operator!=(), operator=(), and operator==().

CORBA::Boolean TAO::Cache_ExtId::is_delete_ [private]
 

Do we need to delete transport_property?

Definition at line 188 of file Cache_Entries.h.

Referenced by duplicate(), operator=(), and ~Cache_ExtId().

TAO_Transport_Descriptor_Interface* TAO::Cache_ExtId::transport_property_ [private]
 

A property object that we represent.

Definition at line 185 of file Cache_Entries.h.

Referenced by duplicate(), hash(), operator!=(), operator=(), operator==(), property(), and ~Cache_ExtId().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:26:01 2006 for TAO by doxygen 1.3.6