Index: compiled/Filter.h |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/compiled/Filter.h |
@@ -0,0 +1,49 @@ |
+#ifndef ADBLOCK_PLUS_FILTER_H |
+#define ADBLOCK_PLUS_FILTER_H |
+ |
+#include <memory> |
+#include <string> |
+#include <vector> |
+ |
+class Filter; |
+ |
+typedef std::shared_ptr<Filter> FilterPtr; |
+ |
+class Filter |
+{ |
+private: |
+ std::u16string text; |
+ |
+public: |
+ explicit Filter(const std::u16string& text); |
+ |
+ /* TODO |
+ std::vector<Subscription> subscriptions; |
+ */ |
+ |
+ const std::u16string GetText() const |
+ { |
+ return text; |
+ } |
+ |
+ enum Type |
+ { |
+ UNKNOWN = 0, |
+ INVALID = 1, |
+ COMMENT = 2, |
+ BLOCKING = 3, |
+ WHITELIST = 4, |
+ ELEMHIDE = 5, |
+ ELEMHIDEEXCEPTION = 6, |
+ CSSPROPERTY = 7, |
+ }; |
+ |
+ virtual Type GetType() const = 0; |
+ |
+ virtual const std::u16string Serialize(); |
+ |
+ static FilterPtr FromText(const std::u16string& text); |
+ static const std::u16string Normalize(const std::u16string& text); |
+}; |
+ |
+#endif |