Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Cache_ExtId Class Reference

Helper class for TAO_Transport_Cache_Manager: unifies several data items, so they can be stored together as a <value> for a <key> 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 Methods

 TAO_Cache_ExtId (void)
 Constructor. More...

 TAO_Cache_ExtId (TAO_Transport_Descriptor_Interface *prop)
 Constructor. More...

 TAO_Cache_ExtId (const TAO_Cache_ExtId &rhs)
 Copy constructor. More...

 ~TAO_Cache_ExtId (void)
 Destructor. More...

TAO_Cache_ExtId & operator= (const TAO_Cache_ExtId &rhs)
 Assignment operator (does copy memory). More...

int operator== (const TAO_Cache_ExtId &rhs) const
 Equality comparison operator (must match both id_ and kind_). More...

int operator!= (const TAO_Cache_ExtId &rhs) const
 Inequality comparison operator. More...

u_long hash (void) const
 <hash> function is required in order for this class to be usable by ACE_Hash_Map_Manager_Ex. More...

void duplicate (void)
 Make a deep copy of the underlying pointer. More...

void 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. More...

void incr_index (void)
 Increment the index value. More...

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

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

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


Private Attributes

TAO_Transport_Descriptor_Interfacetransport_property_
 A property object that we represent. More...

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

CORBA::ULong index_

Detailed Description

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

Definition at line 111 of file Cache_Entries.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_Cache_ExtId::TAO_Cache_ExtId void   
 

Constructor.

Definition at line 66 of file Cache_Entries.inl.

00067   : transport_property_ (0),
00068     is_delete_ (0),
00069     index_ (0)
00070 {
00071 }

ACE_INLINE TAO_Cache_ExtId::TAO_Cache_ExtId TAO_Transport_Descriptor_Interface   prop
 

Constructor.

Definition at line 74 of file Cache_Entries.inl.

00075   : transport_property_ (prop),
00076     is_delete_ (0),
00077     index_ (0)
00078 {
00079 
00080 }

ACE_INLINE TAO_Cache_ExtId::TAO_Cache_ExtId const TAO_Cache_ExtId &    rhs
 

Copy constructor.

Definition at line 113 of file Cache_Entries.inl.

00114   : transport_property_ (0),
00115     is_delete_ (0),
00116     index_ (0)
00117 {
00118   *this = rhs;
00119 }

ACE_INLINE TAO_Cache_ExtId::~TAO_Cache_ExtId void   
 

Destructor.

Definition at line 83 of file Cache_Entries.inl.

References is_delete_, and transport_property_.

00084 {
00085   if (this->is_delete_)
00086     delete this->transport_property_;
00087 }


Member Function Documentation

ACE_INLINE void TAO_Cache_ExtId::duplicate void   
 

Make a deep copy of the underlying pointer.

Definition at line 145 of file Cache_Entries.inl.

References TAO_Transport_Descriptor_Interface::duplicate, is_delete_, and transport_property_.

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

ACE_INLINE u_long TAO_Cache_ExtId::hash void    const
 

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

Definition at line 139 of file Cache_Entries.inl.

References TAO_Transport_Descriptor_Interface::hash, index_, and transport_property_.

00140 {
00141   return (this->transport_property_->hash () + this->index_);
00142 }

ACE_INLINE void TAO_Cache_ExtId::incr_index void   
 

Increment the index value.

Definition at line 184 of file Cache_Entries.inl.

References index_.

Referenced by TAO_Transport_Cache_Manager::find_i.

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

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 178 of file Cache_Entries.inl.

References index, and index_.

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

ACE_INLINE CORBA::ULong TAO_Cache_ExtId::index void    const
 

Return the index value.

Definition at line 171 of file Cache_Entries.inl.

References index_.

00172 {
00173   return this->index_;
00174 }

ACE_INLINE CORBA::ULong TAO_Cache_ExtId::index void   
 

Return the index value.

Definition at line 165 of file Cache_Entries.inl.

References index_.

Referenced by TAO_Transport_Cache_Manager::find_i, TAO_Transport_Cache_Manager::get_last_index_bind, index, TAO_Transport_Cache_Manager::is_wakeup_useful, and TAO_Transport_Cache_Manager::wait_for_connection.

00166 {
00167   return this->index_;
00168 }

ACE_INLINE int TAO_Cache_ExtId::operator!= const TAO_Cache_ExtId &    rhs const
 

Inequality comparison operator.

Definition at line 129 of file Cache_Entries.inl.

References index_, TAO_Transport_Descriptor_Interface::is_equivalent, and transport_property_.

00130 {
00131   if (this->transport_property_->is_equivalent (rhs.transport_property_) &&
00132       this->index_ == rhs.index_)
00133   return 0;
00134 
00135   return 1;
00136 }

ACE_INLINE TAO_Cache_ExtId & TAO_Cache_ExtId::operator= const TAO_Cache_ExtId &    rhs
 

Assignment operator (does copy memory).

Definition at line 90 of file Cache_Entries.inl.

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

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

ACE_INLINE int TAO_Cache_ExtId::operator== const TAO_Cache_ExtId &    rhs const
 

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

Definition at line 122 of file Cache_Entries.inl.

References index_, TAO_Transport_Descriptor_Interface::is_equivalent, and transport_property_.

00123 {
00124   return (this->transport_property_->is_equivalent (rhs.transport_property_) &&
00125             this->index_ == rhs.index_);
00126 }

ACE_INLINE TAO_Transport_Descriptor_Interface * TAO_Cache_ExtId::property void    const
 

Get the underlying the property pointer.

Definition at line 190 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.

00191 {
00192   return this->transport_property_;
00193 }


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 175 of file Cache_Entries.h.

Referenced by hash, incr_index, index, operator!=, operator=, and operator==.

CORBA::Boolean TAO_Cache_ExtId::is_delete_ [private]
 

Do we need to delete transport_property?

Definition at line 167 of file Cache_Entries.h.

Referenced by duplicate, operator=, and ~TAO_Cache_ExtId.

TAO_Transport_Descriptor_Interface* TAO_Cache_ExtId::transport_property_ [private]
 

A property object that we represent.

Definition at line 164 of file Cache_Entries.h.

Referenced by duplicate, hash, operator!=, operator=, operator==, property, and ~TAO_Cache_ExtId.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:05:31 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002