| 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::wstring text; |
| + |
| +public: |
| + explicit Filter(const std::wstring& text); |
| + |
| + /* TODO |
| + std::vector<Subscription> subscriptions; |
| + */ |
| + |
| + const std::wstring GetText() const |
| + { |
| + return text; |
| + } |
| + |
| + enum Type |
| + { |
| + UNKNOWN, |
| + INVALID, |
| + COMMENT, |
| + BLOCKING, |
| + WHITELIST, |
| + ELEMHIDE, |
| + ELEMHIDEEXCEPTION, |
| + CSSPROPERTY, |
| + }; |
| + |
| + virtual Type GetType() const = 0; |
| + |
| + virtual const std::wstring Serialize(); |
| + |
| + static FilterPtr FromText(const std::wstring& text); |
| + static const std::wstring Normalize(const std::wstring& text); |
| +}; |
| + |
| +#endif |