ICU 63.1  63.1
ulistformatter.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *****************************************************************************************
5 * Copyright (C) 2015-2016, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *****************************************************************************************
8 */
9 
10 #ifndef ULISTFORMATTER_H
11 #define ULISTFORMATTER_H
12 
13 #include "unicode/utypes.h"
14 
15 #if !UCONFIG_NO_FORMATTING
16 
17 #include "unicode/localpointer.h"
18 
33 struct UListFormatter;
36 #ifndef U_HIDE_DRAFT_API
37 
42 typedef enum UListFormatterField {
54 #endif // U_HIDE_DRAFT_API
55 
72 U_CAPI UListFormatter* U_EXPORT2
73 ulistfmt_open(const char* locale,
74  UErrorCode* status);
75 
82 U_CAPI void U_EXPORT2
84 
85 
86 #if U_SHOW_CPLUSPLUS_API
87 
89 
100 
102 
103 #endif
104 
139 U_CAPI int32_t U_EXPORT2
140 ulistfmt_format(const UListFormatter* listfmt,
141  const UChar* const strings[],
142  const int32_t * stringLengths,
143  int32_t stringCount,
144  UChar* result,
145  int32_t resultCapacity,
146  UErrorCode* status);
147 
148 #endif /* #if !UCONFIG_NO_FORMATTING */
149 
150 #endif
U_CAPI int32_t ulistfmt_format(const UListFormatter *listfmt, const UChar *const strings[], const int32_t *stringLengths, int32_t stringCount, UChar *result, int32_t resultCapacity, UErrorCode *status)
Formats a list of strings using the conventions established for the UListFormatter object...
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:109
The literal text in the result which came from the resources.
UListFormatterField
FieldPosition and UFieldPosition selectors for format fields defined by ListFormatter.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
U_CAPI void ulistfmt_close(UListFormatter *listfmt)
Close a UListFormatter object.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:487
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
"Smart pointer" class, closes a UListFormatter via ulistfmt_close().
uint16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:342
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:401
The element text in the result which came from the input strings.
U_CAPI UListFormatter * ulistfmt_open(const char *locale, UErrorCode *status)
Open a new UListFormatter object using the rules for a given locale.
Basic definitions for ICU, for both C and C++ APIs.
struct UListFormatter UListFormatter
C typedef for struct UListFormatter.