Opened 3 years ago

Closed 13 months ago

#5258 closed change (rejected)

[emscripten] Make filters and subscriptions easier to use from C++

Reported by: trev Assignee:
Priority: P2 Milestone:
Module: Core Keywords: closed-in-favor-of-gitlab
Cc: Blocked By:
Blocking: #4122, #5141, #5259 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



We made filter and subscription classes easy to use from JavaScript, yet from C++ it is rather awkward. There is no easy way to convert a Filter instance to something like ActiveFilter safely, and only Filter references can be kept easily (no ActiveFilterPtr). Same issues apply to subscription, and one more: iterating over subscription's filters in C++ is quite complicated.

What to change

  • Implement Filter::As<FilterSubClass>() that will either cast the filter to FilterSubClass or return nullptr if the instance is incompatible. Similarly, implement Subscription::As<SubscriptionSubClass().
  • Define ActiveFilterPtr and the like in addition to FilterPtr.
  • Expose begin() and end() methods on Subscription forwarding the corresponding methods from Subscription.mFilters.

Change History (7)

comment:1 Changed 3 years ago by trev

  • Blocking 5259 added; 5137 removed

comment:2 Changed 3 years ago by trev

  • Blocking 5141 added

comment:3 Changed 3 years ago by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 3 years ago by trev

  • Review URL(s) modified (diff)

comment:6 Changed 3 years ago by trev

  • Owner trev deleted

comment:7 Changed 13 months ago by sebastian

  • Keywords closed-in-favor-of-gitlab added
  • Resolution set to rejected
  • Status changed from reviewing to closed

Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.

Note: See TracTickets for help on using tickets.