00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_PG_OBJECT_GROUP_MANIPULATOR_H
00015 #define TAO_PG_OBJECT_GROUP_MANIPULATOR_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 #pragma once
00023 #endif
00024
00025 #include "orbsvcs/PortableGroupS.h"
00026
00027 #include "tao/IORManipulation/IORManip_Loader.h"
00028
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030
00031 namespace TAO
00032 {
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 class TAO_PortableGroup_Export PG_Object_Group_Manipulator
00043 {
00044 public:
00045
00046
00047 PG_Object_Group_Manipulator ();
00048
00049
00050 ~PG_Object_Group_Manipulator ();
00051
00052
00053
00054
00055 void init (CORBA::ORB_ptr orb,
00056 PortableServer::POA_ptr poa
00057 ACE_ENV_ARG_DECL);
00058
00059
00060
00061
00062 PortableGroup::ObjectGroup_ptr create_object_group (
00063 const char * type_id,
00064 const char * domain_id,
00065 PortableGroup::ObjectGroupId & group_id
00066 ACE_ENV_ARG_DECL);
00067
00068 PortableGroup::ObjectGroup_ptr remove_profiles (
00069 PortableGroup::ObjectGroup_ptr group,
00070 PortableGroup::ObjectGroup_ptr profile
00071 ACE_ENV_ARG_DECL) const;
00072
00073 PortableGroup::ObjectGroup_ptr merge_iors (
00074 TAO_IOP::TAO_IOR_Manipulation::IORList & iors
00075 ACE_ENV_ARG_DECL) const;
00076
00077 int set_primary (
00078 TAO_IOP::TAO_IOR_Property * prop,
00079 PortableGroup::ObjectGroup_ptr reference,
00080 CORBA::Object_ptr new_primary
00081 ACE_ENV_ARG_DECL) const;
00082
00083 void dump_membership (const char * label,
00084 PortableGroup::ObjectGroup_ptr member) const;
00085
00086 private:
00087
00088
00089
00090
00091 void allocate_ogid (PortableGroup::ObjectGroupId & ogid);
00092
00093
00094
00095
00096 PortableServer::ObjectId *
00097 convert_ogid_to_oid (PortableGroup::ObjectGroupId ogid) const;
00098
00099 private:
00100
00101
00102 CORBA::ORB_var orb_;
00103
00104
00105 PortableServer::POA_var poa_;
00106
00107
00108 TAO_IOP::TAO_IOR_Manipulation_var iorm_;
00109
00110
00111 TAO_SYNCH_MUTEX lock_ogid_;
00112
00113
00114 PortableGroup::ObjectGroupId next_ogid_;
00115
00116 };
00117 }
00118
00119 TAO_END_VERSIONED_NAMESPACE_DECL
00120
00121 #include "ace/post.h"
00122
00123 #endif