ORBInitializer_Registry_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   ORBInitializer_Registry_Adapter.h
00006  *
00007  *  ORBInitializer_Registry_Adapter.h,v 1.9 2005/11/02 07:13:03 ossama Exp
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 "tao/SystemException.h"
00026 #include "ace/Service_Object.h"
00027 #include "ace/CORBA_macros.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 class TAO_ORB_Core;
00032 
00033 namespace PortableInterceptor
00034 {
00035   class ORBInitializer;
00036   typedef ORBInitializer *ORBInitializer_ptr;
00037 
00038   typedef CORBA::ULong SlotId;
00039 }
00040 
00041 namespace TAO
00042 {
00043   /**
00044    * @class ORBInitializer_Registry_Adapter
00045    *
00046    * Class that offers an interface to the ORB to load and manipulate
00047    * ORBInitializer_Registry
00048    */
00049   class TAO_Export ORBInitializer_Registry_Adapter
00050     : public ACE_Service_Object
00051   {
00052     public:
00053       virtual ~ORBInitializer_Registry_Adapter (void);
00054 
00055       /// Register an ORBInitializer with the underlying ORBInitializer
00056       /// array.
00057       virtual void register_orb_initializer (
00058         PortableInterceptor::ORBInitializer_ptr init
00059         ACE_ENV_ARG_DECL) = 0;
00060 
00061       /**
00062        * Begin initialization of all registered ORBInitializers before
00063        * the ORB itself is initialized.
00064        * @return Returns the number of initializers called by pre_init, exactly
00065        * the same number must be called by post_init. During pre_init new
00066        * initializers can be registered, these must not be called during
00067        * post_init
00068        */
00069       virtual size_t pre_init (
00070         TAO_ORB_Core *orb_core,
00071         int argc,
00072         char *argv[],
00073         PortableInterceptor::SlotId &slotid
00074         ACE_ENV_ARG_DECL) = 0;
00075 
00076       /**
00077        * Complete initialization of all registered ORBInitializers after
00078        * the ORB has been initialized. Returns the number of slots
00079        * allocated.
00080        * @param pre_init_count The number of ORBInitializers we must
00081        * call post_init on. There can be more in the registry when during
00082        * pre_init new interceptors are regisered
00083        * @param orb_core The ORB Core
00084        * @param argc Number of arguments
00085        * @param argv Argv array
00086        * @param slotid The slot id
00087        * @param picurrent PI Current, if this is not null, the concrete
00088        * implementation will update the slot id
00089        */
00090       virtual void post_init (
00091         size_t pre_init_count,
00092         TAO_ORB_Core *orb_core,
00093         int argc,
00094         char *argv[],
00095         PortableInterceptor::SlotId slotid
00096         ACE_ENV_ARG_DECL) = 0;
00097   };
00098 }
00099 
00100 TAO_END_VERSIONED_NAMESPACE_DECL
00101 
00102 #include /**/ "ace/post.h"
00103 
00104 #endif /* TAO_ORB_INITIALIZER_REGISTRY_ADAPTER_H */

Generated on Thu Nov 9 11:54:19 2006 for TAO by doxygen 1.3.6