00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file PI_ORBInitializer.h 00006 * 00007 * PI_ORBInitializer.h,v 1.4 2006/03/10 07:19:12 jtc Exp 00008 * 00009 * @author Tim Bradley <bradley_t@ociweb.com> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_PI_ORB_INITIALIZER_H 00014 #define TAO_PI_ORB_INITIALIZER_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include "tao/orbconf.h" 00019 00020 #if TAO_HAS_INTERCEPTORS == 1 00021 00022 #include "tao/PI/pi_export.h" 00023 00024 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 #include "tao/LocalObject.h" 00029 #include "tao/PI/ORBInitializerC.h" 00030 #include "tao/PI/PolicyFactoryC.h" 00031 00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00033 00034 /// Forward Declarations 00035 class TAO_PI_PolicyFactory; 00036 00037 /// PortableServer ORB initializer. 00038 class TAO_PI_Export TAO_PI_ORBInitializer 00039 : public virtual PortableInterceptor::ORBInitializer, 00040 public virtual TAO_Local_RefCounted_Object 00041 { 00042 public: 00043 00044 /** 00045 * @name PortableInterceptor::ORBInitializer methods 00046 * 00047 * The following methods are required by the 00048 * PortableInterceptor::ORBInitializer interface. 00049 */ 00050 //@{ 00051 00052 void pre_init (PortableInterceptor::ORBInitInfo_ptr info 00053 ACE_ENV_ARG_DECL) 00054 ACE_THROW_SPEC ((CORBA::SystemException)); 00055 00056 void post_init (PortableInterceptor::ORBInitInfo_ptr info 00057 ACE_ENV_ARG_DECL) 00058 ACE_THROW_SPEC ((CORBA::SystemException)); 00059 00060 //@} 00061 00062 00063 private: 00064 00065 /// Register PortableInterceptor policy factories. 00066 void register_policy_factories (PortableInterceptor::ORBInitInfo_ptr info 00067 ACE_ENV_ARG_DECL); 00068 00069 00070 /// Instance of the PI policy factory. 00071 /** 00072 * The PI policy factory is stateless and reentrant, so share 00073 * a single instance between all ORBs. 00074 */ 00075 PortableInterceptor::PolicyFactory_var policy_factory_; 00076 }; 00077 00078 TAO_END_VERSIONED_NAMESPACE_DECL 00079 00080 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00081 00082 #include /**/ "ace/post.h" 00083 00084 #endif /* TAO_PI_ORB_INITIALIZER_H */