Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* |
michael@0 | 2 | ****************************************************************************** |
michael@0 | 3 | * |
michael@0 | 4 | * Copyright (C) 2008-2012, International Business Machines |
michael@0 | 5 | * Corporation and others. All Rights Reserved. |
michael@0 | 6 | * |
michael@0 | 7 | ****************************************************************************** |
michael@0 | 8 | * file name: uspoof_buildwsconf.h |
michael@0 | 9 | * encoding: US-ASCII |
michael@0 | 10 | * tab size: 8 (not used) |
michael@0 | 11 | * indentation:4 |
michael@0 | 12 | * |
michael@0 | 13 | * created on: 2009Jan19 |
michael@0 | 14 | * created by: Andy Heninger |
michael@0 | 15 | * |
michael@0 | 16 | * Internal classes and functions |
michael@0 | 17 | * for compiling whole script confusable data into its binary (runtime) form. |
michael@0 | 18 | */ |
michael@0 | 19 | |
michael@0 | 20 | #ifndef __USPOOF_BUILDWSCONF_H__ |
michael@0 | 21 | #define __USPOOF_BUILDWSCONF_H__ |
michael@0 | 22 | |
michael@0 | 23 | #include "unicode/utypes.h" |
michael@0 | 24 | |
michael@0 | 25 | #if !UCONFIG_NO_NORMALIZATION |
michael@0 | 26 | |
michael@0 | 27 | #if !UCONFIG_NO_REGULAR_EXPRESSIONS |
michael@0 | 28 | |
michael@0 | 29 | #include "uspoof_impl.h" |
michael@0 | 30 | #include "utrie2.h" |
michael@0 | 31 | |
michael@0 | 32 | |
michael@0 | 33 | U_NAMESPACE_BEGIN |
michael@0 | 34 | |
michael@0 | 35 | // |
michael@0 | 36 | // class BuilderScriptSet. Represents the set of scripts (Script Codes) |
michael@0 | 37 | // containing characters that are confusable with one specific |
michael@0 | 38 | // code point. |
michael@0 | 39 | // |
michael@0 | 40 | |
michael@0 | 41 | class BuilderScriptSet: public UMemory { |
michael@0 | 42 | public: |
michael@0 | 43 | UChar32 codePoint; // The source code point. |
michael@0 | 44 | UTrie2 *trie; // Any-case or Lower-case Trie. |
michael@0 | 45 | // These Trie tables are the final result of the |
michael@0 | 46 | // build. This flag indicates which of the two |
michael@0 | 47 | // this set of data is for. |
michael@0 | 48 | ScriptSet *sset; // The set of scripts itself. |
michael@0 | 49 | |
michael@0 | 50 | // Vectors of all B |
michael@0 | 51 | uint32_t index; // Index of this set in the Build Time vector |
michael@0 | 52 | // of script sets. |
michael@0 | 53 | uint32_t rindex; // Index of this set in the final (runtime) |
michael@0 | 54 | // array of sets. |
michael@0 | 55 | UBool scriptSetOwned; // True if this BuilderScriptSet owns (should delete) |
michael@0 | 56 | // its underlying sset. |
michael@0 | 57 | |
michael@0 | 58 | BuilderScriptSet(); |
michael@0 | 59 | ~BuilderScriptSet(); |
michael@0 | 60 | }; |
michael@0 | 61 | |
michael@0 | 62 | |
michael@0 | 63 | void buildWSConfusableData(SpoofImpl *spImpl, const char * confusablesWS, |
michael@0 | 64 | int32_t confusablesWSLen, UParseError *pe, UErrorCode &status); |
michael@0 | 65 | |
michael@0 | 66 | U_NAMESPACE_END |
michael@0 | 67 | |
michael@0 | 68 | #endif // !UCONFIG_NO_REGULAR_EXPRESSIONS |
michael@0 | 69 | #endif // !UCONFIG_NO_NORMALIZATION |
michael@0 | 70 | #endif |