00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ORT_Adapter_Factory.h 00006 * 00007 * $Id: ORT_Adapter_Factory.h 71473 2006-03-10 07:19:20Z jtc $ 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 //============================================================================= 00012 00013 00014 #ifndef TAO_ORT_ADAPTER_FACTORY_H 00015 #define TAO_ORT_ADAPTER_FACTORY_H 00016 00017 #include /**/ "ace/pre.h" 00018 00019 #include "tao/PortableServer/portableserver_export.h" 00020 00021 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00022 # pragma once 00023 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00024 00025 #include "tao/Versioned_Namespace.h" 00026 #include "ace/Service_Object.h" 00027 00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00029 00030 namespace TAO 00031 { 00032 class ORT_Adapter; 00033 } 00034 00035 namespace TAO 00036 { 00037 /** 00038 * @class ORT_Adapter_Factory 00039 * 00040 * @brief ORT_Adapter_Factory 00041 * 00042 * Class that creates one instance of TAO::ORT_Adapter per 00043 * POA on the POA's first usage of its objectreferencetemplate_adapter. 00044 * This is a base class for the actual implementation in the 00045 * TAO_ObjectReferenceTemplate library. 00046 */ 00047 class TAO_PortableServer_Export ORT_Adapter_Factory 00048 : public ACE_Service_Object 00049 { 00050 public: 00051 00052 /// Destructor. 00053 /** 00054 * @note Even though this class only defines an interface, a 00055 * destructor is necessary to avoid dynamic_cast<> failures 00056 * when using g++ 4.0's -fvisibility-inlines-hidden command 00057 * line option. Apparently the compiler generated 00058 * destructor is inlined. 00059 */ 00060 virtual ~ORT_Adapter_Factory (void); 00061 00062 /// Create a new adapter, in case not possible to allocate, returns 0 00063 virtual TAO::ORT_Adapter * create () = 0; 00064 00065 /// Destroy the passed adapter 00066 virtual void destroy (TAO::ORT_Adapter * adapter) = 0; 00067 }; 00068 } 00069 00070 TAO_END_VERSIONED_NAMESPACE_DECL 00071 00072 #include /**/ "ace/post.h" 00073 00074 #endif /* TAO_ORT_ADAPTER_FACTORY_H */