00001 // -*- C++ -*- 00002 // $Id: UTF8_Latin1_Factory.h 84281 2009-01-30 15:01:17Z wotte $ 00003 00004 #ifndef UTF8_LATIN1_FACTORY_H 00005 #define UTF8_LATIN1_FACTORY_H 00006 00007 #include /**/ "ace/pre.h" 00008 #include "tao/Codeset/codeset_export.h" 00009 #include "ace/Service_Config.h" 00010 #include "tao/Codeset/Codeset_Translator_Factory.h" 00011 00012 #include "tao/Codeset/UTF8_Latin1_Translator.h" 00013 00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00015 00016 class TAO_Codeset_Export TAO_UTF8_Latin1_Factory 00017 : public TAO_Codeset_Translator_Factory 00018 { 00019 public: 00020 TAO_UTF8_Latin1_Factory (); 00021 virtual ~TAO_UTF8_Latin1_Factory (); 00022 virtual int init (int argc, ACE_TCHAR *argv[]); 00023 00024 /// ncs returns the translator's native codeset ID. 00025 CONV_FRAME::CodeSetId ncs () const; 00026 /// tcs returns the translator's transmission codeset ID. 00027 CONV_FRAME::CodeSetId tcs () const; 00028 00029 /// Assign the translator to the input CDR. The inherited assign_i is used 00030 /// to assign either a char or wchar translator, depending on the base type 00031 /// of NCS_TO_TCS. A null input CDR is permitted, in which case assign is a 00032 /// no-op. 00033 virtual void assign (TAO_InputCDR *) const; 00034 /// Assign the translator to the output CDR. The inherited assign_i is used 00035 /// to assign either a char or wchar translator, depending on the base type 00036 /// of NCS_TO_TCS. A null output CDR is permitted, in which case assign is a 00037 /// no-op. 00038 virtual void assign (TAO_OutputCDR *) const; 00039 00040 private: 00041 void create_translator () const; 00042 00043 private: 00044 TAO_UTF8_Latin1_Translator *translator_; 00045 }; 00046 00047 00048 00049 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_Codeset, TAO_UTF8_Latin1_Factory) 00050 ACE_FACTORY_DECLARE (TAO_Codeset, TAO_UTF8_Latin1_Factory) 00051 TAO_END_VERSIONED_NAMESPACE_DECL 00052 #include /**/ "ace/post.h" 00053 #endif /* UTF8_LATIN1_FACTORY_H */