TAO_Persistent_Index_ExtId Class Reference

Helper class for TAO_Persistent_Context_Index: holds Persistent Naming Context POA id, so it can be stored as a for a in a hash table holding state of a Persistent Context Index. (Persistent Context Index is like directory that stores info about every active Naming Context). More...

#include <Persistent_Entries.h>

List of all members.

Public Member Functions

 TAO_Persistent_Index_ExtId (void)
 Constructor.

 TAO_Persistent_Index_ExtId (const char *poa_id)
 Constructor.

 TAO_Persistent_Index_ExtId (const TAO_Persistent_Index_ExtId &rhs)
 Copy constructor.

 ~TAO_Persistent_Index_ExtId (void)
 Destructor.

void operator= (const TAO_Persistent_Index_ExtId &rhs)
 Assignment operator (does copy memory).

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

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

u_long hash (void) const

Public Attributes

const char * poa_id_


Detailed Description

Helper class for TAO_Persistent_Context_Index: holds Persistent Naming Context POA id, so it can be stored as a for a in a hash table holding state of a Persistent Context Index. (Persistent Context Index is like directory that stores info about every active Naming Context).

We need this wrapper class around the actual data because we must provide function for it to work with ACE_Hash_Map_Manager.

Definition at line 191 of file Persistent_Entries.h.


Constructor & Destructor Documentation

TAO_Persistent_Index_ExtId::TAO_Persistent_Index_ExtId void   ) 
 

Constructor.

Definition at line 160 of file Persistent_Entries.cpp.

00161   : poa_id_ (0)
00162 {
00163 }

TAO_Persistent_Index_ExtId::TAO_Persistent_Index_ExtId const char *  poa_id  ) 
 

Constructor.

Definition at line 165 of file Persistent_Entries.cpp.

00166   : poa_id_ (poa_id)
00167 {
00168 }

TAO_Persistent_Index_ExtId::TAO_Persistent_Index_ExtId const TAO_Persistent_Index_ExtId rhs  ) 
 

Copy constructor.

Definition at line 170 of file Persistent_Entries.cpp.

References poa_id_.

00171 {
00172   poa_id_ = rhs.poa_id_;
00173 }

TAO_Persistent_Index_ExtId::~TAO_Persistent_Index_ExtId void   ) 
 

Destructor.

Definition at line 175 of file Persistent_Entries.cpp.

00176 {
00177 }


Member Function Documentation

u_long TAO_Persistent_Index_ExtId::hash void   )  const
 

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

Definition at line 202 of file Persistent_Entries.cpp.

References ACE_CString.

00203 {
00204   ACE_CString temp (poa_id_);
00205   return temp.hash ();
00206 }

bool TAO_Persistent_Index_ExtId::operator!= const TAO_Persistent_Index_ExtId rhs  )  const
 

Inequality comparison operator.

Definition at line 196 of file Persistent_Entries.cpp.

References poa_id_, and ACE_OS::strcmp().

00197 {
00198   return (ACE_OS::strcmp (poa_id_, rhs.poa_id_) != 0);
00199 }

void TAO_Persistent_Index_ExtId::operator= const TAO_Persistent_Index_ExtId rhs  ) 
 

Assignment operator (does copy memory).

Definition at line 180 of file Persistent_Entries.cpp.

References poa_id_.

00181 {
00182   // Check for self assignment.
00183   if (&rhs == this)
00184     return;
00185 
00186   poa_id_ = rhs.poa_id_;
00187 }

bool TAO_Persistent_Index_ExtId::operator== const TAO_Persistent_Index_ExtId rhs  )  const
 

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

Definition at line 190 of file Persistent_Entries.cpp.

References poa_id_, and ACE_OS::strcmp().

00191 {
00192   return (ACE_OS::strcmp (poa_id_, rhs.poa_id_) == 0);
00193 }


Member Data Documentation

const char* TAO_Persistent_Index_ExtId::poa_id_
 

POA id to be associated with the rest of the info for some Persistent Naming Context in the Persistent Context Index.

Definition at line 227 of file Persistent_Entries.h.

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


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:57:44 2006 for TAO_CosNaming by doxygen 1.3.6