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 <key> 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 <key> 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 <hash> 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 157 of file Persistent_Entries.cpp.

00158   : poa_id_ (0)
00159 {
00160 }

TAO_Persistent_Index_ExtId::TAO_Persistent_Index_ExtId ( const char *  poa_id  ) 

Constructor.

Definition at line 162 of file Persistent_Entries.cpp.

00163   : poa_id_ (poa_id)
00164 {
00165 }

TAO_Persistent_Index_ExtId::TAO_Persistent_Index_ExtId ( const TAO_Persistent_Index_ExtId rhs  ) 

Copy constructor.

Definition at line 167 of file Persistent_Entries.cpp.

References poa_id_.

00168 {
00169   poa_id_ = rhs.poa_id_;
00170 }

TAO_Persistent_Index_ExtId::~TAO_Persistent_Index_ExtId ( void   ) 

Destructor.

Definition at line 172 of file Persistent_Entries.cpp.

00173 {
00174 }


Member Function Documentation

u_long TAO_Persistent_Index_ExtId::hash ( void   )  const

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

Definition at line 199 of file Persistent_Entries.cpp.

References ACE_String_Base< CHAR >::hash(), and poa_id_.

00200 {
00201   ACE_CString temp (poa_id_);
00202   return temp.hash ();
00203 }

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

Inequality comparison operator.

Definition at line 193 of file Persistent_Entries.cpp.

References poa_id_, and ACE_OS::strcmp().

00194 {
00195   return (ACE_OS::strcmp (poa_id_, rhs.poa_id_) != 0);
00196 }

void TAO_Persistent_Index_ExtId::operator= ( const TAO_Persistent_Index_ExtId rhs  ) 

Assignment operator (does copy memory).

Definition at line 177 of file Persistent_Entries.cpp.

References poa_id_.

00178 {
00179   // Check for self assignment.
00180   if (&rhs == this)
00181     return;
00182 
00183   poa_id_ = rhs.poa_id_;
00184 }

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 187 of file Persistent_Entries.cpp.

References poa_id_, and ACE_OS::strcmp().

00188 {
00189   return (ACE_OS::strcmp (poa_id_, rhs.poa_id_) == 0);
00190 }


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 hash(), operator!=(), operator=(), operator==(), and TAO_Persistent_Index_ExtId().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:49:10 2010 for TAO_CosNaming by  doxygen 1.4.7