00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Stub_Factory.h 00006 * 00007 * Stub_Factory.h,v 1.8 2005/11/02 07:13:04 ossama Exp 00008 * 00009 * Defines the a factory interface for creating Stubs. 00010 * This class creates the default stub, that is used in 00011 * plain CORBA. 00012 * 00013 * 00014 * @author Angelo Corsaro <corsaro@cs.wustl.edu> 00015 */ 00016 //============================================================================= 00017 00018 #ifndef TAO_STUB_FACTORY_H_ 00019 #define TAO_STUB_FACTORY_H_ 00020 00021 #include /**/ "ace/pre.h" 00022 00023 #include "tao/TAO_Export.h" 00024 00025 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00026 # pragma once 00027 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00028 00029 #include "tao/Versioned_Namespace.h" 00030 00031 #include "ace/Service_Object.h" 00032 #include "ace/CORBA_macros.h" 00033 00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00035 00036 // Forward references 00037 class TAO_MProfile; 00038 class TAO_ORB_Core; 00039 class TAO_Stub; 00040 00041 namespace CORBA 00042 { 00043 class Environment; 00044 } 00045 00046 /** 00047 * @class TAO_Stub_Factory 00048 * 00049 * This class is a factory whose product is the plain TAO_Stub used by 00050 * TAO. Its subclasses build Stub object that are specialization of 00051 * the TAO_Stub. As an example TAO_RT_Stub_Factory creates 00052 * RT_TAO_Stub. This factory, or one of its subclasses is dynamically 00053 * plugged into the ORB_Core, and is used by the ORB_Core to create 00054 * Stub Objects. 00055 */ 00056 class TAO_Export TAO_Stub_Factory : public ACE_Service_Object 00057 { 00058 public: 00059 /// Destructor. 00060 virtual ~TAO_Stub_Factory (void); 00061 00062 /// Creates a Stub Object. 00063 virtual TAO_Stub *create_stub (const char *repository_id, 00064 const TAO_MProfile &profiles, 00065 TAO_ORB_Core *orb_core 00066 ACE_ENV_ARG_DECL) = 0; 00067 }; 00068 00069 TAO_END_VERSIONED_NAMESPACE_DECL 00070 00071 #include /**/ "ace/post.h" 00072 #endif /* TAO_STUB_FACTORY_H_ */