public static ExecutionResult createExecuteInstance(OperatorInstance instanceToExecute) { ExecutionResult executionResult; executionResult = new ExecutionResult(); executionResult.resultState = EnumResultState.EXECUTEOPERATORINSTANCE; executionResult.instanceToExecute = instanceToExecute; return(executionResult); }
private void pushNewOperator(OperatorInstance instanceToExecute) { StackElement createdStackElement; List <int> currentPath; StackElement currentStackElement; currentStackElement = operatorStack[operatorStack.Count - 1]; // clone currentPath = new List <int>(); currentPath.AddRange(currentStackElement.cachedPath); currentPath.Add(currentStackElement.operatorInstance.calleeResults.Count); createdStackElement = new StackElement(); createdStackElement.operatorInstance = instanceToExecute; createdStackElement.cachedPath = currentPath; operatorStack.Add(createdStackElement); }
// gets called from the executive if a (requested execution) operator(instance) was executed abstract public void feedOperatorInstanceResult(OperatorInstance instance, Variadic result);
abstract public ExecutionResult executeSingleStep(OperatorInstance instance);
abstract public void initializeOperatorInstance(OperatorInstance instance);
abstract public void setParameterOperatorInstances(OperatorInstance instance, List <OperatorInstance> parameterInstances);
abstract public IntrospectWiringInfo introspectWiring(OperatorInstance instance, int[] inputIndices);
//abstract public List<int> operationGetSlotIndicesBefore(OperatorInstance instance); /* gets the operator which must be executed next before this operator can be executed * * throws an error if the index is not valid (out of range or unused) * * \param instance the instance of the operator to be executed in the future/asked * \param slotIndex the slot to be asked * \param callParameters will be filled with the parameters for the to be called operator */ //abstract public Operator operationOperatorBefore(OperatorInstance instance, int slotIndex, List<Variadic> callParameters); /* * gets the value of the parameter of the operator which should be called before this operator * * \param instance the instance of the operator to be executed in the future/asked * \param slotIndex ... * \param subslotIndex ... */ //abstract public Variadic operationOperatorBeforeGetParameterValueBySlot(OperatorInstance instance, int slotIndex, int subslotIndex); //abstract public ExecutionResult operationExecute(OperatorInstance instance, List<Variadic> parameters); /** * gets called after the execution of the operator * * */ abstract public void operationCleanup(OperatorInstance instance);