1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
5 * Copyright (C) 2013-2014, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *******************************************************************************
8 * collationdatawriter.h
10 * created on: 2013aug06
11 * created by: Markus W. Scherer
14 #ifndef __COLLATIONDATAWRITER_H__
15 #define __COLLATIONDATAWRITER_H__
17 #include "unicode/utypes.h"
19 #if !UCONFIG_NO_COLLATION
24 struct CollationSettings
;
25 struct CollationTailoring
;
28 * Collation-related code for tools & demos.
30 class U_I18N_API CollationDataWriter
/* all static */ {
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
);
37 static int32_t writeTailoring(const CollationTailoring
&t
, const CollationSettings
&settings
,
38 int32_t indexes
[], uint8_t *dest
, int32_t capacity
,
39 UErrorCode
&errorCode
);
42 CollationDataWriter(); // no constructor
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
);
50 static void copyData(const int32_t indexes
[], int32_t startIndex
,
51 const void *src
, uint8_t *dest
);
56 #endif // !UCONFIG_NO_COLLATION
57 #endif // __COLLATIONDATAWRITER_H__