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

Unified Diff: compiled/bindings/main.cpp

Issue 29581602: Issue 5141 - [emscripten] Convert filter matcher to C++ Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Created Oct. 17, 2017, 12:31 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/bindings/main.cpp
===================================================================
--- a/compiled/bindings/main.cpp
+++ b/compiled/bindings/main.cpp
@@ -29,16 +29,17 @@
#include "../filter/ElemHideBase.h"
#include "../filter/ElemHideFilter.h"
#include "../filter/ElemHideException.h"
#include "../filter/ElemHideEmulationFilter.h"
#include "../subscription/Subscription.h"
#include "../subscription/DownloadableSubscription.h"
#include "../subscription/UserDefinedSubscription.h"
#include "../storage/FilterStorage.h"
+#include "../matcher/Matcher.h"
#include "../FilterNotifier.h"
int main()
{
try
{
class_<Filter>("Filter")
.property("text", &Filter::GetText)
@@ -135,16 +136,22 @@ int main()
.property("subscriptionCount", &FilterStorage::GetSubscriptionCount)
.function("subscriptionAt", &FilterStorage::SubscriptionAt)
.function("indexOfSubscription", &FilterStorage::IndexOfSubscription)
.function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionForFilter)
.function("addSubscription", &FilterStorage::AddSubscription)
.function("removeSubscription", &FilterStorage::RemoveSubscription)
.function("moveSubscription", &FilterStorage::MoveSubscription);
+ class_<Matcher>("Matcher")
+ .function("add", &Matcher::Add)
+ .function("remove", &Matcher::Remove)
+ .function("matchesAny", &Matcher::MatchesAny)
+ .class_function("create", &Matcher::Create);
+
printBindings();
RegExpFilter::GenerateCustomBindings();
FilterNotifier::GenerateCustomBindings();
return 0;
}
catch (const std::exception& e)
{
« no previous file with comments | « compiled/Map.h ('k') | compiled/filter/RegExpFilter.h » ('j') | compiled/filter/RegExpFilter.h » ('J')

Powered by Google App Engine
This is Rietveld