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 | ) |
Constructor.
Definition at line 104 of file Cache_Entries_T.inl.
: transport_property_ (0), is_delete_ (false), index_ (0) { }
TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::Cache_ExtId_T | ( | transport_descriptor_type * | prop | ) | [explicit] |
Constructor.
TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::Cache_ExtId_T | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) |
Copy constructor.
Definition at line 153 of file Cache_Entries_T.inl.
: transport_property_ (0), is_delete_ (false), index_ (0) { *this = rhs; }
TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::~Cache_ExtId_T | ( | void | ) |
Destructor.
Definition at line 122 of file Cache_Entries_T.inl.
{ if (this->is_delete_) delete this->transport_property_; }
void TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::duplicate | ( | void | ) |
Make a deep copy of the underlying pointer.
Definition at line 185 of file Cache_Entries_T.inl.
{ transport_descriptor_type *prop = 0; // Make a deep copy prop = this->transport_property_->duplicate (); if (prop == 0) return; // Release memory if there was some allocated in the first place if (this->is_delete_) delete this->transport_property_; this->is_delete_ = true; this->transport_property_ = prop; }
u_long TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::hash | ( | void | ) | const |
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.
{ return (this->transport_property_->hash () + this->index_); }
void TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::incr_index | ( | void | ) |
void TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::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 212 of file Cache_Entries_T.inl.
{ this->index_ = index; }
CORBA::ULong TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::index | ( | void | ) | const |
Return the index value.
Definition at line 205 of file Cache_Entries_T.inl.
{ return this->index_; }
bool TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::operator!= | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) | const |
Inequality comparison operator.
Definition at line 169 of file Cache_Entries_T.inl.
{ if (this->transport_property_->is_equivalent (rhs.transport_property_) && this->index_ == rhs.index_) return false; return true; }
Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::operator= | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) |
Assignment operator (does copy memory).
Definition at line 130 of file Cache_Entries_T.inl.
{ if (this != &rhs) { // Do a deep copy this->transport_property_ = rhs.transport_property_->duplicate (); if (this->transport_property_ == 0) { this->is_delete_ = false; this->index_ = 0; } else { this->is_delete_ = true; this->index_ = rhs.index_; } } return *this; }
bool TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::operator== | ( | const Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE > & | rhs | ) | const |
Equality comparison operator (must match both id_ and kind_).
Definition at line 162 of file Cache_Entries_T.inl.
{ return (this->transport_property_->is_equivalent (rhs.transport_property_) && this->index_ == rhs.index_); }
Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::transport_descriptor_type * TAO::Cache_ExtId_T< TRANSPORT_DESCRIPTOR_TYPE >::property | ( | void | ) | const |
Get the underlying the property pointer.
Definition at line 225 of file Cache_Entries_T.inl.
{ return this->transport_property_; }
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.