michael@0: // michael@0: // regexst.h michael@0: // michael@0: // Copyright (C) 2003-2010, International Business Machines Corporation and others. michael@0: // All Rights Reserved. michael@0: // michael@0: // This file contains declarations for the class RegexStaticSets michael@0: // michael@0: // This class is internal to the regular expression implementation. michael@0: // For the public Regular Expression API, see the file "unicode/regex.h" michael@0: // michael@0: // RegexStaticSets groups together the common UnicodeSets that are needed michael@0: // for compiling or executing RegularExpressions. This grouping simplifies michael@0: // the thread safe lazy creation and sharing of these sets across michael@0: // all instances of regular expressions. michael@0: // michael@0: michael@0: #ifndef REGEXST_H michael@0: #define REGEXST_H michael@0: michael@0: #include "unicode/utypes.h" michael@0: #include "unicode/utext.h" michael@0: #if !UCONFIG_NO_REGULAR_EXPRESSIONS michael@0: michael@0: #include "regeximp.h" michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: class UnicodeSet; michael@0: michael@0: michael@0: class RegexStaticSets : public UMemory { michael@0: public: michael@0: static RegexStaticSets *gStaticSets; // Ptr to all lazily initialized constant michael@0: // shared sets. michael@0: michael@0: RegexStaticSets(UErrorCode *status); michael@0: ~RegexStaticSets(); michael@0: static void initGlobals(UErrorCode *status); michael@0: static UBool cleanup(); michael@0: michael@0: UnicodeSet *fPropSets[URX_LAST_SET]; // The sets for common regex items, e.g. \s michael@0: Regex8BitSet fPropSets8[URX_LAST_SET]; // Fast bitmap sets for latin-1 range for above. michael@0: michael@0: UnicodeSet fRuleSets[10]; // Sets used while parsing regexp patterns. michael@0: UnicodeSet fUnescapeCharSet; // Set of chars handled by unescape when michael@0: // encountered with a \ in a pattern. michael@0: UnicodeSet *fRuleDigitsAlias; michael@0: UText *fEmptyText; // An empty string, to be used when a matcher michael@0: // is created with no input. michael@0: michael@0: }; michael@0: michael@0: michael@0: U_NAMESPACE_END michael@0: #endif // !UCONFIG_NO_REGULAR_EXPRESSIONS michael@0: #endif // REGEXST_H michael@0: