00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_OBJECT_REF_TABLE_H
00015 #define TAO_OBJECT_REF_TABLE_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "tao/orbconf.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #include "tao/CORBA_String.h"
00026 #include "tao/Object.h"
00027 #include "tao/TAO_Export.h"
00028
00029 #include "ace/Array_Map.h"
00030
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class TAO_Export TAO_Object_Ref_Table
00052 {
00053 public:
00054
00055 typedef ACE_Array_Map<CORBA::String_var,
00056 CORBA::Object_var,
00057 TAO::String_Var_Equal_To> Table;
00058
00059 typedef Table::iterator iterator;
00060
00061
00062 TAO_Object_Ref_Table (void);
00063
00064
00065
00066
00067
00068
00069
00070 int register_initial_reference (const char * id,
00071 CORBA::Object_ptr obj,
00072 bool rebind = false);
00073
00074
00075
00076 CORBA::Object_ptr resolve_initial_reference (const char * id);
00077
00078
00079 void destroy (void);
00080
00081
00082
00083
00084
00085 iterator begin (void);
00086 iterator end (void);
00087
00088
00089
00090 size_t current_size (void) const;
00091
00092 private:
00093
00094
00095
00096
00097
00098 int bind (const char *orb_id, CORBA::Object_ptr obj);
00099 CORBA::Object_ptr find (const char *orb_id);
00100 int unbind (const char *orb_id);
00101
00102
00103 private:
00104
00105
00106 TAO_Object_Ref_Table (const TAO_Object_Ref_Table &);
00107 void operator= (const TAO_Object_Ref_Table &);
00108
00109 private:
00110
00111
00112 Table table_;
00113
00114
00115 TAO_SYNCH_MUTEX lock_;
00116
00117 };
00118
00119 TAO_END_VERSIONED_NAMESPACE_DECL
00120
00121 #ifdef __ACE_INLINE__
00122 # include "tao/Object_Ref_Table.inl"
00123 #endif
00124
00125 #include "ace/post.h"
00126
00127 #endif