3 //=============================================================================
7 * @author Phil Mesnier <mesnier_p@ociweb.com>
9 //=============================================================================
13 #include /**/ "ace/pre.h"
15 #include "ace/config-all.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "ace/CDR_Stream.h"
22 #include "WUCS4_UTF16_export.h"
24 // ****************************************************************
27 * @class ACE_Char_UCS4_UTF16
29 * @brief Codeset translation specialization.
31 * This class performs the codeset translation:
32 * - Native: IBM_1047 (i.e. EBCDIC)
33 * - Stream: ISO-8859 (i.e. Latin/1)
35 class UCS4_UTF16_Export WUCS4_UTF16
: public ACE_WChar_Codeset_Translator
38 /// A do nothing constructor.
41 /// Virtual destruction
42 virtual ~WUCS4_UTF16 ();
44 // = Documented in $ACE_ROOT/ace/CDR_Stream.h
45 virtual ACE_CDR::Boolean
read_wchar (ACE_InputCDR
&,
47 virtual ACE_CDR::Boolean
read_wstring (ACE_InputCDR
&,
49 virtual ACE_CDR::Boolean
read_wchar_array (ACE_InputCDR
&,
52 virtual ACE_CDR::Boolean
write_wchar (ACE_OutputCDR
&,
54 virtual ACE_CDR::Boolean
write_wstring (ACE_OutputCDR
&,
56 const ACE_CDR::WChar
*);
57 virtual ACE_CDR::Boolean
write_wchar_array (ACE_OutputCDR
&,
58 const ACE_CDR::WChar
*,
60 virtual ACE_CDR::ULong
ncs () {return 0x00010104;}
61 virtual ACE_CDR::ULong
tcs () {return 0x00010109;}
64 ACE_CDR::Boolean
read_wchar_array_i (ACE_InputCDR
&,
69 ACE_CDR::Boolean
write_wchar_i (ACE_OutputCDR
&,
75 Due to surrogate pair substution the transmitted length of a wstring can
76 differ from the logical strength length. This version of write_wchar_array
77 accepts both lengths and uses them as necessary.
79 ACE_CDR::Boolean
write_measured_wchar_array (
81 const ACE_CDR::WChar
*x
,
82 ACE_CDR::ULong length
,
83 ACE_CDR::ULong transmission_length
);
86 #include /**/ "ace/post.h"
87 #endif /* WCHAR_UCS4_UTF16_TRANSLATOR */