|
10 | 10 | my $maxMemory = ($_ = $model->getParameterByName('maxMemory')) ? $_->getValueAt(0)->getCppExpression() : 1000000; |
11 | 11 | %> |
12 | 12 |
|
13 | | -bool MY_OPERATOR::RegexFullMatch(const string & str) { |
| 13 | +bool MY_OPERATOR::RegexFullMatch(const rstring & str) { |
14 | 14 | return RE2::FullMatch(str, _regex) == 1; |
15 | 15 | } |
16 | 16 |
|
17 | 17 | bool MY_OPERATOR::RegexFullMatch(const blob & blb) { |
18 | 18 | return RE2::FullMatch(re2::StringPiece(reinterpret_cast<const char*>(blb.getData()), blb.getSize()), _regex) == 1; |
19 | 19 | } |
20 | 20 |
|
21 | | -bool MY_OPERATOR::RegexFullMatch(const string & str, const string & pattern) { |
| 21 | +bool MY_OPERATOR::RegexFullMatch(const rstring & str, const rstring & pattern) { |
22 | 22 |
|
23 | 23 | AutoPortMutex am(_mutex, *this); |
24 | 24 | if(_regexMap.count(pattern) == 0) { |
25 | | - string pat = pattern; |
| 25 | + rstring pat = pattern; |
26 | 26 | _regexMap.insert(pat, new RE2(pattern, _options)); |
27 | 27 | } |
28 | 28 |
|
29 | 29 | return RE2::FullMatch(str, _regexMap.at(pattern)) == 1; |
30 | 30 | } |
31 | 31 |
|
32 | | -bool MY_OPERATOR::RegexFullMatch(const blob & blb, const string & pattern) { |
| 32 | +bool MY_OPERATOR::RegexFullMatch(const blob & blb, const rstring & pattern) { |
33 | 33 |
|
34 | 34 | AutoPortMutex am(_mutex, *this); |
35 | 35 | if(_regexMap.count(pattern) == 0) { |
36 | | - string pat = pattern; |
| 36 | + rstring pat = pattern; |
37 | 37 | _regexMap.insert(pat, new RE2(pattern, _options)); |
38 | 38 | } |
39 | 39 |
|
40 | 40 | return RE2::FullMatch(re2::StringPiece(reinterpret_cast<const char*>(blb.getData()), blb.getSize()), _regexMap.at(pattern)) == 1; |
41 | 41 | } |
42 | 42 |
|
43 | | -bool MY_OPERATOR::RegexPartialMatch(const string & str) { |
| 43 | +bool MY_OPERATOR::RegexPartialMatch(const rstring & str) { |
44 | 44 | return RE2::PartialMatch(str, _regex) == 1; |
45 | 45 | } |
46 | 46 |
|
47 | 47 | bool MY_OPERATOR::RegexPartialMatch(const blob & blb) { |
48 | 48 | return RE2::PartialMatch(re2::StringPiece(reinterpret_cast<const char*>(blb.getData()), blb.getSize()), _regex) == 1; |
49 | 49 | } |
50 | 50 |
|
51 | | -bool MY_OPERATOR::RegexPartialMatch(const string & str, const string & pattern) { |
| 51 | +bool MY_OPERATOR::RegexPartialMatch(const rstring & str, const rstring & pattern) { |
52 | 52 |
|
53 | 53 | AutoPortMutex am(_mutex, *this); |
54 | 54 | if(_regexMap.count(pattern) == 0) { |
55 | | - string pat = pattern; |
| 55 | + rstring pat = pattern; |
56 | 56 | _regexMap.insert(pat, new RE2(pattern, _options)); |
57 | 57 | } |
58 | 58 |
|
59 | 59 | return RE2::PartialMatch(str, _regexMap.at(pattern)) == 1; |
60 | 60 | } |
61 | 61 |
|
62 | | -bool MY_OPERATOR::RegexPartialMatch(const blob & blb, const string & pattern) { |
| 62 | +bool MY_OPERATOR::RegexPartialMatch(const blob & blb, const rstring & pattern) { |
63 | 63 |
|
64 | 64 | AutoPortMutex am(_mutex, *this); |
65 | 65 | if(_regexMap.count(pattern) == 0) { |
66 | | - string pat = pattern; |
| 66 | + rstring pat = pattern; |
67 | 67 | _regexMap.insert(pat, new RE2(pattern, _options)); |
68 | 68 | } |
69 | 69 |
|
70 | 70 | return RE2::PartialMatch(re2::StringPiece(reinterpret_cast<const char*>(blb.getData()), blb.getSize()), _regexMap.at(pattern)) == 1; |
71 | 71 | } |
72 | 72 |
|
73 | | -bool MY_OPERATOR::RegexSimpleMatch(const string & str, const string & pattern) { |
| 73 | +bool MY_OPERATOR::RegexSimpleMatch(const rstring & str, const rstring & pattern) { |
74 | 74 | return RE2::PartialMatch(str, pattern) == 1; |
75 | 75 | } |
76 | 76 |
|
77 | | -bool MY_OPERATOR::RegexSimpleMatch(const blob & blb, const string & pattern) { |
| 77 | +bool MY_OPERATOR::RegexSimpleMatch(const blob & blb, const rstring & pattern) { |
78 | 78 | return RE2::PartialMatch(re2::StringPiece(reinterpret_cast<const char*>(blb.getData()), blb.getSize()), pattern) == 1; |
79 | 79 | } |
80 | 80 |
|
|
0 commit comments