19 #ifndef __LISTFORMATTER_H__ 20 #define __LISTFORMATTER_H__ 30 class FieldPositionIterator;
31 class FieldPositionHandler;
32 class FormattedListData;
39 struct ListFormatInternal;
46 struct ListFormatData :
public UMemory {
47 UnicodeString twoPattern;
48 UnicodeString startPattern;
49 UnicodeString middlePattern;
50 UnicodeString endPattern;
52 ListFormatData(
const UnicodeString& two,
const UnicodeString& start,
const UnicodeString& middle,
const UnicodeString& end) :
53 twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end) {}
64 #if !UCONFIG_NO_FORMATTING 65 #ifndef U_HIDE_DRAFT_API 127 FormattedListData *fData;
132 : fData(
nullptr), fErrorCode(errorCode) {}
136 #endif // !UCONFIG_NO_FORMATTING 186 #ifndef U_HIDE_INTERNAL_API 221 #ifndef U_HIDE_DRAFT_API 242 #if !UCONFIG_NO_FORMATTING 243 #ifndef U_HIDE_DRAFT_API 260 #endif // !UCONFIG_NO_FORMATTING 262 #ifndef U_HIDE_INTERNAL_API 280 ListFormatter(
const ListFormatInternal* listFormatterInternal);
284 static void initializeHash(
UErrorCode& errorCode);
285 static const ListFormatInternal* getListFormatInternal(
const Locale& locale,
const char *style,
UErrorCode& errorCode);
286 struct ListPatternsSink;
287 static ListFormatInternal* loadListFormatInternal(
const Locale& locale,
const char* style,
UErrorCode& errorCode);
291 int32_t index, int32_t &offset, FieldPositionHandler* handler,
UErrorCode& errorCode)
const;
295 ListFormatInternal* owned;
296 const ListFormatInternal* data;
301 #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...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Fo...
Represents a span of a string containing a given field.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
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.
Base class for objects to which Unicode characters and strings can be appended.
A Locale object represents a specific geographical, political, or cultural region.