def bound_access
bendvy-ecs-core@0.1.0.3 · execution_builder.bend:178
import bendvy-ecs-core@0.1.0.3/execution_builder.bend as ExecutionBuilder
import Base
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_declaration.bend as D
import bendvy-ecs-core@0.1.0.3/execution_query_recipe.bend as Recipe
178def bound_access(~full:Layout.Layout,selection:Recipe.Bound) -> List<&2,D.Access>:
179 match selection:
180 case Recipe.AllLive{}:[]
181 case Recipe.With{route}:[D.Access{Layout.key(full,route),D.ComponentAccess{},D.SharedView{},D.ReadOnly{}}]
182 case Recipe.Without{route}:[D.Access{Layout.key(full,route),D.ComponentAccess{},D.SharedView{},D.ReadOnly{}}]
183 case Recipe.Changed{route}:[D.Access{Layout.key(full,route),D.ComponentAccess{},D.SharedView{},D.ReadOnly{}}]
184 case Recipe.And{left,right}:List.append(&2,D.Access,bound_access(~full,left),bound_access(~full,right))
185 case Recipe.Or{left,right}:List.append(&2,D.Access,bound_access(~full,left),bound_access(~full,right))