3 //=============================================================================
5 * @file Codeset_Manager_Factory_Base.h
7 * Interface for the TAO CodeSet Manager.
9 * @author Mahesh Vedantam <mahesh@ociweb.com>
11 //=============================================================================
13 #ifndef TAO_CODESET_MANAGER_FACTORY_BASE_H
14 #define TAO_CODESET_MANAGER_FACTORY_BASE_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "tao/TAO_Export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include /**/ "tao/Versioned_Namespace.h"
26 #include "ace/Service_Object.h"
27 #include "ace/Service_Config.h"
29 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 class TAO_Codeset_Manager
;
34 * @class TAO_Codeset_Manager_Factory_Base
36 * @brief Base class for creating instances of the codeset manager.
38 * The base also provides a default implementation which
39 * instantiates nothing. This default impl is replaced by the actual
40 * implementation if libTAO_Codeset is loaded.
43 class TAO_Export TAO_Codeset_Manager_Factory_Base
: public ACE_Service_Object
46 virtual ~TAO_Codeset_Manager_Factory_Base () = default;
48 /// Create makes a new instance of the codeset manager for every
49 /// call. This allows multiple ORBs to have their own (or none).
50 /// This default implementation returns a null pointer only.
51 virtual TAO_Codeset_Manager
*create();
53 /// Is_default is called by the ORB Core to determine if it needs
54 /// to reload the factory with a dynamically linked libTAO_Codeset.
55 /// Statically linked applications get derive implementation by
56 /// including "tao/Codeset/Codeset.h" somewhere in their source code.
57 virtual bool is_default () const;
59 /// Static initializer ensures the factory is loaded
60 static int initialize ();
64 TAO_Requires_Base_Codeset_Initializer
=
65 TAO_Codeset_Manager_Factory_Base::initialize ();
67 ACE_STATIC_SVC_DECLARE (TAO_Codeset_Manager_Factory_Base
)
68 ACE_FACTORY_DECLARE (TAO
, TAO_Codeset_Manager_Factory_Base
)
70 TAO_END_VERSIONED_NAMESPACE_DECL
72 #include /**/ "ace/post.h"
74 #endif /* TAO_CODESET_MANAGER_FACTORY_BASE_H */