mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
Issue #1971 - Part 2: Update ICU source to 63.2.
This commit is contained in:
parent
8df84683be
commit
1e69214382
3160 changed files with 275815 additions and 234203 deletions
70
intl/icu/source/tools/gennorm2/extradata.h
Normal file
70
intl/icu/source/tools/gennorm2/extradata.h
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
// © 2017 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
|
||||
// extradata.h
|
||||
// created: 2017jun04 Markus W. Scherer
|
||||
// (pulled out of n2builder.cpp)
|
||||
|
||||
// Write mappings and compositions in compact form for Normalizer2 "extra data",
|
||||
// the data that does not fit into the trie itself.
|
||||
|
||||
#ifndef __EXTRADATA_H__
|
||||
#define __EXTRADATA_H__
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
|
||||
#include "unicode/errorcode.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/utf16.h"
|
||||
#include "hash.h"
|
||||
#include "norms.h"
|
||||
#include "toolutil.h"
|
||||
#include "utrie2.h"
|
||||
#include "uvectr32.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class ExtraData : public Norms::Enumerator {
|
||||
public:
|
||||
ExtraData(Norms &n, UBool fast);
|
||||
|
||||
void rangeHandler(UChar32 start, UChar32 end, Norm &norm) U_OVERRIDE;
|
||||
|
||||
UnicodeString maybeYesCompositions;
|
||||
UnicodeString yesYesCompositions;
|
||||
UnicodeString yesNoMappingsAndCompositions;
|
||||
UnicodeString yesNoMappingsOnly;
|
||||
UnicodeString noNoMappingsCompYes;
|
||||
UnicodeString noNoMappingsCompBoundaryBefore;
|
||||
UnicodeString noNoMappingsCompNoMaybeCC;
|
||||
UnicodeString noNoMappingsEmpty;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Requires norm.hasMapping().
|
||||
* Returns the offset of the "first unit" from the beginning of the extraData for c.
|
||||
* That is the same as the length of the optional data
|
||||
* for the raw mapping and the ccc/lccc word.
|
||||
*/
|
||||
int32_t writeMapping(UChar32 c, const Norm &norm, UnicodeString &dataString);
|
||||
int32_t writeNoNoMapping(UChar32 c, const Norm &norm,
|
||||
UnicodeString &dataString, Hashtable &previousMappings);
|
||||
UBool setNoNoDelta(UChar32 c, Norm &norm) const;
|
||||
/** Requires norm.compositions!=nullptr. */
|
||||
void writeCompositions(UChar32 c, const Norm &norm, UnicodeString &dataString);
|
||||
void writeExtraData(UChar32 c, Norm &norm);
|
||||
|
||||
UBool optimizeFast;
|
||||
Hashtable previousNoNoMappingsCompYes; // If constructed in runtime code, pass in UErrorCode.
|
||||
Hashtable previousNoNoMappingsCompBoundaryBefore;
|
||||
Hashtable previousNoNoMappingsCompNoMaybeCC;
|
||||
Hashtable previousNoNoMappingsEmpty;
|
||||
};
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif // #if !UCONFIG_NO_NORMALIZATION
|
||||
|
||||
#endif // __EXTRADATA_H__
|
||||
Loading…
Add table
Add a link
Reference in a new issue