def apply
bendvy-ecs-core@0.1.0.3 · execution_relation_interpreter.bend:50
import bendvy-ecs-core@0.1.0.3/execution_relation_interpreter.bend as ExecutionRelationInterpreter
import Base
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as A
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/execution_relation_operation.bend as O
50
51
52
53def apply(~S:Data,~descriptor:T.Descriptor<S>,+namespace:U32,allocator:A.Allocator,graph:T.Graph<S>,operation:O.Operation<S>) -> A.Allocator & O.Outcome<S>:
54 match operation:
55 case O.Relate{+source,target}:relate_source(~S,namespace,graph,descriptor,source,target,live(~S,namespace,allocator,source))
56 case O.Unrelate{+source}:unrelate_checked(~S,graph,descriptor,source,live(~S,namespace,allocator,source))
57 case O.Reorder{parent,children}:reorder(~S,namespace,allocator,graph,descriptor,parent,children)