Example #1
0
 public void NodeCreated(ValidatedHandle handle)
 {
     Commands.Add(new CommandTuple {
         command = Command.Create, ContainerIndex = CreatedNodes.Count
     });
     CreatedNodes.Add(handle);
 }
Example #2
0
 public void NodeDeleted(ValidatedHandle handle, int definitionIndex)
 {
     Commands.Add(new CommandTuple {
         command = Command.Destroy, ContainerIndex = DeletedNodes.Count
     });
     DeletedNodes.Add(new DeletedTuple {
         Handle = handle, Class = definitionIndex
     });
 }
        public InputPair(NodeSet set, NodeHandle destHandle, InputPortArrayID destinationPort)
        {
            Handle = set.Validate(destHandle);
            var table = set.GetForwardingTable();

            for (var fH = set.GetNode(Handle).ForwardedPortHead; fH != ForwardPortHandle.Invalid; fH = table[fH].NextIndex)
            {
                ref var forwarding = ref table[fH];

                if (!forwarding.IsInput)
                {
                    continue;
                }

                var port = forwarding.GetOriginInputPortID();

                // Forwarded port list are monotonically increasing by port, so we can break out early
                if (forwarding.GetOriginPortCounter() > destinationPort.PortID.Port)
                {
                    break;
                }

                if (port != destinationPort.PortID)
                {
                    continue;
                }

                if (!set.StillExists(forwarding.Replacement))
                {
                    throw new InvalidOperationException("Replacement node for previously registered forward doesn't exist anymore");
                }

                Handle = forwarding.Replacement;
                Port   = destinationPort.IsArray
                    ? new InputPortArrayID(forwarding.GetReplacedInputPortID(), destinationPort.ArrayIndex)
                    : new InputPortArrayID(forwarding.GetReplacedInputPortID());

                return;
            }
 void PatchDFGInputsFor(Entity e, ValidatedHandle node)
 {
     ref var graphKernel = ref InternalComponentNode.GetGraphKernel(KernelNodes[node.VHandle.Index].Instance.Kernel);
Example #5
0
 public TopologyIndex this[ValidatedHandle vertex] {
     get => m_Indexes[vertex.VHandle.Index]; set => m_Indexes[vertex.VHandle.Index] = value;