15 #ifndef __APPENDABLE_H__
16 #define __APPENDABLE_H__
140 int32_t desiredCapacityHint,
141 UChar *scratch, int32_t scratchCapacity,
142 int32_t *resultCapacity);
222 int32_t desiredCapacityHint,
223 UChar *scratch, int32_t scratchCapacity,
224 int32_t *resultCapacity);
Base class for objects to which Unicode characters and strings can be appended.
virtual UBool appendCodePoint(UChar32 c)
Appends a code point.
virtual UBool appendCodeUnit(UChar c)=0
Appends a 16-bit code unit.
virtual UBool appendString(const UChar *s, int32_t length)
Appends a string.
virtual UChar * getAppendBuffer(int32_t minCapacity, int32_t desiredCapacityHint, UChar *scratch, int32_t scratchCapacity, int32_t *resultCapacity)
Returns a writable buffer for appending and writes the buffer's capacity to *resultCapacity.
virtual UBool reserveAppendCapacity(int32_t appendCapacity)
Tells the object that the caller is going to append roughly appendCapacity UChars.
UObject is the common ICU "boilerplate" class.
An Appendable implementation which writes to a UnicodeString.
virtual UBool appendCodePoint(UChar32 c)
Appends a code point to the string.
~UnicodeStringAppendable()
Destructor.
UnicodeStringAppendable(UnicodeString &s)
Aliases the UnicodeString (keeps its reference) for writing.
virtual UBool appendString(const UChar *s, int32_t length)
Appends a string to the UnicodeString.
virtual UBool appendCodeUnit(UChar c)
Appends a 16-bit code unit to the string.
virtual UChar * getAppendBuffer(int32_t minCapacity, int32_t desiredCapacityHint, UChar *scratch, int32_t scratchCapacity, int32_t *resultCapacity)
Returns a writable buffer for appending and writes the buffer's capacity to *resultCapacity.
virtual UBool reserveAppendCapacity(int32_t appendCapacity)
Tells the UnicodeString that the caller is going to append roughly appendCapacity UChars.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
int8_t UBool
The ICU boolean type.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
C++ API: Common ICU base class UObject.
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.