| 1 |
. |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#ifndef __COLLATIONDATAWRITER_H__ |
| 15 |
#define __COLLATIONDATAWRITER_H__ |
| 16 |
|
| 17 |
#include "unicode/utypes.h" |
| 18 |
|
| 19 |
#if !UCONFIG_NO_COLLATION |
| 20 |
|
| 21 |
U_NAMESPACE_BEGIN |
| 22 |
|
| 23 |
struct CollationData; |
| 24 |
struct CollationSettings; |
| 25 |
struct CollationTailoring; |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
class U_I18N_API CollationDataWriter { |
| 31 |
public: |
| 32 |
static int32_t writeBase(const CollationData &data, const CollationSettings &settings, |
| 33 |
const void *rootElements, int32_t rootElementsLength, |
| 34 |
int32_t indexes[], uint8_t *dest, int32_t capacity, |
| 35 |
UErrorCode &errorCode); |
| 36 |
|
| 37 |
static int32_t writeTailoring(const CollationTailoring &t, const CollationSettings &settings, |
| 38 |
int32_t indexes[], uint8_t *dest, int32_t capacity, |
| 39 |
UErrorCode &errorCode); |
| 40 |
|
| 41 |
private: |
| 42 |
CollationDataWriter() = delete; |
| 43 |
|
| 44 |
static int32_t write(UBool isBase, const UVersionInfo dataVersion, |
| 45 |
const CollationData &data, const CollationSettings &settings, |
| 46 |
const void *rootElements, int32_t rootElementsLength, |
| 47 |
int32_t indexes[], uint8_t *dest, int32_t capacity, |
| 48 |
UErrorCode &errorCode); |
| 49 |
|
| 50 |
static void copyData(const int32_t indexes[], int32_t startIndex, |
| 51 |
const void *src, uint8_t *dest); |
| 52 |
}; |
| 53 |
|
| 54 |
U_NAMESPACE_END |
| 55 |
|
| 56 |
#endif |
| 57 |
#endif |