def bound_entries

bendvy-ecs-core@0.1.0.3 · execution_query_admission.bend:92

import bendvy-ecs-core@0.1.0.3/execution_query_admission.bend as ExecutionQueryAdmission
import Base
import bendvy-ecs-core@0.1.0.3/execution_query_recipe.bend as Recipe
import bendvy-ecs-core@0.1.0.3/execution_query_schema.bend as Schema
import bendvy-ecs-core@0.1.0.3/execution_query_domain.bend as D
import bendvy-ecs-core@0.1.0.3/execution_query_matches.bend as Match
import bendvy-ecs-core@0.1.0.3/world.bend as W

92def bound_entries(~S:Data,+info:List<&2,Schema.Info>,+handles:List<&2,W.Handle<S>>,selection:Recipe.Bound) -> List<&2,Schema.Entry>:
93  match selection:
94    case Recipe.AllLive{}:[]
95    case Recipe.Changed{+route}:[Schema.Entry{route,Match.Read{D.Domain{physical(~S,capacity(info_at(route,info)),handles)}}}]
96    case Recipe.With{+route}:[Schema.Entry{route,Match.Read{D.Domain{physical(~S,capacity(info_at(route,info)),handles)}}}]
97    case Recipe.Without{+route}:[Schema.Entry{route,Match.Read{D.Domain{physical(~S,capacity(info_at(route,info)),handles)}}}]
98    case Recipe.And{left,right}:List.append(&2,Schema.Entry,bound_entries(~S,info,handles,left),bound_entries(~S,info,handles,right))
99    case Recipe.Or{left,right}:List.append(&2,Schema.Entry,bound_entries(~S,info,handles,left),bound_entries(~S,info,handles,right))

Uses (11)

Used by (1)