3 //=============================================================================
5 * @file UTF16_UCS2_Translator.h
7 * @author Iliyan Jeliazkov <jeliazkov_i@ociweb.com>
8 * @author Byron Harris <harrisb@ociweb.com>
10 //=============================================================================
12 #ifndef UTF16_UCS2_TRANSLATOR_H
13 #define UTF16_UCS2_TRANSLATOR_H
14 #include /**/ "ace/pre.h"
16 #include "ace/config-all.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/CDR_Stream.h"
23 #include "ace/Codeset_Symbols.h"
24 #include "tao/CONV_FRAMEC.h"
25 #include "UTF16_UCS2_export.h"
27 // ****************************************************************
30 * @class UTF16_UCS2_Translator
32 * @brief Codeset translation specialization
34 * This class performs the codeset translation:
35 * - Native: UTF16 (i.e. Unicode)
38 class UTF16_UCS2_Export UTF16_UCS2_Translator
: public ACE_WChar_Codeset_Translator
42 /// @param tcs: the target codeset id to use (and report)
43 UTF16_UCS2_Translator (CONV_FRAME::CodeSetId tcs
= ACE_CODESET_ID_ISO_UCS_2_LEVEL_1
);
45 /// Virtual destruction
46 virtual ~UTF16_UCS2_Translator ();
48 // = Documented in $ACE_ROOT/ace/CDR_Stream.h
49 virtual ACE_CDR::Boolean
read_wchar (ACE_InputCDR
&,
51 virtual ACE_CDR::Boolean
read_wstring (ACE_InputCDR
&,
53 virtual ACE_CDR::Boolean
read_wchar_array (ACE_InputCDR
&,
56 virtual ACE_CDR::Boolean
write_wchar (ACE_OutputCDR
&,
58 virtual ACE_CDR::Boolean
write_wstring (ACE_OutputCDR
&,
60 const ACE_CDR::WChar
*);
61 virtual ACE_CDR::Boolean
write_wchar_array (ACE_OutputCDR
&,
62 const ACE_CDR::WChar
*,
64 virtual ACE_CDR::ULong
ncs () {return 0x00010109;}
65 virtual ACE_CDR::ULong
tcs () {return this->tcs_
;}
68 ACE_CDR::Boolean
read_wchar_array_i (ACE_InputCDR
&,
73 ACE_CDR::Boolean
write_wchar_array_i (ACE_OutputCDR
&,
74 const ACE_CDR::WChar
*,
77 ACE_CDR::Boolean
write_swapped_wchar_array_i (ACE_OutputCDR
& cdr
,
78 const ACE_CDR::WChar
*x
,
79 ACE_CDR::ULong length
);
82 ACE_CDR::Boolean
write_wchar_i (ACE_OutputCDR
&,
86 CONV_FRAME::CodeSetId tcs_
;
89 #include /**/ "ace/post.h"
90 #endif /* UTF16_UCS2_TRANSLATOR_H */