3 //=========================================================================
5 * @file UTF32_Encoding_Converter.h
7 * This class contains declarations for methods that convert between
8 * UTF-32 (both BE and LE) and UTF-8
10 * @author Chad Elliott <elliott_c@ociweb.com>
12 //=========================================================================
14 #ifndef ACE_UTF32_ENCODING_CONVERTER_H
15 #define ACE_UTF32_ENCODING_CONVERTER_H
17 #include /**/ "ace/pre.h"
19 #include "ace/UTF16_Encoding_Converter.h"
21 #if defined (ACE_USES_WCHAR)
22 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
24 /** Convert from UTF-32 to UTF-8 and from UTF-8 to UTF-32.
25 * This class implements the ACE_Encoding_Converter interface.
27 class ACE_UTF32_Encoding_Converter
: public ACE_UTF16_Encoding_Converter
30 /// This class has some similarities to the UTF16 converter, so
31 /// we just construct our base class and pass the swap parameter.
32 ACE_UTF32_Encoding_Converter (bool swap
= false);
34 /// This is a do nothing destructor.
35 virtual ~ACE_UTF32_Encoding_Converter ();
37 /// Convert the source from UTF-32 to UTF-8 and store it in the
38 /// provided target buffer.
39 virtual Result
to_utf8 (const void* source
,
45 /// Convert the UTF-8 source into a UTF-32 encoding and store it
46 /// in the provided target buffer.
47 virtual Result
from_utf8 (const ACE_Byte
* source
,
53 /// This factory helper method determines if the source stream is UTF-32
54 /// encoded. If it is, allocate an ACE_UTF32_Encoding_Converter and
55 /// return it. The caller then owns the allocated object.
56 static ACE_UTF32_Encoding_Converter
* encoded (const ACE_Byte
* source
,
60 ACE_END_VERSIONED_NAMESPACE_DECL
61 #endif /* ACE_USES_WCHAR */
63 #include /**/ "ace/post.h"
65 #endif /* ACE_UTF32_ENCODING_CONVERTER_H */