summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-4.4/i18n/uspoof_wsconf.h
blob: 2b633152368b9cc074f0246bd52ac401ccad722e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
******************************************************************************
*
*   Copyright (C) 2008-2009, International Business Machines
*   Corporation and others.  All Rights Reserved.
*
******************************************************************************
*   file name:  uspoof_buildwsconf.h
*   encoding:   US-ASCII
*   tab size:   8 (not used)
*   indentation:4
*
*   created on: 2009Jan19
*   created by: Andy Heninger
*
*   Internal classes and functions
*   for compiling whole script confusable data into its binary (runtime) form.
*/

#ifndef __USPOOF_BUILDWSCONF_H__
#define __USPOOF_BUILDWSCONF_H__

#include "unicode/utypes.h"

#if !UCONFIG_NO_NORMALIZATION

#if !UCONFIG_NO_REGULAR_EXPRESSIONS 

#include "uspoof_impl.h"
#include "utrie2.h"


U_NAMESPACE_BEGIN

//
// class BuilderScriptSet.   Represents the set of scripts (Script Codes)
//             containing characters that are confusable with one specific
//             code point.
//

class BuilderScriptSet: public UMemory {
  public:
    UChar32      codePoint;       // The source code point.
    UTrie2      *trie;            // Any-case or Lower-case Trie.
                                  //   These Trie tables are the final result of the
                                  //   build.  This flag indicates which of the two
                                  //   this set of data is for.
    ScriptSet   *sset;            // The set of scripts itself.

                                  // Vectors of all B
    uint32_t     index;           // Index of this set in the Build Time vector
                                  //   of script sets.
    uint32_t     rindex;          // Index of this set in the final (runtime)
                                  //   array of sets.
    UBool        scriptSetOwned;  // True if this BuilderScriptSet owns (should delete)
                                  //   its underlying sset.

    BuilderScriptSet();
    ~BuilderScriptSet();
};

U_NAMESPACE_END

void buildWSConfusableData(SpoofImpl *spImpl, const char * confusablesWS,
          int32_t confusablesWSLen, UParseError *pe, UErrorCode &status); 


#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS 
#endif // !UCONFIG_NO_NORMALIZATION 
#endif