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

Unified Diff: compiled/Filter.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Fixed some bugs and exposed/tested more properties Created Jan. 15, 2016, 3:40 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiled/Filter.h
===================================================================
new file mode 100644
--- /dev/null
+++ b/compiled/Filter.h
@@ -0,0 +1,38 @@
+#ifndef ADBLOCKPLUS_FILTER_H
+#define ADBLOCKPLUS_FILTER_H
+
+#include <string>
+#include <vector>
+
+class Filter
+{
+private:
+ std::u16string text;
+
+public:
+ Filter(const std::u16string& text);
+
+ /* TODO
+ std::vector<Subscription> subscriptions;
+ */
+
+ const std::u16string get_text() {return text;}
+
+ enum Type
+ {
+ UNKNOWN = 0,
+ INVALID = 1,
+ COMMENT = 2,
+ BLOCKING = 3,
+ WHITELIST = 4,
+ ELEMHIDE = 5,
+ ELEMHIDEEXCEPTION = 6,
+ CSSPROPERTY = 7,
+ };
+
+ virtual Type get_type() = 0;
+
+ virtual const std::u16string Serialize();
+};
+
+#endif

Powered by Google App Engine
This is Rietveld