final case
class EventFilters(modelFilter: GlobalEvent => Option[GlobalEvent], viewModelFilter: GlobalEvent => Option[GlobalEvent])
EventFilter's control which events will be processed by your model or view model. You can think of event filters like a firewall for events, that only permit the wanted events into the model and view model update functions to avoid conflicts, duplicate, and needless work.
Events are filtered by mapping from a specific event to an optional event.
Although the name says "filter", the action is really filter and map, since there is no requirement to maintain the
original event as the resultant event. For example, you could map FrameTick
to CustomEvents.Update
if it make
more sense in your domain model.
- Value Params
- modelFilter
The filter map for the events going into model update
- viewModelFilter
The filter map for the events going into view model update
- Companion
- object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any