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:
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_ExtId & | operator= (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_Interface * | property (void) const |
Get the underlying the property pointer. | |
Private Attributes | |
TAO_Transport_Descriptor_Interface * | transport_property_ |
A property object that we represent. | |
CORBA::Boolean | is_delete_ |
Do we need to delete transport_property? | |
CORBA::ULong | index_ |
for a <key> in a hash table holding the state of the Transport Cache.
Definition at line 142 of file Cache_Entries.h.
ACE_INLINE TAO::Cache_ExtId::Cache_ExtId | ( | void | ) |
Constructor.
Definition at line 73 of file Cache_Entries.inl.
00074 : transport_property_ (0), 00075 is_delete_ (false), 00076 index_ (0) 00077 { 00078 }
ACE_INLINE TAO::Cache_ExtId::Cache_ExtId | ( | TAO_Transport_Descriptor_Interface * | prop | ) |
Constructor.
Definition at line 81 of file Cache_Entries.inl.
00082 : transport_property_ (prop), 00083 is_delete_ (false), 00084 index_ (0) 00085 { 00086 00087 }
ACE_INLINE TAO::Cache_ExtId::Cache_ExtId | ( | const Cache_ExtId & | rhs | ) |
Copy constructor.
Definition at line 120 of file Cache_Entries.inl.
00121 : transport_property_ (0), 00122 is_delete_ (false), 00123 index_ (0) 00124 { 00125 *this = rhs; 00126 }
ACE_INLINE TAO::Cache_ExtId::~Cache_ExtId | ( | void | ) |
Destructor.
Definition at line 90 of file Cache_Entries.inl.
References transport_property_.
00091 { 00092 if (this->is_delete_) 00093 delete this->transport_property_; 00094 }
ACE_INLINE void TAO::Cache_ExtId::duplicate | ( | void | ) |
Make a deep copy of the underlying pointer.
Definition at line 152 of file Cache_Entries.inl.
References TAO_Transport_Descriptor_Interface::duplicate(), is_delete_, and transport_property_.
00153 { 00154 TAO_Transport_Descriptor_Interface *prop = 0; 00155 00156 // Make a deep copy 00157 prop = this->transport_property_->duplicate (); 00158 00159 if (prop == 0) 00160 return; 00161 00162 // Release memory if there was some allocated in the first place 00163 if (this->is_delete_) 00164 delete this->transport_property_; 00165 00166 this->is_delete_ = true; 00167 this->transport_property_ = prop; 00168 }
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 146 of file Cache_Entries.inl.
References index_.
Referenced by TAO::Transport_Cache_Manager::bind_i().
00147 { 00148 return (this->transport_property_->hash () + this->index_); 00149 }
ACE_INLINE void TAO::Cache_ExtId::incr_index | ( | void | ) |
Increment the index value.
Definition at line 185 of file Cache_Entries.inl.
References index_.
00186 { 00187 ++this->index_; 00188 }
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 179 of file Cache_Entries.inl.
References index_.
ACE_INLINE CORBA::ULong TAO::Cache_ExtId::index | ( | void | ) | const |
Return the index value.
Definition at line 172 of file Cache_Entries.inl.
References index_.
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().
00173 { 00174 return this->index_; 00175 }
ACE_INLINE bool TAO::Cache_ExtId::operator!= | ( | const Cache_ExtId & | rhs | ) | const |
Inequality comparison operator.
Definition at line 136 of file Cache_Entries.inl.
References index_, and transport_property_.
00137 { 00138 if (this->transport_property_->is_equivalent (rhs.transport_property_) && 00139 this->index_ == rhs.index_) 00140 return false; 00141 00142 return true; 00143 }
ACE_INLINE Cache_ExtId & TAO::Cache_ExtId::operator= | ( | const Cache_ExtId & | rhs | ) |
Assignment operator (does copy memory).
Definition at line 97 of file Cache_Entries.inl.
References TAO_Transport_Descriptor_Interface::duplicate(), index_, is_delete_, and transport_property_.
00098 { 00099 if (this != &rhs) 00100 { 00101 // Do a deep copy 00102 this->transport_property_ = 00103 rhs.transport_property_->duplicate (); 00104 00105 if (this->transport_property_ == 0) 00106 { 00107 this->is_delete_ = false; 00108 this->index_ = 0; 00109 } 00110 else 00111 { 00112 this->is_delete_ = true; 00113 this->index_ = rhs.index_; 00114 } 00115 } 00116 return *this; 00117 }
ACE_INLINE bool TAO::Cache_ExtId::operator== | ( | const Cache_ExtId & | rhs | ) | const |
Equality comparison operator (must match both id_ and kind_).
Definition at line 129 of file Cache_Entries.inl.
References index_, and transport_property_.
00130 { 00131 return (this->transport_property_->is_equivalent (rhs.transport_property_) && 00132 this->index_ == rhs.index_); 00133 }
ACE_INLINE TAO_Transport_Descriptor_Interface * TAO::Cache_ExtId::property | ( | void | ) | const |
Get the underlying the property pointer.
Definition at line 191 of file Cache_Entries.inl.
References transport_property_.
Referenced by TAO::Transport_Cache_Manager::find_i(), and TAO::Transport_Cache_Manager::is_wakeup_useful().
00192 { 00193 return this->transport_property_; 00194 }
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 203 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 195 of file Cache_Entries.h.
Referenced by duplicate(), and operator=().
TAO_Transport_Descriptor_Interface* TAO::Cache_ExtId::transport_property_ [private] |
A property object that we represent.
Definition at line 192 of file Cache_Entries.h.
Referenced by duplicate(), operator!=(), operator=(), operator==(), property(), and ~Cache_ExtId().