OLD | NEW |
(Empty) | |
| 1 #ifndef ADBLOCK_PLUS_REG_EXP_FILTER_H |
| 2 #define ADBLOCK_PLUS_REG_EXP_FILTER_H |
| 3 |
| 4 #include "Filter.h" |
| 5 #include "ActiveFilter.h" |
| 6 |
| 7 class RegExpFilter : public ActiveFilter |
| 8 { |
| 9 private: |
| 10 enum TrippleState {YES, NO, ANY}; |
| 11 |
| 12 mutable int mRegexpId; |
| 13 String mRegexpSource; |
| 14 int mContentType; |
| 15 bool mMatchCase; |
| 16 TrippleState mThirdParty; |
| 17 TrippleState mCollapse; |
| 18 void ProcessOption(String& options, int optionStart, |
| 19 int optionEnd, int valueStart, int valueEnd); |
| 20 public: |
| 21 explicit RegExpFilter(const String& text, |
| 22 String::size_type patternStart, String::size_type patternEnd); |
| 23 ~RegExpFilter(); |
| 24 static Filter* Create(const String& text); |
| 25 static void InitJSTypes(); |
| 26 static String RegExpFromSource(const String& source); |
| 27 Type GetType() const; |
| 28 bool Matches(const String& location, int typeMask, String& docDomain, |
| 29 bool thirdParty, const String& sitekey) const; |
| 30 }; |
| 31 |
| 32 #endif |
OLD | NEW |