ICU 58.2 58.2

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

- File List
- Globals

ulistformatter.h
Go to the documentation of this file.
1 // Copyright (C) 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;
34 typedef struct UListFormatter UListFormatter;
52 U_STABLE UListFormatter* U_EXPORT2
53 ulistfmt_open(const char* locale,
54 UErrorCode* status);
55
62 U_STABLE void U_EXPORT2
63 ulistfmt_close(UListFormatter *listfmt);
64
65
66 #if U_SHOW_CPLUSPLUS_API
67
68 U_NAMESPACE_BEGIN
69
79 U_DEFINE_LOCAL_OPEN_POINTER(LocalUListFormatterPointer, UListFormatter, ulistfmt_close);
80
81 U_NAMESPACE_END
82
83 #endif
84
119 U_DRAFT int32_t U_EXPORT2
120 ulistfmt_format(const UListFormatter* listfmt,
121 const UChar* const strings[],
122 const int32_t * stringLengths,
123 int32_t stringCount,
124 UChar* result,
125 int32_t resultCapacity,
126 UErrorCode* status);
127
128 #endif /* #if !UCONFIG_NO_FORMATTING */
129
130 #endif
ulistfmt_open
UListFormatter * ulistfmt_open(const char *locale, UErrorCode *status)
Open a new UListFormatter object using the rules for a given locale.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
ulistfmt_close
void ulistfmt_close(UListFormatter *listfmt)
Close a UListFormatter object.
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:530
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
LocalUListFormatterPointer
"Smart pointer" class, closes a UListFormatter via ulistfmt_close().
ulistfmt_format
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...
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:337
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
U_DRAFT
#define U_DRAFT
This is used to declare a function as a draft public ICU C API.
Definition: umachine.h:136
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:134
UListFormatter
struct UListFormatter UListFormatter
C typedef for struct UListFormatter.
Definition: ulistformatter.h:34