TAO_ExtId Class Reference

Helper class for TAO_Transient_Bindings_Map: unifies several data items, so they can be stored together as a <key> for a

in a hash table holding the state of a Transient Naming Context. More...

#include <Entries.h>

Collaboration diagram for TAO_ExtId:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_ExtId (void)
 Constructor.
 TAO_ExtId (const char *id, const char *kind)
 Constructor.
 TAO_ExtId (const TAO_ExtId &rhs)
 Copy constructor.
 ~TAO_ExtId (void)
 Destructor.
void operator= (const TAO_ExtId &rhs)
 Assignment operator (does copy memory).
bool operator== (const TAO_ExtId &rhs) const
 Equality comparison operator (must match both id_ and kind_).
bool operator!= (const TAO_ExtId &rhs) const
 Inequality comparison operator.
u_long hash (void) const
const char * id (void)
 Return <id_> in a const char * format.
const char * kind (void)
 Return <kind_> in a const char * format.

Public Attributes

ACE_CString kind_
ACE_CString id_

Detailed Description

Helper class for TAO_Transient_Bindings_Map: unifies several data items, so they can be stored together as a <key> for a

in a hash table holding the state of a Transient Naming Context.

This class holds id and kind strings, so they can be stored together as a <key> for a

in a hash table holding the state of a Transient Naming Context.

Definition at line 84 of file Entries.h.


Constructor & Destructor Documentation

TAO_ExtId::TAO_ExtId ( void   ) 

Constructor.

Definition at line 57 of file Entries.cpp.

00058   : kind_ (),
00059     id_ ()
00060 {
00061 }

TAO_ExtId::TAO_ExtId ( const char *  id,
const char *  kind 
)

Constructor.

Definition at line 63 of file Entries.cpp.

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

TAO_ExtId::TAO_ExtId ( const TAO_ExtId rhs  ) 

Copy constructor.

Definition at line 70 of file Entries.cpp.

References id_, and kind_.

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

TAO_ExtId::~TAO_ExtId ( void   ) 

Destructor.

Definition at line 76 of file Entries.cpp.

00077 {
00078 }


Member Function Documentation

u_long TAO_ExtId::hash ( void   )  const

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

Definition at line 116 of file Entries.cpp.

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

00117 {
00118   ACE_CString temp (id_);
00119   temp += kind_;
00120 
00121   return temp.hash ();
00122 }

const char * TAO_ExtId::id ( void   ) 

Return <id_> in a const char * format.

Definition at line 81 of file Entries.cpp.

References ACE_String_Base< CHAR >::fast_rep(), and id_.

00082 {
00083   return id_.fast_rep ();
00084 }

const char * TAO_ExtId::kind ( void   ) 

Return <kind_> in a const char * format.

Definition at line 87 of file Entries.cpp.

References ACE_String_Base< CHAR >::fast_rep(), and kind_.

00088 {
00089   return kind_.fast_rep ();
00090 }

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

Inequality comparison operator.

Definition at line 110 of file Entries.cpp.

References id_, and kind_.

00111 {
00112   return id_ != rhs.id_ || kind_ != rhs.kind_;
00113 }

void TAO_ExtId::operator= ( const TAO_ExtId rhs  ) 

Assignment operator (does copy memory).

Definition at line 93 of file Entries.cpp.

References id_, and kind_.

00094 {
00095   // Check for self assignment.
00096   if (&rhs == this)
00097     return;
00098 
00099   id_ = rhs.id_;
00100   kind_ = rhs.kind_;
00101 }

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

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

Definition at line 104 of file Entries.cpp.

References id_, and kind_.

00105 {
00106   return id_ == rhs.id_ && kind_ == rhs.kind_;
00107 }


Member Data Documentation

ACE_CString TAO_ExtId::id_

<id> portion of the name to be associated with some object reference in a Transient Naming Context.

Definition at line 125 of file Entries.h.

Referenced by hash(), id(), operator!=(), operator=(), operator==(), and TAO_ExtId().

ACE_CString TAO_ExtId::kind_

<kind> portion of the name to be associated with some object reference in a Transient Naming Context.

Definition at line 121 of file Entries.h.

Referenced by hash(), kind(), operator!=(), operator=(), operator==(), and TAO_ExtId().


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