ICU 56.1: ucnvsel.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

ucnvsel.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright (C) 2008-2011, International Business Machines
5 * Corporation, Google and others. All Rights Reserved.
6 *
7 *******************************************************************************
8 */
9 /*
10 * Author : eldawy@google.com (Mohamed Eldawy)
11 * ucnvsel.h
12 *
13 * Purpose: To generate a list of encodings capable of handling
14 * a given Unicode text
15 *
16 * Started 09-April-2008
17 */
18
19 #ifndef __ICU_UCNV_SEL_H__
20 #define __ICU_UCNV_SEL_H__
21
22 #include "unicode/utypes.h"
23
24 #if !UCONFIG_NO_CONVERSION
25
26 #include "unicode/uset.h"
27 #include "unicode/utf16.h"
28 #include "unicode/uenum.h"
29 #include "unicode/ucnv.h"
30 #include "unicode/localpointer.h"
31
47 struct UConverterSelector;
48 typedef struct UConverterSelector UConverterSelector;
73 U_STABLE UConverterSelector* U_EXPORT2
74 ucnvsel_open(const char* const* converterList, int32_t converterListSize,
75 const USet* excludedCodePoints,
76 const UConverterUnicodeSet whichSet, UErrorCode* status);
77
91 U_STABLE void U_EXPORT2
92 ucnvsel_close(UConverterSelector *sel);
93
94 #if U_SHOW_CPLUSPLUS_API
95
96 U_NAMESPACE_BEGIN
97
107 U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterSelectorPointer, UConverterSelector, ucnvsel_close);
108
109 U_NAMESPACE_END
110
111 #endif
112
128 U_STABLE UConverterSelector* U_EXPORT2
129 ucnvsel_openFromSerialized(const void* buffer, int32_t length, UErrorCode* status);
130
145 U_STABLE int32_t U_EXPORT2
146 ucnvsel_serialize(const UConverterSelector* sel,
147 void* buffer, int32_t bufferCapacity, UErrorCode* status);
148
163 U_STABLE UEnumeration * U_EXPORT2
164 ucnvsel_selectForString(const UConverterSelector* sel,
165 const UChar *s, int32_t length, UErrorCode *status);
166
181 U_STABLE UEnumeration * U_EXPORT2
182 ucnvsel_selectForUTF8(const UConverterSelector* sel,
183 const char *s, int32_t length, UErrorCode *status);
184
185 #endif /* !UCONFIG_NO_CONVERSION */
186
187 #endif /* __ICU_UCNV_SEL_H__ */
ucnvsel_openFromSerialized
UConverterSelector * ucnvsel_openFromSerialized(const void *buffer, int32_t length, UErrorCode *status)
Open a selector from its serialized form.
ucnvsel_selectForString
UEnumeration * ucnvsel_selectForString(const UConverterSelector *sel, const UChar *s, int32_t length, UErrorCode *status)
Select converters that can map all characters in a UTF-16 string, ignoring the excluded code points...
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:39
ucnvsel_selectForUTF8
UEnumeration * ucnvsel_selectForUTF8(const UConverterSelector *sel, const char *s, int32_t length, UErrorCode *status)
Select converters that can map all characters in a UTF-8 string, ignoring the excluded code points...
ucnvsel_close
void ucnvsel_close(UConverterSelector *sel)
Closes a selector.
uset.h
C API: Unicode Set.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:535
UConverterUnicodeSet
UConverterUnicodeSet
Selectors for Unicode sets that can be returned by ucnv_getUnicodeSet().
Definition: ucnv.h:939
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
ucnvsel_serialize
int32_t ucnvsel_serialize(const UConverterSelector *sel, void *buffer, int32_t bufferCapacity, UErrorCode *status)
Serialize a selector into a linear buffer.
utf16.h
C API: 16-bit Unicode handling macros.
UChar
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
USet
struct USet USet
Definition: ucnv.h:67
LocalUConverterSelectorPointer
"Smart pointer" class, closes a UConverterSelector via ucnvsel_close().
ucnvsel_open
UConverterSelector * ucnvsel_open(const char *const *converterList, int32_t converterListSize, const USet *excludedCodePoints, const UConverterUnicodeSet whichSet, UErrorCode *status)
Open a selector.
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
uenum.h
C API: String Enumeration.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
ucnv.h
C API: Character conversion.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109