]> git.saurik.com Git - apple/icu.git/blame - icuSources/i18n/regexst.h
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / i18n / regexst.h
CommitLineData
b75a7d8f
A
1//
2// regexst.h
3//
374ca955 4// Copyright (C) 2003-2004, International Business Machines Corporation and others.
b75a7d8f
A
5// All Rights Reserved.
6//
7// This file contains declarations for the class RegexStaticSets
8//
9// This class is internal to the regular expression implementation.
10// For the public Regular Expression API, see the file "unicode/regex.h"
11//
12// RegexStaticSets groups together the common UnicodeSets that are needed
13// for compiling or executing RegularExpressions. This grouping simplifies
14// the thread safe lazy creation and sharing of these sets across
15// all instances of regular expressions.
16//
17
18#ifndef REGEXST_H
19#define REGEXST_H
20
21#include "unicode/utypes.h"
22#if !UCONFIG_NO_REGULAR_EXPRESSIONS
23
24#include "regeximp.h"
25
26U_NAMESPACE_BEGIN
27
28class UnicodeSet;
29
30
31class RegexStaticSets : public UMemory {
32public:
33 static RegexStaticSets *gStaticSets; // Ptr to all lazily initialized constant
34 // shared sets.
35
36 RegexStaticSets(UErrorCode *status);
37 ~RegexStaticSets();
38 static void initGlobals(UErrorCode *status);
374ca955 39 static UBool cleanup();
b75a7d8f
A
40
41 UnicodeSet *fPropSets[URX_LAST_SET]; // The sets for common regex items, e.g. \s
42 Regex8BitSet fPropSets8[URX_LAST_SET]; // Fast bitmap sets for latin-1 range for above.
43
44 UnicodeSet *fRuleSets[10]; // Sets used while parsing regexp patterns.
45 UnicodeSet *fUnescapeCharSet; // Set of chars handled by unescape when
46 // encountered with a \ in a pattern.
47 UnicodeSet *fRuleDigits;
48 UnicodeString *fEmptyString; // An empty string, to be used when a matcher
49 // is created with no input.
50
51};
52
53
54
55
56U_NAMESPACE_END
57#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
58#endif // REGEXST_H