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;
201 #ifndef U_HIDE_INTERNAL_API
254 #ifndef U_HIDE_INTERNAL_API
272 ListFormatter(
const ListFormatInternal* listFormatterInternal);
276 static void initializeHash(
UErrorCode& errorCode);
277 static const ListFormatInternal* getListFormatInternal(
const Locale& locale,
const char *style,
UErrorCode& errorCode);
278 struct ListPatternsSink;
279 static ListFormatInternal* loadListFormatInternal(
const Locale& locale,
const char* style,
UErrorCode& errorCode);
283 int32_t index, int32_t &offset, FieldPositionHandler* handler,
UErrorCode& errorCode)
const;
287 ListFormatInternal* owned;
288 const ListFormatInternal* data;
297 #endif // __LISTFORMATTER_H__