TAO_Persistent_ExtId Class Reference

Helper class for TAO_Persistent_Bindings_Map: unifies several data items, so they can be stored together as a for a in a hash table holding the state of a Persistent Naming Context. More...

#include <Persistent_Entries.h>

List of all members.

Public Member Functions

 TAO_Persistent_ExtId (void)
 Constructor.

 TAO_Persistent_ExtId (const char *id, const char *kind)
 Constructor.

 TAO_Persistent_ExtId (const TAO_Persistent_ExtId &rhs)
 Copy constructor.

 ~TAO_Persistent_ExtId (void)
 Destructor.

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

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

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

u_long hash (void) const
const char * id (void)
const char * kind (void)

Public Attributes

const char * id_
const char * kind_


Detailed Description

Helper class for TAO_Persistent_Bindings_Map: unifies several data items, so they can be stored together as a for a in a hash table holding the state of a Persistent Naming Context.

This class holds id and kind strings, so they can be stored together as a for a in a hash table holding the state of a Persistent Naming Context. Memory for id and kind isn't allocated/deallocated, this class just copies pointers.

Definition at line 85 of file Persistent_Entries.h.


Constructor & Destructor Documentation

TAO_Persistent_ExtId::TAO_Persistent_ExtId void   ) 
 

Constructor.

Definition at line 52 of file Persistent_Entries.cpp.

00053   : id_ (0),
00054     kind_ (0)
00055 {
00056 }

TAO_Persistent_ExtId::TAO_Persistent_ExtId const char *  id,
const char *  kind
 

Constructor.

Definition at line 58 of file Persistent_Entries.cpp.

00060   : id_ (id),
00061     kind_ (kind)
00062 
00063 {
00064 }

TAO_Persistent_ExtId::TAO_Persistent_ExtId const TAO_Persistent_ExtId rhs  ) 
 

Copy constructor.

Definition at line 66 of file Persistent_Entries.cpp.

References id_, and kind_.

00067 {
00068   id_ = rhs.id_;
00069   kind_ = rhs.kind_;
00070 }

TAO_Persistent_ExtId::~TAO_Persistent_ExtId void   ) 
 

Destructor.

Definition at line 72 of file Persistent_Entries.cpp.

00073 {
00074 }


Member Function Documentation

u_long TAO_Persistent_ExtId::hash void   )  const
 

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

Definition at line 102 of file Persistent_Entries.cpp.

References ACE_CString.

00103 {
00104   ACE_CString temp (id_);
00105   temp += kind_;
00106 
00107   return temp.hash ();
00108 }

const char * TAO_Persistent_ExtId::id void   ) 
 

Definition at line 111 of file Persistent_Entries.cpp.

00112 {
00113   return id_;
00114 }

const char * TAO_Persistent_ExtId::kind void   ) 
 

Definition at line 117 of file Persistent_Entries.cpp.

00118 {
00119   return kind_;
00120 }

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

Inequality comparison operator.

Definition at line 95 of file Persistent_Entries.cpp.

References id_, kind_, and ACE_OS::strcmp().

00096 {
00097   return (ACE_OS::strcmp (id_, rhs.id_) != 0)
00098     || (ACE_OS::strcmp (kind_, rhs.kind_) != 0);
00099 }

void TAO_Persistent_ExtId::operator= const TAO_Persistent_ExtId rhs  ) 
 

Assignment operator (does copy memory).

Definition at line 77 of file Persistent_Entries.cpp.

References id_, and kind_.

00078 {
00079   // Check for self assignment.
00080   if (&rhs == this)
00081     return;
00082 
00083   id_ = rhs.id_;
00084   kind_ = rhs.kind_;
00085 }

bool TAO_Persistent_ExtId::operator== const TAO_Persistent_ExtId rhs  )  const
 

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

Definition at line 88 of file Persistent_Entries.cpp.

References id_, kind_, and ACE_OS::strcmp().

00089 {
00090   return (ACE_OS::strcmp (id_, rhs.id_) == 0)
00091     && (ACE_OS::strcmp (kind_, rhs.kind_) == 0);
00092 }


Member Data Documentation

const char* TAO_Persistent_ExtId::id_
 

portion of the name to be associated with some object reference in a Persistent Naming Context.

Definition at line 122 of file Persistent_Entries.h.

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

const char* TAO_Persistent_ExtId::kind_
 

portion of the name to be associated with some object reference in a Persistent Naming Context.

Definition at line 126 of file Persistent_Entries.h.

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


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 16:16:20 2008 for TAO_CosNaming by doxygen 1.3.6