Entries.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Entries.h
00006  *
00007  *  $Id: Entries.h 71526 2006-03-14 06:14:35Z jtc $
00008  *
00009  *  @author Marina Spivak <marina@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_ENTRIES_H
00015 #define TAO_ENTRIES_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/Hash_Map_Manager.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/SString.h"
00025 
00026 #include "orbsvcs/CosNamingC.h"
00027 #include "orbsvcs/Naming/naming_serv_export.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 /**
00032  * @class TAO_IntId
00033  *
00034  * @brief Helper class for TAO_Transient_Bindings_Map: unifies several
00035  * data items, so they can be stored together as a  <value>
00036  * for a <key> in a hash table holding the state of a Transient
00037  * Naming Context.
00038  *
00039  * This class holds CORBA Object pointer and a binding type, so
00040  * they can be stored together as a <value> for a <key> in a
00041  * hash table holding the state of a Transient Naming Context.
00042  */
00043 class TAO_Naming_Serv_Export TAO_IntId
00044 {
00045 public:
00046   // = Initialization and termination methods.
00047   /// Constructor.
00048   TAO_IntId (void);
00049 
00050   /// Constructor.
00051   TAO_IntId (CORBA::Object_ptr obj,
00052             CosNaming::BindingType type /* = CosNaming::nobject */);
00053 
00054   /// Copy constructor.
00055   TAO_IntId (const TAO_IntId & rhs);
00056 
00057   /// Destructor.
00058   ~TAO_IntId (void);
00059 
00060   /// Assignment operator (does copy memory).
00061   void operator= (const TAO_IntId & rhs);
00062 
00063   // = Data members.
00064 
00065   /// Object reference to be stored in a Transient Naming Context.
00066   CORBA::Object_ptr ref_;
00067 
00068   /// Binding type for <ref_>.
00069   CosNaming::BindingType type_;
00070 };
00071 
00072 /**
00073  * @class TAO_ExtId
00074  *
00075  * @brief Helper class for TAO_Transient_Bindings_Map: unifies several
00076  * data items, so they can be stored together as a  <key>
00077  * for a <value> in a hash table holding the state of a Transient
00078  * Naming Context.
00079  *
00080  * This class holds id and kind strings, so
00081  * they can be stored together as a <key> for a <value> in a
00082  * hash table holding the state of a Transient Naming Context.
00083  */
00084 class TAO_Naming_Serv_Export TAO_ExtId
00085 {
00086 public:
00087   // = Initialization and termination methods.
00088 
00089   /// Constructor.
00090   TAO_ExtId (void);
00091 
00092   /// Constructor.
00093   TAO_ExtId (const char *id,
00094             const char *kind);
00095 
00096   /// Copy constructor.
00097   TAO_ExtId (const TAO_ExtId & rhs);
00098 
00099   /// Destructor.
00100   ~TAO_ExtId (void);
00101 
00102   // = Assignment and comparison operators.
00103 
00104   /// Assignment operator (does copy memory).
00105   void operator= (const TAO_ExtId & rhs);
00106 
00107   /// Equality comparison operator (must match both id_ and kind_).
00108   bool operator== (const TAO_ExtId &rhs) const;
00109 
00110   /// Inequality comparison operator.
00111   bool operator!= (const TAO_ExtId &rhs) const;
00112 
00113   /// <hash> function is required in order for this class to be usable by
00114   /// ACE_Hash_Map_Manager.
00115   u_long hash (void) const;
00116 
00117   // = Data members.
00118 
00119   /// <kind> portion of the name to be associated with some object
00120   /// reference in a Transient Naming Context.
00121   ACE_CString kind_;
00122 
00123   /// <id> portion of the name to be associated with some object
00124   /// reference in a Transient Naming Context.
00125   ACE_CString id_;
00126 
00127   // = Accessors
00128 
00129   /// Return <id_> in a const char * format.
00130   const char * id (void);
00131 
00132   /// Return <kind_> in a const char * format.
00133   const char * kind (void);
00134 };
00135 
00136 TAO_END_VERSIONED_NAMESPACE_DECL
00137 
00138 #include /**/ "ace/post.h"
00139 #endif /* TAO_ENTRIES_H */

Generated on Sun Jan 27 16:15:29 2008 for TAO_CosNaming by doxygen 1.3.6