]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/collationdatawriter.h
ICU-62141.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / collationdatawriter.h
CommitLineData
f3c0d7a5
A
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
57a6839d
A
3/*
4*******************************************************************************
5* Copyright (C) 2013-2014, International Business Machines
6* Corporation and others. All Rights Reserved.
7*******************************************************************************
8* collationdatawriter.h
9*
10* created on: 2013aug06
11* created by: Markus W. Scherer
12*/
13
14#ifndef __COLLATIONDATAWRITER_H__
15#define __COLLATIONDATAWRITER_H__
16
17#include "unicode/utypes.h"
18
19#if !UCONFIG_NO_COLLATION
20
21U_NAMESPACE_BEGIN
22
23struct CollationData;
24struct CollationSettings;
25struct CollationTailoring;
26
27/**
28 * Collation-related code for tools & demos.
29 */
30class U_I18N_API CollationDataWriter /* all static */ {
31public:
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
41private:
42 CollationDataWriter(); // no constructor
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
54U_NAMESPACE_END
55
56#endif // !UCONFIG_NO_COLLATION
57#endif // __COLLATIONDATAWRITER_H__