Ejemplo n.º 1
0
        public bool IsListening(GraphPointer pointer)
        {
            if (!pointer.hasData)
            {
                return(false);
            }

            return(pointer.GetElementData <Data>(this).isListening);
        }
Ejemplo n.º 2
0
        public static VariableDeclarations Graph(GraphPointer pointer)
        {
            Ensure.That(nameof(pointer)).IsNotNull(pointer);

            if (pointer.hasData)
            {
                return(GraphInstance(pointer));
            }
            else
            {
                return(GraphDefinition(pointer));
            }
        }
Ejemplo n.º 3
0
        private static bool IsInspected(GraphPointer pointer)
        {
            Ensure.That(nameof(pointer)).IsNotNull(pointer);

            foreach (var graphWindow in GraphWindow.tabsNoAlloc)
            {
                if (graphWindow.reference?.InstanceEquals(pointer) ?? false)
                {
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 4
0
        // Active state detection happens twice:
        //
        // 1. Before the enumeration, because any state
        //    that becomes active during an update shouldn't
        //    be updated until the next update
        //
        // 2. Inside the update method, because a state
        //    that was active during enumeration and no longer
        //    is shouldn't be updated.

        private HashSet <IState> GetActiveStatesNoAlloc(GraphPointer pointer)
        {
            var activeStates = HashSetPool <IState> .New();

            foreach (var state in states)
            {
                var stateData = pointer.GetElementData <State.Data>(state);

                if (stateData.isActive)
                {
                    activeStates.Add(state);
                }
            }

            return(activeStates);
        }
Ejemplo n.º 5
0
 public bool IsListening(GraphPointer pointer)
 {
     return(pointer.GetElementData <Data>(this).isListening);
 }
Ejemplo n.º 6
0
 public bool IsListening(GraphPointer pointer)
 => pointer.GetElementData <Data>(this).UpdateAction != null;
Ejemplo n.º 7
0
 public bool IsListening(GraphPointer pointer)
 {
     return(pointer.GetGraphData <FlowGraphData>().isListening);
 }
Ejemplo n.º 8
0
 public static VariableDeclarations GraphDefinition(GraphPointer pointer)
 {
     return(GraphDefinition((IGraphWithVariables)pointer.graph));
 }
Ejemplo n.º 9
0
 public static VariableDeclarations GraphInstance(GraphPointer pointer)
 {
     return(pointer.GetGraphData <IGraphDataWithVariables>().variables);
 }
Ejemplo n.º 10
0
 public bool IsListening(GraphPointer pointer)
 {
     return(pointer.GetElementData <State.Data>(source).isActive);
 }
Ejemplo n.º 11
0
 public RecursionNode(IUnitPort port, GraphPointer pointer)
 {
     this.port    = port;
     this.context = pointer.parent;
 }
Ejemplo n.º 12
0
 public bool IsListening(GraphPointer pointer) => isListening;