ICU 56.1: ulistformatter.h Source File

ICU 56.1 56.1

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

- File List
- Globals

ulistformatter.h
Go to the documentation of this file.
1 /*
2 *****************************************************************************************
3 * Copyright (C) 2015, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *****************************************************************************************
6 */
7
8 #ifndef ULISTFORMATTER_H
9 #define ULISTFORMATTER_H
10
11 #include "unicode/utypes.h"
12
13 #if !UCONFIG_NO_FORMATTING
14 #ifndef U_HIDE_DRAFT_API
15
16 #include "unicode/localpointer.h"
17
32 struct UListFormatter;
33 typedef struct UListFormatter UListFormatter;
51 U_DRAFT UListFormatter* U_EXPORT2
52 ulistfmt_open(const char* locale,
53 UErrorCode* status);
54
61 U_DRAFT void U_EXPORT2
62 ulistfmt_close(UListFormatter *listfmt);
63
64
65 #if U_SHOW_CPLUSPLUS_API
66
67 U_NAMESPACE_BEGIN
68
78 U_DEFINE_LOCAL_OPEN_POINTER(LocalUListFormatterPointer, UListFormatter, ulistfmt_close);
79
80 U_NAMESPACE_END
81
82 #endif
83
118 U_DRAFT int32_t U_EXPORT2
119 ulistfmt_format(const UListFormatter* listfmt,
120 const UChar* const strings[],
121 const int32_t * stringLengths,
122 int32_t stringCount,
123 UChar* result,
124 int32_t resultCapacity,
125 UErrorCode* status);
126
127 #endif /* U_HIDE_DRAFT_API */
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:129
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:535
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: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
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
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:111
UListFormatter
struct UListFormatter UListFormatter
C typedef for struct UListFormatter.
Definition: ulistformatter.h:33