2 *******************************************************************************
3 * Copyright (C) 2013-2014, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *******************************************************************************
6 * collationdatawriter.h
8 * created on: 2013aug06
9 * created by: Markus W. Scherer
12 #ifndef __COLLATIONDATAWRITER_H__
13 #define __COLLATIONDATAWRITER_H__
15 #include "unicode/utypes.h"
17 #if !UCONFIG_NO_COLLATION
22 struct CollationSettings
;
23 struct CollationTailoring
;
26 * Collation-related code for tools & demos.
28 class U_I18N_API CollationDataWriter
/* all static */ {
30 static int32_t writeBase(const CollationData
&data
, const CollationSettings
&settings
,
31 const void *rootElements
, int32_t rootElementsLength
,
32 int32_t indexes
[], uint8_t *dest
, int32_t capacity
,
33 UErrorCode
&errorCode
);
35 static int32_t writeTailoring(const CollationTailoring
&t
, const CollationSettings
&settings
,
36 int32_t indexes
[], uint8_t *dest
, int32_t capacity
,
37 UErrorCode
&errorCode
);
40 CollationDataWriter(); // no constructor
42 static int32_t write(UBool isBase
, const UVersionInfo dataVersion
,
43 const CollationData
&data
, const CollationSettings
&settings
,
44 const void *rootElements
, int32_t rootElementsLength
,
45 int32_t indexes
[], uint8_t *dest
, int32_t capacity
,
46 UErrorCode
&errorCode
);
48 static void copyData(const int32_t indexes
[], int32_t startIndex
,
49 const void *src
, uint8_t *dest
);
54 #endif // !UCONFIG_NO_COLLATION
55 #endif // __COLLATIONDATAWRITER_H__