17#ifndef __APPENDABLE_H__
18#define __APPENDABLE_H__
27#if U_SHOW_CPLUSPLUS_API
68 virtual UBool appendCodeUnit(
char16_t c) = 0;
87 virtual UBool appendString(
const char16_t *s, int32_t length);
98 virtual UBool reserveAppendCapacity(int32_t appendCapacity);
144 virtual char16_t *getAppendBuffer(int32_t minCapacity,
145 int32_t desiredCapacityHint,
146 char16_t *scratch, int32_t scratchCapacity,
147 int32_t *resultCapacity);
156class U_COMMON_API UnicodeStringAppendable :
public Appendable {
163 explicit UnicodeStringAppendable(UnicodeString &s) : str(s) {}
169 ~UnicodeStringAppendable();
177 virtual UBool appendCodeUnit(
char16_t c)
override;
194 virtual UBool appendString(
const char16_t *s, int32_t length)
override;
203 virtual UBool reserveAppendCapacity(int32_t appendCapacity)
override;
226 virtual char16_t *getAppendBuffer(int32_t minCapacity,
227 int32_t desiredCapacityHint,
228 char16_t *scratch, int32_t scratchCapacity,
229 int32_t *resultCapacity)
override;
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
int8_t UBool
The ICU boolean type, a signed-byte integer.
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.