00001 // -*- C++ -*- 00002 00003 // =================================================================== 00004 /** 00005 * @file ORBInitializer_Registry_Adapter.h 00006 * 00007 * $Id: ORBInitializer_Registry_Adapter.h 78935 2007-07-18 12:40:46Z johnnyw $ 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 // =================================================================== 00012 00013 #ifndef TAO_ORB_INITIALIZER_REGISTRY_ADAPTER_H 00014 #define TAO_ORB_INITIALIZER_REGISTRY_ADAPTER_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include /**/ "tao/TAO_Export.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include "tao/Basic_Types.h" 00025 #include "ace/Service_Object.h" 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 class TAO_ORB_Core; 00030 00031 namespace PortableInterceptor 00032 { 00033 class ORBInitializer; 00034 typedef ORBInitializer *ORBInitializer_ptr; 00035 00036 typedef CORBA::ULong SlotId; 00037 } 00038 00039 namespace TAO 00040 { 00041 /** 00042 * @class ORBInitializer_Registry_Adapter 00043 * 00044 * Class that offers an interface to the ORB to load and manipulate 00045 * ORBInitializer_Registry 00046 */ 00047 class TAO_Export ORBInitializer_Registry_Adapter 00048 : public ACE_Service_Object 00049 { 00050 public: 00051 virtual ~ORBInitializer_Registry_Adapter (void); 00052 00053 /// Register an ORBInitializer with the underlying ORBInitializer 00054 /// array. 00055 virtual void register_orb_initializer ( 00056 PortableInterceptor::ORBInitializer_ptr init) = 0; 00057 00058 /** 00059 * Begin initialization of all registered ORBInitializers before 00060 * the ORB itself is initialized. 00061 * @return Returns the number of initializers called by pre_init, exactly 00062 * the same number must be called by post_init. During pre_init new 00063 * initializers can be registered, these must not be called during 00064 * post_init 00065 */ 00066 virtual size_t pre_init ( 00067 TAO_ORB_Core *orb_core, 00068 int argc, 00069 char *argv[], 00070 PortableInterceptor::SlotId &slotid) = 0; 00071 00072 /** 00073 * Complete initialization of all registered ORBInitializers after 00074 * the ORB has been initialized. Returns the number of slots 00075 * allocated. 00076 * @param pre_init_count The number of ORBInitializers we must 00077 * call post_init on. There can be more in the registry when during 00078 * pre_init new interceptors are regisered 00079 * @param orb_core The ORB Core 00080 * @param argc Number of arguments 00081 * @param argv Argv array 00082 * @param slotid The slot id 00083 */ 00084 virtual void post_init ( 00085 size_t pre_init_count, 00086 TAO_ORB_Core *orb_core, 00087 int argc, 00088 char *argv[], 00089 PortableInterceptor::SlotId slotid) = 0; 00090 }; 00091 } 00092 00093 TAO_END_VERSIONED_NAMESPACE_DECL 00094 00095 #include /**/ "ace/post.h" 00096 00097 #endif /* TAO_ORB_INITIALIZER_REGISTRY_ADAPTER_H */