Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_PG_GROUP_FACTORY_H
00014 #define TAO_PG_GROUP_FACTORY_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif
00023
00024 #include "orbsvcs/PortableGroup/PG_Object_Group_Manipulator.h"
00025
00026 #include "orbsvcs/PortableGroupC.h"
00027
00028 #include "tao/PortableServer/PortableServer.h"
00029
00030 #include "ace/ACE.h"
00031 #include "ace/Hash_Map_Manager.h"
00032
00033
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035
00036
00037
00038 namespace TAO
00039 {
00040 class PG_Property_Set;
00041 }
00042
00043 namespace TAO
00044 {
00045
00046
00047 class PG_Object_Group;
00048
00049
00050
00051
00052 class TAO_PortableGroup_Export PG_Group_Factory
00053 {
00054
00055
00056 typedef ACE_Hash_Map_Manager_Ex<
00057 PortableGroup::ObjectGroupId,
00058 ::TAO::PG_Object_Group *,
00059 ACE_Hash<ACE_UINT64>,
00060 ACE_Equal_To<ACE_UINT64>,
00061 TAO_SYNCH_MUTEX> Group_Map;
00062
00063 typedef ACE_Hash_Map_Entry <PortableGroup::ObjectGroupId, ::TAO::PG_Object_Group *> Group_Map_Entry;
00064
00065 typedef ACE_Hash_Map_Iterator_Ex <
00066 PortableGroup::ObjectGroupId,
00067 ::TAO::PG_Object_Group *,
00068 ACE_Hash<ACE_UINT64>,
00069 ACE_Equal_To<ACE_UINT64>,
00070 TAO_SYNCH_MUTEX> Group_Map_Iterator;
00071
00072 public:
00073
00074
00075 PG_Group_Factory ();
00076
00077
00078 ~PG_Group_Factory ();
00079
00080 void init (
00081 CORBA::ORB_ptr orb,
00082 PortableServer::POA_ptr poa,
00083 PortableGroup::FactoryRegistry_ptr factory_registry);
00084
00085
00086 TAO::PG_Object_Group * create_group (
00087 const char * type_id,
00088 const PortableGroup::Criteria & the_criteria,
00089 TAO::PG_Property_Set * typeid_properties);
00090
00091
00092 void delete_group (PortableGroup::ObjectGroup_ptr object_group);
00093
00094
00095 void delete_group (PortableGroup::ObjectGroupId group_id);
00096
00097 PortableGroup::ObjectGroups *
00098 groups_at_location (
00099 const PortableGroup::Location & the_location);
00100
00101
00102
00103
00104
00105
00106
00107
00108 int insert_group ( ::TAO::PG_Object_Group * group);
00109
00110
00111
00112
00113
00114 int insert_group (PortableGroup::ObjectGroupId group_id, ::TAO::PG_Object_Group * group);
00115
00116
00117
00118
00119
00120 int find_group (PortableGroup::ObjectGroupId group_id, ::TAO::PG_Object_Group *& group) const;
00121
00122
00123
00124
00125
00126
00127 int find_group (PortableGroup::ObjectGroup_ptr object_group, ::TAO::PG_Object_Group *& group) const;
00128
00129
00130
00131
00132
00133 int destroy_group (PortableGroup::ObjectGroupId object_group_id);
00134
00135
00136
00137
00138
00139
00140 int destroy_group (PortableGroup::ObjectGroup_ptr object_group);
00141
00142 private:
00143
00144 private:
00145
00146 CORBA::ORB_var orb_;
00147
00148
00149 PortableServer::POA_var poa_;
00150
00151
00152 PortableGroup::FactoryRegistry_var factory_registry_;
00153
00154 ::TAO::PG_Object_Group_Manipulator manipulator_;
00155
00156 const char * domain_id_;
00157
00158 Group_Map group_map_;
00159
00160
00161 };
00162 }
00163
00164 TAO_END_VERSIONED_NAMESPACE_DECL
00165
00166 #include "ace/post.h"
00167
00168 #endif