OLD | NEW |
(Empty) | |
| 1 #ifndef ADBLOCK_PLUS_REG_EXP_FILTER_H |
| 2 #define ADBLOCK_PLUS_REG_EXP_FILTER_H |
| 3 |
| 4 #include <string> |
| 5 |
| 6 #include "Filter.h" |
| 7 #include "ActiveFilter.h" |
| 8 |
| 9 class RegExpFilter : public ActiveFilter |
| 10 { |
| 11 private: |
| 12 enum TrippleState {YES, NO, ANY}; |
| 13 |
| 14 int regexpId; |
| 15 std::u16string regexpSource; |
| 16 int contentType; |
| 17 bool matchCase; |
| 18 TrippleState thirdParty; |
| 19 TrippleState collapse; |
| 20 void ProcessOption(const std::u16string& options, int optionStart, |
| 21 int optionEnd, int valueStart, int valueEnd); |
| 22 public: |
| 23 explicit RegExpFilter(const std::u16string& text, const std::u16string& patter
n, |
| 24 const std::u16string& options); |
| 25 ~RegExpFilter(); |
| 26 static Filter* Create(const std::u16string& text); |
| 27 static void InitJSTypes(); |
| 28 static const std::u16string RegExpFromSource(const std::u16string& source); |
| 29 Type GetType() const; |
| 30 bool Matches(const std::u16string& location, int typeMask, |
| 31 const std::u16string& docDomain, bool thirdParty, |
| 32 const std::u16string& sitekey); |
| 33 }; |
| 34 |
| 35 #endif |
OLD | NEW |