TAO_Storable_ExtId Class Reference

#include <Storable_Naming_Context.h>

List of all members.

Public Member Functions

 TAO_Storable_ExtId (void)
 Constructor.

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

 TAO_Storable_ExtId (const TAO_Storable_ExtId &rhs)
 Copy constructor.

 ~TAO_Storable_ExtId (void)
 Destructor.

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

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

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

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

Public Attributes

CORBA::String_var id_
CORBA::String_var kind_


Constructor & Destructor Documentation

TAO_Storable_ExtId::TAO_Storable_ExtId void   ) 
 

Constructor.

Definition at line 65 of file Storable_Naming_Context.cpp.

00066   : id_ (CORBA::string_dup ("")),
00067     kind_ (CORBA::string_dup (""))
00068 {
00069 }

TAO_Storable_ExtId::TAO_Storable_ExtId const char *  id,
const char *  kind
 

Constructor.

Definition at line 71 of file Storable_Naming_Context.cpp.

00073   : id_ (id)
00074   , kind_ (kind)
00075 {
00076 }

TAO_Storable_ExtId::TAO_Storable_ExtId const TAO_Storable_ExtId rhs  ) 
 

Copy constructor.

Definition at line 78 of file Storable_Naming_Context.cpp.

References id_, and kind_.

00079 {
00080   id_ = rhs.id_;
00081   kind_ = rhs.kind_;
00082 }

TAO_Storable_ExtId::~TAO_Storable_ExtId void   ) 
 

Destructor.

Definition at line 84 of file Storable_Naming_Context.cpp.

00085 {
00086 }


Member Function Documentation

u_long TAO_Storable_ExtId::hash void   )  const
 

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

Definition at line 114 of file Storable_Naming_Context.cpp.

References ACE_CString.

00115 {
00116   // @CJC I wager this could be optimized a bit better, but I'm not
00117   // sure how much it's called.  At the very least, we could allocate
00118   // just one ACE_CString, and copy id_ and kind_ into that, rather than
00119   // taking a double-hit on allocations.
00120   ACE_CString temp (id_.in());
00121   temp += kind_.in();
00122 
00123   return temp.hash ();
00124 }

const char * TAO_Storable_ExtId::id void   ) 
 

Definition at line 127 of file Storable_Naming_Context.cpp.

00128 {
00129   return id_.in();
00130 }

const char * TAO_Storable_ExtId::kind void   ) 
 

Definition at line 133 of file Storable_Naming_Context.cpp.

00134 {
00135   return kind_.in();
00136 }

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

Inequality comparison operator.

Definition at line 107 of file Storable_Naming_Context.cpp.

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

00108 {
00109   return (ACE_OS::strcmp (id_.in(), rhs.id_.in()) != 0)
00110     || (ACE_OS::strcmp (kind_.in(), rhs.kind_.in()) != 0);
00111 }

void TAO_Storable_ExtId::operator= const TAO_Storable_ExtId rhs  ) 
 

Assignment operator (does copy memory).

Definition at line 89 of file Storable_Naming_Context.cpp.

References id_, and kind_.

00090 {
00091   // Check for self assignment.
00092   if (&rhs == this)
00093     return;
00094 
00095   id_ = rhs.id_;
00096   kind_ = rhs.kind_;
00097 }

bool TAO_Storable_ExtId::operator== const TAO_Storable_ExtId rhs  )  const
 

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

Definition at line 100 of file Storable_Naming_Context.cpp.

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

00101 {
00102   return (ACE_OS::strcmp (id_.in(), rhs.id_.in()) == 0)
00103     && (ACE_OS::strcmp (kind_.in(), rhs.kind_.in()) == 0);
00104 }


Member Data Documentation

CORBA::String_var TAO_Storable_ExtId::id_
 

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

Definition at line 95 of file Storable_Naming_Context.h.

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

CORBA::String_var TAO_Storable_ExtId::kind_
 

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

Definition at line 99 of file Storable_Naming_Context.h.

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


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