20 #ifndef U_HIDE_DRAFT_API 39 array(stackArray), capacity(STACK_CAPACITY), length(0), delta(0),
58 void addUnchanged(int32_t unchangedLength);
64 void addReplace(int32_t oldLength, int32_t newLength);
84 UBool hasChanges()
const;
169 int32_t readLength(int32_t head);
170 void updateIndexes();
174 const uint16_t *array;
175 int32_t index, length;
177 UBool onlyChanges_, coarse;
180 int32_t oldLength_, newLength_;
181 int32_t srcIndex, replIndex, destIndex;
226 void setLastUnit(int32_t last) { array[length - 1] = (uint16_t)last; }
227 int32_t lastUnit()
const {
return length > 0 ? array[length - 1] : 0xffff; }
229 void append(int32_t r);
232 static const int32_t STACK_CAPACITY = 100;
238 uint16_t stackArray[STACK_CAPACITY];
241 #endif // U_HIDE_DRAFT_API 245 #endif // __EDITS_H__ int32_t oldLength() const
Iterator getFineChangesIterator() const
Returns an Iterator for fine-grained changes for modifying styled text.
Access to the list of edits.
Iterator getCoarseIterator() const
Returns an Iterator for coarse-grained changes and non-changes for simple string updates.
Iterator getCoarseChangesIterator() const
Returns an Iterator for coarse-grained changes for simple string updates.
int32_t newLength() const
Records lengths of string edits but not replacement text.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
int32_t sourceIndex() const
int32_t lengthDelta() const
How much longer is the new text compared with the old text?
int32_t replacementIndex() const
int32_t destinationIndex() const
#define TRUE
The TRUE value of a UBool.
C++ API: Common ICU base class UObject.
Iterator getFineIterator() const
Returns an Iterator for fine-grained changes and non-changes for modifying styled text...
#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...
Basic definitions for ICU, for both C and C++ APIs.
Edits()
Constructs an empty object.
#define FALSE
The FALSE value of a UBool.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
UBool next(UErrorCode &errorCode)
Advances to the next edit.
UMemory is the common ICU base class.
int8_t UBool
The ICU boolean type.