00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef TAO_Notify_POA_Helper_H
00012 #define TAO_Notify_POA_Helper_H
00013
00014 #include "ace/pre.h"
00015
00016 #include "orbsvcs/Notify/notify_serv_export.h"
00017
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif
00021
00022 #include "orbsvcs/Notify/ID_Factory.h"
00023
00024 #include "tao/PortableServer/PortableServer.h"
00025
00026 #include "ace/Copy_Disabled.h"
00027
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029
00030
00031
00032
00033
00034
00035
00036 class TAO_Notify_Serv_Export TAO_Notify_POA_Helper : private ACE_Copy_Disabled
00037 {
00038 public:
00039
00040 TAO_Notify_POA_Helper (void);
00041
00042
00043 void init (PortableServer::POA_ptr parent_poa,
00044 const char* poa_name);
00045
00046 #if !defined (CORBA_E_MICRO)
00047
00048 void init_persistent (PortableServer::POA_ptr parent_poa,
00049 const char* poa_name);
00050 #endif
00051
00052
00053 void init (PortableServer::POA_ptr parent_poa);
00054
00055
00056 virtual ~TAO_Notify_POA_Helper ();
00057
00058
00059 PortableServer::POA_ptr poa (void);
00060
00061
00062 void destroy (void);
00063
00064
00065 CORBA::Object_ptr activate (PortableServer::Servant servant,
00066 CORBA::Long& id);
00067
00068
00069 CORBA::Object_ptr activate_with_id (PortableServer::Servant servant, CORBA::Long id);
00070
00071
00072 void deactivate (CORBA::Long id) const;
00073
00074
00075 CORBA::Object_ptr id_to_reference (CORBA::Long id) const;
00076
00077
00078 PortableServer::ServantBase * reference_to_servant (CORBA::Object_ptr ptr) const;
00079
00080 CORBA::Object_ptr servant_to_reference (PortableServer::ServantBase * servant) const;
00081
00082
00083 ACE_CString get_unique_id (void);
00084
00085 protected:
00086
00087 virtual void set_policy (PortableServer::POA_ptr parent_poa,
00088 CORBA::PolicyList &policy_list);
00089
00090 #if !defined (CORBA_E_MICRO)
00091
00092 virtual void set_persistent_policy (PortableServer::POA_ptr parent_poa,
00093 CORBA::PolicyList &policy_list);
00094 #endif
00095
00096
00097 void create_i (PortableServer::POA_ptr parent_poa,
00098 const char* poa_name,
00099 CORBA::PolicyList &policy_list);
00100
00101
00102 PortableServer::ObjectId* long_to_ObjectId (CORBA::Long id) const;
00103
00104 protected:
00105
00106 PortableServer::POA_var poa_;
00107
00108
00109 TAO_Notify_ID_Factory id_factory_;
00110 };
00111
00112 TAO_END_VERSIONED_NAMESPACE_DECL
00113
00114 #if defined (__ACE_INLINE__)
00115 #include "orbsvcs/Notify/POA_Helper.inl"
00116 #endif
00117
00118 #include "ace/post.h"
00119
00120 #endif