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