コード例 #1
0
 public void NodeCreated(ValidatedHandle handle)
 {
     Commands.Add(new CommandTuple {
         command = Command.Create, ContainerIndex = CreatedNodes.Count
     });
     CreatedNodes.Add(handle);
 }
コード例 #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
     });
 }
コード例 #3
0
        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;
            }
コード例 #4
0
 void PatchDFGInputsFor(Entity e, ValidatedHandle node)
 {
     ref var graphKernel = ref InternalComponentNode.GetGraphKernel(KernelNodes[node.VHandle.Index].Instance.Kernel);
コード例 #5
0
 public TopologyIndex this[ValidatedHandle vertex] {
     get => m_Indexes[vertex.VHandle.Index]; set => m_Indexes[vertex.VHandle.Index] = value;