michael@0: /* michael@0: ****************************************************************************** michael@0: * michael@0: * Copyright (C) 2008-2012, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: * michael@0: ****************************************************************************** michael@0: * file name: uspoof_buildwsconf.h michael@0: * encoding: US-ASCII michael@0: * tab size: 8 (not used) michael@0: * indentation:4 michael@0: * michael@0: * created on: 2009Jan19 michael@0: * created by: Andy Heninger michael@0: * michael@0: * Internal classes and functions michael@0: * for compiling whole script confusable data into its binary (runtime) form. michael@0: */ michael@0: michael@0: #ifndef __USPOOF_BUILDWSCONF_H__ michael@0: #define __USPOOF_BUILDWSCONF_H__ michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_NORMALIZATION michael@0: michael@0: #if !UCONFIG_NO_REGULAR_EXPRESSIONS michael@0: michael@0: #include "uspoof_impl.h" michael@0: #include "utrie2.h" michael@0: michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: // michael@0: // class BuilderScriptSet. Represents the set of scripts (Script Codes) michael@0: // containing characters that are confusable with one specific michael@0: // code point. michael@0: // michael@0: michael@0: class BuilderScriptSet: public UMemory { michael@0: public: michael@0: UChar32 codePoint; // The source code point. michael@0: UTrie2 *trie; // Any-case or Lower-case Trie. michael@0: // These Trie tables are the final result of the michael@0: // build. This flag indicates which of the two michael@0: // this set of data is for. michael@0: ScriptSet *sset; // The set of scripts itself. michael@0: michael@0: // Vectors of all B michael@0: uint32_t index; // Index of this set in the Build Time vector michael@0: // of script sets. michael@0: uint32_t rindex; // Index of this set in the final (runtime) michael@0: // array of sets. michael@0: UBool scriptSetOwned; // True if this BuilderScriptSet owns (should delete) michael@0: // its underlying sset. michael@0: michael@0: BuilderScriptSet(); michael@0: ~BuilderScriptSet(); michael@0: }; michael@0: michael@0: michael@0: void buildWSConfusableData(SpoofImpl *spImpl, const char * confusablesWS, michael@0: int32_t confusablesWSLen, UParseError *pe, UErrorCode &status); michael@0: michael@0: U_NAMESPACE_END michael@0: michael@0: #endif // !UCONFIG_NO_REGULAR_EXPRESSIONS michael@0: #endif // !UCONFIG_NO_NORMALIZATION michael@0: #endif