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

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