19 #ifndef __LISTFORMATTER_H__
20 #define __LISTFORMATTER_H__
24 #if U_SHOW_CPLUSPLUS_API
33 class FieldPositionHandler;
34 class FormattedListData;
41 struct ListFormatInternal;
48 struct ListFormatData :
public UMemory {
49 UnicodeString twoPattern;
50 UnicodeString startPattern;
51 UnicodeString middlePattern;
52 UnicodeString endPattern;
55 ListFormatData(
const UnicodeString& two,
const UnicodeString& start,
const UnicodeString& middle,
const UnicodeString& end,
57 twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end), locale(loc) {}
68 #if !UCONFIG_NO_FORMATTING
130 FormattedListData *fData;
135 : fData(nullptr), fErrorCode(errorCode) {}
136 friend class ListFormatter;
138 #endif // !UCONFIG_NO_FORMATTING
188 #ifndef U_HIDE_DRAFT_API
189 #if !UCONFIG_NO_FORMATTING
205 #ifndef U_HIDE_INTERNAL_API
242 #if !UCONFIG_NO_FORMATTING
258 #endif // !UCONFIG_NO_FORMATTING
260 #ifndef U_HIDE_INTERNAL_API
278 ListFormatter(
const ListFormatInternal* listFormatterInternal);
282 static void initializeHash(
UErrorCode& errorCode);
283 static const ListFormatInternal* getListFormatInternal(
const Locale& locale,
const char *style,
UErrorCode& errorCode);
284 struct ListPatternsSink;
285 static ListFormatInternal* loadListFormatInternal(
const Locale& locale,
const char* style,
UErrorCode& errorCode);
289 int32_t index, int32_t &offset, FieldPositionHandler* handler,
UErrorCode& errorCode)
const;
293 ListFormatInternal* owned;
294 const ListFormatInternal* data;
301 #endif // __LISTFORMATTER_H__