blob: 11ec541ebae849d9b7f7be3dbb738386596600b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// -*- C++ -*-
//=========================================================================
/**
* @file Encoding_Converter_Factory.h
*
* $Id$
*
* This class can be used to create encoding converters of various types.
*
* @author Chad Elliott <elliott_c@ociweb.com>
*/
//=========================================================================
#ifndef ACE_ENCODING_CONVERTER_FACTORY_H
#define ACE_ENCODING_CONVERTER_FACTORY_H
#include /**/ "ace/pre.h"
#include "ace/Basic_Types.h"
#if defined (ACE_USES_WCHAR)
#include /**/ "ace/ACE_export.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Encoding_Converter;
/** Create an encoding converter based on the source or hint.
* This class allows users to avoid knowing any concrete converter types.
*/
class ACE_Export ACE_Encoding_Converter_Factory
{
public:
/// This enum is used to tell what type of converter to create.
enum Encoding_Hint { ACE_UTF_32BE, ACE_UTF_32LE,
ACE_UTF_16BE, ACE_UTF_16LE,
ACE_UTF_8, ACE_NONE
};
/// Create an encoding converter based on the source. If a hint is
/// given, it just creates the specified type of converter without looking
/// at the source.
static ACE_Encoding_Converter* create (const ACE_Byte* source,
size_t source_size,
Encoding_Hint hint = ACE_NONE);
};
ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_USES_WCHAR */
#include /**/ "ace/post.h"
#endif /* ACE_ENCODING_CONVERTER_FACTORY_H */
|