| LEFT | RIGHT |
| 1 #include "bindings.h" | 1 #include "bindings.ipp" |
| 2 #include "Filter.h" | 2 #include "Filter.h" |
| 3 #include "InvalidFilter.h" | 3 #include "InvalidFilter.h" |
| 4 #include "CommentFilter.h" | 4 #include "CommentFilter.h" |
| 5 #include "ActiveFilter.h" | 5 #include "ActiveFilter.h" |
| 6 #include "RegExpFilter.h" | 6 #include "RegExpFilter.h" |
| 7 #include "BlockingFilter.h" | 7 #include "BlockingFilter.h" |
| 8 #include "WhitelistFilter.h" | 8 #include "WhitelistFilter.h" |
| 9 #include "ElemHideBase.h" | 9 #include "ElemHideBase.h" |
| 10 #include "ElemHideFilter.h" | 10 #include "ElemHideFilter.h" |
| 11 #include "ElemHideException.h" | 11 #include "ElemHideException.h" |
| 12 #include "CSSPropertyFilter.h" | 12 #include "CSSPropertyFilter.h" |
| 13 | 13 |
| 14 EMSCRIPTEN_BINDINGS | 14 EMSCRIPTEN_BINDINGS |
| 15 { | 15 { |
| 16 class_<Filter>("Filter") | 16 class_<Filter>("Filter") |
| 17 .property("text", &Filter::GetText) | 17 .property("text", &Filter::GetText) |
| 18 .function("serialize", &Filter::Serialize) | 18 .function("serialize", &Filter::Serialize) |
| 19 .class_function("fromText", &Filter::FromText) | 19 .class_function("fromText", &Filter::FromText) |
| 20 .class_function("getKnownFilter", &Filter::GetKnownFilter) | 20 .subclass_differentiator(&Filter::mType, { |
| 21 .subclass_differentiator(&Filter::GetType, { | |
| 22 {Filter::Type::INVALID, "InvalidFilter"}, | 21 {Filter::Type::INVALID, "InvalidFilter"}, |
| 23 {Filter::Type::COMMENT, "CommentFilter"}, | 22 {Filter::Type::COMMENT, "CommentFilter"}, |
| 24 {Filter::Type::BLOCKING, "BlockingFilter"}, | 23 {Filter::Type::BLOCKING, "BlockingFilter"}, |
| 25 {Filter::Type::WHITELIST, "WhitelistFilter"}, | 24 {Filter::Type::WHITELIST, "WhitelistFilter"}, |
| 26 {Filter::Type::ELEMHIDE, "ElemHideFilter"}, | 25 {Filter::Type::ELEMHIDE, "ElemHideFilter"}, |
| 27 {Filter::Type::ELEMHIDEEXCEPTION, "ElemHideException"}, | 26 {Filter::Type::ELEMHIDEEXCEPTION, "ElemHideException"}, |
| 28 {Filter::Type::CSSPROPERTY, "CSSPropertyFilter"}, | 27 {Filter::Type::CSSPROPERTY, "CSSPropertyFilter"}, |
| 29 }); | 28 }); |
| 30 | 29 |
| 31 class_<InvalidFilter,Filter>("InvalidFilter") | 30 class_<InvalidFilter,Filter>("InvalidFilter") |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 62 |
| 64 class_<ElemHideException,ElemHideBase>("ElemHideException") | 63 class_<ElemHideException,ElemHideBase>("ElemHideException") |
| 65 .class_property("type", "'elemhideexception'"); | 64 .class_property("type", "'elemhideexception'"); |
| 66 | 65 |
| 67 class_<CSSPropertyFilter,ElemHideBase>("CSSPropertyFilter") | 66 class_<CSSPropertyFilter,ElemHideBase>("CSSPropertyFilter") |
| 68 .class_property("type", "'cssproperty'") | 67 .class_property("type", "'cssproperty'") |
| 69 .property("regexpString", &CSSPropertyFilter::GetRegExpString) | 68 .property("regexpString", &CSSPropertyFilter::GetRegExpString) |
| 70 .property("selectorPrefix", &CSSPropertyFilter::GetSelectorPrefix) | 69 .property("selectorPrefix", &CSSPropertyFilter::GetSelectorPrefix) |
| 71 .property("selectorSuffix", &CSSPropertyFilter::GetSelectorSuffix); | 70 .property("selectorSuffix", &CSSPropertyFilter::GetSelectorSuffix); |
| 72 } | 71 } |
| LEFT | RIGHT |