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

00056   : id_ (0),
00057     kind_ (0)
00058 {
00059 }

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

Constructor.

Definition at line 61 of file Persistent_Entries.cpp.

00063   : id_ (id),
00064     kind_ (kind)
00065 
00066 {
00067 }

TAO_Persistent_ExtId::TAO_Persistent_ExtId const TAO_Persistent_ExtId rhs  ) 
 

Copy constructor.

Definition at line 69 of file Persistent_Entries.cpp.

References id_, and kind_.

00070 {
00071   id_ = rhs.id_;
00072   kind_ = rhs.kind_;
00073 }

TAO_Persistent_ExtId::~TAO_Persistent_ExtId void   ) 
 

Destructor.

Definition at line 75 of file Persistent_Entries.cpp.

00076 {
00077 }


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

References ACE_CString.

00106 {
00107   ACE_CString temp (id_);
00108   temp += kind_;
00109 
00110   return temp.hash ();
00111 }

const char * TAO_Persistent_ExtId::id void   ) 
 

Definition at line 114 of file Persistent_Entries.cpp.

00115 {
00116   return id_;
00117 }

const char * TAO_Persistent_ExtId::kind void   ) 
 

Definition at line 120 of file Persistent_Entries.cpp.

00121 {
00122   return kind_;
00123 }

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

Inequality comparison operator.

Definition at line 98 of file Persistent_Entries.cpp.

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

00099 {
00100   return (ACE_OS::strcmp (id_, rhs.id_) != 0)
00101     || (ACE_OS::strcmp (kind_, rhs.kind_) != 0);
00102 }

void TAO_Persistent_ExtId::operator= const TAO_Persistent_ExtId rhs  ) 
 

Assignment operator (does copy memory).

Definition at line 80 of file Persistent_Entries.cpp.

References id_, and kind_.

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

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

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

Definition at line 91 of file Persistent_Entries.cpp.

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

00092 {
00093   return (ACE_OS::strcmp (id_, rhs.id_) == 0)
00094     && (ACE_OS::strcmp (kind_, rhs.kind_) == 0);
00095 }


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 Thu Nov 9 13:57:44 2006 for TAO_CosNaming by doxygen 1.3.6