00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /* 00005 * @file Codeset_Manager_Factory_Base.h 00006 * 00007 * $Id: Codeset_Manager_Factory_Base.h 75864 2006-12-06 15:55:28Z johnnyw $ 00008 * 00009 * Interface for the TAO CodeSet Manager. 00010 * 00011 * @author Mahesh Vedantam <mahesh@ociweb.com> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_CODESET_MANAGER_FACTORY_BASE_H 00016 #define TAO_CODESET_MANAGER_FACTORY_BASE_H 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include /**/ "tao/TAO_Export.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include /**/ "tao/Versioned_Namespace.h" 00027 00028 #include "ace/Service_Object.h" 00029 #include "ace/Service_Config.h" 00030 00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00032 00033 class TAO_Codeset_Manager; 00034 00035 /** 00036 * @class TAO_Codeset_Manager_Factory_Base 00037 * 00038 * @brief Base class for creating instances of the codeset manager. 00039 * 00040 * The base also provides a default implementation which 00041 * instantiates nothing. This default impl is replaced by the actual 00042 * implementation if libTAO_Codeset is loaded. 00043 * 00044 */ 00045 00046 class TAO_Export TAO_Codeset_Manager_Factory_Base : public ACE_Service_Object 00047 { 00048 public: 00049 virtual ~TAO_Codeset_Manager_Factory_Base (); 00050 00051 /// Create makes a new instance of the codeset manager for every 00052 /// call. This allows multiple ORBs to have their own (or none). 00053 /// This default implementation returns a null pointer only. 00054 virtual TAO_Codeset_Manager *create(void); 00055 00056 /// Is_default is called by the ORB Core to determine if it needs 00057 /// to reload the factory with a dynamically linked libTAO_Codeset. 00058 /// Statically linked applications get derive implementation by 00059 /// including "tao/Codeset/Codeset.h" somewhere in their source code. 00060 virtual bool is_default (void) const; 00061 00062 /// Static initializer ensures the factory is loaded 00063 static int initialize (void); 00064 }; 00065 00066 static int 00067 TAO_Requires_Base_Codeset_Initializer = 00068 TAO_Codeset_Manager_Factory_Base::initialize (); 00069 00070 TAO_END_VERSIONED_NAMESPACE_DECL 00071 00072 ACE_STATIC_SVC_DECLARE (TAO_Codeset_Manager_Factory_Base) 00073 ACE_FACTORY_DECLARE (TAO, TAO_Codeset_Manager_Factory_Base) 00074 00075 #include /**/ "ace/post.h" 00076 00077 #endif /* TAO_CODESET_MANAGER_FACTORY_BASE_H */