00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_PG_OBJECT_GROUP_MANAGER_H
00015 #define TAO_PG_OBJECT_GROUP_MANAGER_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00020 #include "orbsvcs/PortableGroupS.h"
00021
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 #pragma once
00024 #endif
00025
00026 #include "orbsvcs/PortableGroup/PG_ObjectGroup_Map.h"
00027 #include "orbsvcs/PortableGroup/PG_Location_Map.h"
00028
00029 #include "tao/PortableServer/Key_Adapters.h"
00030 #include "tao/PortableServer/PortableServerC.h"
00031
00032
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034
00035
00036 class TAO_PG_GenericFactory;
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 class TAO_PortableGroup_Export TAO_PG_ObjectGroupManager
00048 : public virtual POA_PortableGroup::ObjectGroupManager
00049 {
00050 public:
00051
00052
00053 TAO_PG_ObjectGroupManager (void);
00054
00055
00056 ~TAO_PG_ObjectGroupManager (void);
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 virtual PortableGroup::ObjectGroup_ptr create_member (
00068 PortableGroup::ObjectGroup_ptr object_group,
00069 const PortableGroup::Location & the_location,
00070 const char * type_id,
00071 const PortableGroup::Criteria & the_criteria);
00072
00073
00074 virtual PortableGroup::ObjectGroup_ptr add_member (
00075 PortableGroup::ObjectGroup_ptr object_group,
00076 const PortableGroup::Location & the_location,
00077 CORBA::Object_ptr member);
00078
00079
00080
00081
00082
00083
00084
00085
00086 virtual PortableGroup::ObjectGroup_ptr remove_member (
00087 PortableGroup::ObjectGroup_ptr object_group,
00088 const PortableGroup::Location & the_location);
00089
00090
00091 virtual PortableGroup::Locations * locations_of_members (
00092 PortableGroup::ObjectGroup_ptr object_group);
00093
00094
00095 virtual PortableGroup::ObjectGroups * groups_at_location (
00096 const PortableGroup::Location & the_location);
00097
00098
00099
00100 virtual PortableGroup::ObjectGroupId get_object_group_id (
00101 PortableGroup::ObjectGroup_ptr object_group);
00102
00103
00104 virtual PortableGroup::ObjectGroup_ptr get_object_group_ref (
00105 PortableGroup::ObjectGroup_ptr object_group);
00106
00107
00108
00109 virtual CORBA::Object_ptr get_member_ref (
00110 PortableGroup::ObjectGroup_ptr object_group,
00111 const PortableGroup::Location & loc);
00112
00113
00114
00115
00116 virtual PortableGroup::ObjectGroup_ptr get_object_group_ref_from_id (
00117 PortableGroup::ObjectGroupId group_id
00118 );
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 PortableGroup::ObjectGroup_ptr _tao_add_member (
00130 PortableGroup::ObjectGroup_ptr object_group,
00131 const PortableGroup::Location & the_location,
00132 CORBA::Object_ptr member,
00133 const char * type_id,
00134 const CORBA::Boolean propagate_member_already_present);
00135
00136
00137
00138
00139
00140
00141
00142 PortableGroup::ObjectGroup_ptr create_object_group (
00143 CORBA::ULong group_id,
00144 const PortableServer::ObjectId &oid,
00145 const char * type_id,
00146 const PortableGroup::Criteria & the_criteria);
00147
00148
00149
00150
00151
00152
00153 void destroy_object_group (const PortableServer::ObjectId & oid);
00154
00155
00156
00157 PortableGroup::Properties * get_properties (
00158 PortableGroup::ObjectGroup_ptr object_group);
00159
00160
00161 char * type_id (PortableGroup::ObjectGroup_ptr object_group);
00162
00163
00164
00165
00166
00167
00168 PortableGroup::ObjectGroup_ptr object_group (
00169 const PortableServer::ObjectId & oid);
00170
00171
00172 CORBA::ULong member_count (PortableGroup::ObjectGroup_ptr group);
00173
00174
00175
00176 void poa (PortableServer::POA_ptr p);
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186 void generic_factory (TAO_PG_GenericFactory * generic_factory);
00187
00188 protected:
00189
00190
00191
00192 PortableGroup::ObjectGroup_ptr add_member_i (
00193 PortableGroup::ObjectGroup_ptr object_group,
00194 const PortableGroup::Location & the_location,
00195 CORBA::Object_ptr member,
00196 const CORBA::Boolean check_type_id);
00197
00198
00199
00200 TAO_PG_ObjectGroup_Map_Entry * get_group_entry (
00201 PortableGroup::ObjectGroup_ptr object_group);
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211 CORBA::Boolean member_already_present (
00212 const TAO_PG_ObjectGroup_Array & groups,
00213 TAO_PG_ObjectGroup_Map_Entry * group_entry);
00214
00215
00216 size_t get_object_group_position (
00217 const TAO_PG_ObjectGroup_Array & groups,
00218 TAO_PG_ObjectGroup_Map_Entry * group_entry);
00219
00220
00221
00222
00223
00224 CORBA::Boolean valid_type_id (
00225 PortableGroup::ObjectGroup_ptr object_group,
00226 TAO_PG_ObjectGroup_Map_Entry * group_entry,
00227 CORBA::Object_ptr member);
00228
00229 private:
00230
00231
00232 PortableServer::POA_var poa_;
00233
00234
00235
00236 TAO_PG_ObjectGroup_Map object_group_map_;
00237
00238
00239
00240 TAO_PG_Location_Map location_map_;
00241
00242
00243
00244 TAO_PG_GenericFactory * generic_factory_;
00245
00246
00247 TAO_SYNCH_MUTEX lock_;
00248
00249 };
00250
00251 TAO_END_VERSIONED_NAMESPACE_DECL
00252
00253 #include "ace/post.h"
00254
00255 #endif