Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/RegExpFilter.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Almost complete implementation, missing CSS property filters Created Jan. 20, 2016, 12:04 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/InvalidFilter.cpp ('k') | compiled/RegExpFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 Type GetType() const;
29 bool Matches(const std::u16string& location, int typeMask,
30 const std::u16string& docDomain, bool thirdParty,
31 const std::u16string& sitekey);
32 };
33
34 #endif
OLDNEW
« no previous file with comments | « compiled/InvalidFilter.cpp ('k') | compiled/RegExpFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld