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_T.h>
Public Types | |
| typedef TRANSPORT_DESCRIPTOR_TYPE | transport_descriptor_type |
Public Member Functions | |
| Cache_ExtId_T (void) | |
| Constructor. | |
| Cache_ExtId_T (transport_descriptor_type *prop) | |
| Constructor. | |
| Cache_ExtId_T (const Cache_ExtId_T &rhs) | |
| Copy constructor. | |
| ~Cache_ExtId_T (void) | |
| Destructor. | |
| Cache_ExtId_T & | operator= (const Cache_ExtId_T &rhs) |
| Assignment operator (does copy memory). | |
| bool | operator== (const Cache_ExtId_T &rhs) const |
| Equality comparison operator (must match both id_ and kind_). | |
| bool | operator!= (const Cache_ExtId_T &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. | |
| transport_descriptor_type * | property (void) const |
| Get the underlying the property pointer. | |
Private Attributes | |
| transport_descriptor_type * | transport_property_ |
| A property object that we represent. | |
| CORBA::Boolean | is_delete_ |
| Do we need to delete transport_property? | |
| CORBA::ULong | index_ |
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 144 of file Cache_Entries_T.h.
| typedef TRANSPORT_DESCRIPTOR_TYPE TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::transport_descriptor_type |
Definition at line 147 of file Cache_Entries_T.h.
| TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::Cache_ExtId_T | ( | void | ) | [inline] |
Constructor.
Definition at line 104 of file Cache_Entries_T.inl.
00105 : transport_property_ (0), 00106 is_delete_ (false), 00107 index_ (0) 00108 { 00109 }
| TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::Cache_ExtId_T | ( | typename Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::transport_descriptor_type * | prop | ) | [inline, explicit] |
Constructor.
Definition at line 112 of file Cache_Entries_T.inl.
00114 : transport_property_ (prop), 00115 is_delete_ (false), 00116 index_ (0) 00117 { 00118 00119 }
| TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::Cache_ExtId_T | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) | [inline] |
Copy constructor.
Definition at line 153 of file Cache_Entries_T.inl.
00154 : transport_property_ (0), 00155 is_delete_ (false), 00156 index_ (0) 00157 { 00158 *this = rhs; 00159 }
| TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::~Cache_ExtId_T | ( | void | ) | [inline] |
Destructor.
Definition at line 122 of file Cache_Entries_T.inl.
00123 { 00124 if (this->is_delete_) 00125 delete this->transport_property_; 00126 }
| void TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::duplicate | ( | void | ) | [inline] |
Make a deep copy of the underlying pointer.
Definition at line 185 of file Cache_Entries_T.inl.
00186 { 00187 transport_descriptor_type *prop = 0; 00188 00189 // Make a deep copy 00190 prop = this->transport_property_->duplicate (); 00191 00192 if (prop == 0) 00193 return; 00194 00195 // Release memory if there was some allocated in the first place 00196 if (this->is_delete_) 00197 delete this->transport_property_; 00198 00199 this->is_delete_ = true; 00200 this->transport_property_ = prop; 00201 }
| u_long TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::hash | ( | void | ) | const [inline] |
hash function is required in order for this class to be usable by ACE_Hash_Map_Manager_Ex.
Definition at line 179 of file Cache_Entries_T.inl.
00180 { 00181 return (this->transport_property_->hash () + this->index_); 00182 }
| void TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::incr_index | ( | void | ) | [inline] |
Increment the index value.
Definition at line 218 of file Cache_Entries_T.inl.
00219 { 00220 ++this->index_; 00221 }
| void TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::index | ( | CORBA::ULong | index | ) | [inline] |
Set the index value. This calls should not be used by any users but for the TAO_Transport_Cache_Manager class.
Definition at line 212 of file Cache_Entries_T.inl.
| CORBA::ULong TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::index | ( | void | ) | const [inline] |
Return the index value.
Definition at line 205 of file Cache_Entries_T.inl.
00206 { 00207 return this->index_; 00208 }
| bool TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::operator!= | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) | const [inline] |
Inequality comparison operator.
Definition at line 169 of file Cache_Entries_T.inl.
00170 { 00171 if (this->transport_property_->is_equivalent (rhs.transport_property_) && 00172 this->index_ == rhs.index_) 00173 return false; 00174 00175 return true; 00176 }
| Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::operator= | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) | [inline] |
Assignment operator (does copy memory).
Definition at line 130 of file Cache_Entries_T.inl.
00131 { 00132 if (this != &rhs) 00133 { 00134 // Do a deep copy 00135 this->transport_property_ = 00136 rhs.transport_property_->duplicate (); 00137 00138 if (this->transport_property_ == 0) 00139 { 00140 this->is_delete_ = false; 00141 this->index_ = 0; 00142 } 00143 else 00144 { 00145 this->is_delete_ = true; 00146 this->index_ = rhs.index_; 00147 } 00148 } 00149 return *this; 00150 }
| bool TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::operator== | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) | const [inline] |
Equality comparison operator (must match both id_ and kind_).
Definition at line 162 of file Cache_Entries_T.inl.
00163 { 00164 return (this->transport_property_->is_equivalent (rhs.transport_property_) && 00165 this->index_ == rhs.index_); 00166 }
| Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::transport_descriptor_type * TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::property | ( | void | ) | const [inline] |
Get the underlying the property pointer.
Definition at line 225 of file Cache_Entries_T.inl.
00226 { 00227 return this->transport_property_; 00228 }
CORBA::ULong TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::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 205 of file Cache_Entries_T.h.
CORBA::Boolean TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::is_delete_ [private] |
Do we need to delete transport_property?
Definition at line 197 of file Cache_Entries_T.h.
transport_descriptor_type* TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::transport_property_ [private] |
A property object that we represent.
Definition at line 194 of file Cache_Entries_T.h.
1.6.1