00001 // -*- C++ -*- 00002 00003 // =================================================================== 00004 /** 00005 * @file Codeset_Translator_Base.h 00006 * 00007 * $Id: Codeset_Translator_Base.h 79115 2007-07-31 10:55:14Z johnnyw $ 00008 * 00009 * @author Phil Mesnier <mesnier_p@ociweb.com> 00010 */ 00011 // =================================================================== 00012 00013 #ifndef TAO_CODESET_TRANSLATOR_BASE_H 00014 #define TAO_CODESET_TRANSLATOR_BASE_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include /**/ "tao/TAO_Export.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include "tao/CONV_FRAMEC.h" 00025 #include "tao/Codeset_Translator_Base.h" 00026 #include "ace/Service_Object.h" 00027 00028 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00029 class ACE_Char_Codeset_Translator; 00030 class ACE_WChar_Codeset_Translator; 00031 ACE_END_VERSIONED_NAMESPACE_DECL 00032 00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00034 00035 class TAO_InputCDR; 00036 class TAO_OutputCDR; 00037 00038 // **************************************************************** 00039 00040 /** 00041 * @class TAO_Codeset_Translator_Base 00042 * 00043 * @brief Abstract base Translator component for interaction with TAO 00044 * 00045 * Certain elements of TAO need an interface defined in the TAO module 00046 * Through which the actual codeset translator instance may be assigned 00047 * to CDR streams. 00048 */ 00049 00050 class TAO_Export TAO_Codeset_Translator_Base 00051 { 00052 public: 00053 virtual ~TAO_Codeset_Translator_Base (); 00054 virtual int init (int argc, ACE_TCHAR *argv[]) = 0; 00055 00056 /// Get the native codeset ID from the base. There is no reasonable 00057 /// default for this method, so it is left abstract. 00058 virtual CONV_FRAME::CodeSetId ncs (void) const = 0; 00059 00060 /// Get the translated codeset ID from the base. There is no reasonable 00061 /// default for this method, so it is left abstract. 00062 virtual CONV_FRAME::CodeSetId tcs (void) const = 0; 00063 00064 /// Assign the translator to the supplied input CDR. This is left abstract 00065 /// since the base base does not have a reference to the actual translator 00066 /// instance. The template instance provides this implementation. 00067 virtual void assign (TAO_InputCDR *) const = 0; 00068 00069 /// Assign the translator to the supplied output CDR. This is left abstract 00070 /// since the base base does not have a reference to the actual translator 00071 /// instance. The template instance provides this implementation. 00072 virtual void assign (TAO_OutputCDR *) const = 0; 00073 }; 00074 00075 TAO_END_VERSIONED_NAMESPACE_DECL 00076 00077 #include /**/ "ace/post.h" 00078 00079 #endif /* TAO_Codeset_Translator_Base */