//this points to evaluation engine or some delegate internal virtual void Evaluate() { OnEvaluation(); //build packages for all data var inputdata = gatherInputPortData(); if (Code == null) { Debug.Break(); } //build packages for output execution triggers, these // are tuples that connect an execution output string to a delegate // which calls the eval method on the next node // the idea is to call these outputs appropriately when needed from the code // or script defind by the node //i.e. For i in range(10): //triggers["iteration"]() //triggers["donewithiteration"]() var executiondata = gatherExecutionData(); var evalpackage = new EvaluationPackage(Code, inputdata.Select(x => x.First).ToList(), inputdata.Select(x => x.Second).ToList(), Outputs.Select(x => x.NickName).ToList(), executiondata); var outvar = Evaluator.Evaluate(evalpackage); this.StoredValueDict = outvar; OnEvaluated(); }
internal override void Evaluate() { OnEvaluation(); //build packages for all data Inputdata = gatherInputPortData(); if (CodePointer == null) { Debug.Break(); } //on this node we actually want to gather execution data for the inputexecutionNode's output port //this is so that upon the execution of this node, we insert a task which executes whatever node that inputrigger //points to... //TODOneed to watch out for this, I believe the issue is that we need the invariant, that when the execution data is calculated //we're executing, because we also gather the current task... we need to atleast make sure we update the current task //at the time we do the insertion of the task.... //a fix for now is to at the minimum create a property publicly reexecutes gather execution data //on the downstream node we really want to gather... Funcdef.InputExecutionNodes.First().ForceGatherExecutionData(); Executiondata = Funcdef.InputExecutionNodes.First().Executiondata; Debug.Log("we're grabbing execution pointers not from this node, but from downstream"); Executiondata.ForEach(x => Debug.Log(x.First)); //here we use the codepointer instead of the code string var evalpackage = new EvaluationPackage(CodePointer, Inputdata.Select(x => x.First).ToList(), Inputdata.Select(x => x.Second).ToList(), Outputs.Select(x => x.NickName).ToList(), Executiondata); var outvar = Evaluator.Evaluate(evalpackage); this.StoredValueDict = outvar; OnEvaluated(); }
internal override void Evaluate() { OnEvaluation(); //build packages for all data var inputdata = gatherInputPortData(); if (CodePointer == null) { Debug.Break(); } //i.e. For i in range(10): //triggers["iteration"]() //triggers["donewithiteration"]() var executiondata = gatherExecutionData(); //here we use the codepointer instead of the code string var evalpackage = new EvaluationPackage(CodePointer, inputdata.Select(x => x.First).ToList(), inputdata.Select(x => x.Second).ToList(), Outputs.Select(x => x.NickName).ToList(), executiondata); var outvar = Evaluator.Evaluate(evalpackage); this.StoredValueDict = outvar; OnEvaluated(); }