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_


Detailed Description

Definition at line 58 of file Storable_Naming_Context.h.


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.

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

TAO_Storable_ExtId::TAO_Storable_ExtId ( const TAO_Storable_ExtId rhs  ) 

Copy constructor.

Definition at line 77 of file Storable_Naming_Context.cpp.

References id_, and kind_.

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

TAO_Storable_ExtId::~TAO_Storable_ExtId ( void   ) 

Destructor.

Definition at line 83 of file Storable_Naming_Context.cpp.

00084 {
00085 }


Member Function Documentation

u_long TAO_Storable_ExtId::hash ( void   )  const

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

Definition at line 113 of file Storable_Naming_Context.cpp.

References id_, and kind_.

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

const char * TAO_Storable_ExtId::id ( void   ) 

Definition at line 126 of file Storable_Naming_Context.cpp.

References id_.

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

const char * TAO_Storable_ExtId::kind ( void   ) 

Definition at line 132 of file Storable_Naming_Context.cpp.

References kind_.

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

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

Inequality comparison operator.

Definition at line 106 of file Storable_Naming_Context.cpp.

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

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

void TAO_Storable_ExtId::operator= ( const TAO_Storable_ExtId rhs  ) 

Assignment operator (does copy memory).

Definition at line 88 of file Storable_Naming_Context.cpp.

References id_, and kind_.

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

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

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

Definition at line 99 of file Storable_Naming_Context.cpp.

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

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


Member Data Documentation

CORBA::String_var TAO_Storable_ExtId::id_

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

CORBA::String_var TAO_Storable_ExtId::kind_

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


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