19 #ifndef __LISTFORMATTER_H__
20 #define __LISTFORMATTER_H__
24 #if U_SHOW_CPLUSPLUS_API
26 #if !UCONFIG_NO_FORMATTING
35 class FieldPositionHandler;
36 class FormattedListData;
43 struct ListFormatInternal;
50 struct ListFormatData :
public UMemory {
51 UnicodeString twoPattern;
52 UnicodeString startPattern;
53 UnicodeString middlePattern;
54 UnicodeString endPattern;
57 ListFormatData(
const UnicodeString& two,
const UnicodeString& start,
const UnicodeString& middle,
const UnicodeString& end,
59 twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end), locale(loc) {}
131 FormattedListData *fData;
136 : fData(nullptr), fErrorCode(errorCode) {}
137 friend class ListFormatter;
238 #ifndef U_HIDE_INTERNAL_API
256 ListFormatter(
const ListFormatInternal* listFormatterInternal);
269 static void initializeHash(
UErrorCode& errorCode);
270 static const ListFormatInternal* getListFormatInternal(
const Locale& locale,
const char *style,
UErrorCode& errorCode);
271 struct ListPatternsSink;
272 static ListFormatInternal* loadListFormatInternal(
const Locale& locale,
const char* style,
UErrorCode& errorCode);
276 int32_t index, int32_t &offset, FieldPositionHandler* handler,
UErrorCode& errorCode)
const;
280 ListFormatInternal* owned;
281 const ListFormatInternal* data;
290 #endif // __LISTFORMATTER_H__
#define U_OVERRIDE
Defined to the C++11 "override" keyword if available.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Represents a span of a string containing a given field.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
C++ API: Locale ID object.
Basic definitions for ICU, for both C and C++ APIs.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UObject is the common ICU "boilerplate" class.
UMemory is the common ICU base class.
Requested operation can not be completed with ICU in its current state.
int8_t UBool
The ICU boolean type, a signed-byte integer.
Base class for objects to which Unicode characters and strings can be appended.
A Locale object represents a specific geographical, political, or cultural region.