3 //=============================================================================
5 * @file ORT_Adapter_Factory.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
9 //=============================================================================
12 #ifndef TAO_ORT_ADAPTER_FACTORY_H
13 #define TAO_ORT_ADAPTER_FACTORY_H
15 #include /**/ "ace/pre.h"
17 #include "tao/PortableServer/portableserver_export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/Versioned_Namespace.h"
24 #include "ace/Service_Object.h"
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
36 * @class ORT_Adapter_Factory
38 * @brief ORT_Adapter_Factory
40 * Class that creates one instance of TAO::ORT_Adapter per
41 * POA on the POA's first usage of its objectreferencetemplate_adapter.
42 * This is a base class for the actual implementation in the
43 * TAO_ObjectReferenceTemplate library.
45 class TAO_PortableServer_Export ORT_Adapter_Factory
46 : public ACE_Service_Object
51 * @note Even though this class only defines an interface, a
52 * destructor is necessary to avoid dynamic_cast<> failures
53 * when using g++ 4.0's -fvisibility-inlines-hidden command
54 * line option. Apparently the compiler generated
55 * destructor is inlined.
57 virtual ~ORT_Adapter_Factory ();
59 /// Create a new adapter, in case not possible to allocate, returns 0
60 virtual TAO::ORT_Adapter
* create () = 0;
62 /// Destroy the passed adapter
63 virtual void destroy (TAO::ORT_Adapter
* adapter
) = 0;
67 TAO_END_VERSIONED_NAMESPACE_DECL
69 #include /**/ "ace/post.h"
71 #endif /* TAO_ORT_ADAPTER_FACTORY_H */