Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / UTF32_Encoding_Converter.h
blob22b20cc68c62863b7ed5247413005302693509d2
1 // -*- C++ -*-
3 //=========================================================================
4 /**
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
29 public:
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,
40 size_t source_size,
41 ACE_Byte* target,
42 size_t target_size,
43 bool strict = true);
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,
48 size_t source_size,
49 void* target,
50 size_t target_size,
51 bool strict = true);
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,
57 size_t source_size);
60 ACE_END_VERSIONED_NAMESPACE_DECL
61 #endif /* ACE_USES_WCHAR */
63 #include /**/ "ace/post.h"
65 #endif /* ACE_UTF32_ENCODING_CONVERTER_H */