All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scudata.expression.mfn.op.AttachRun Maven / Gradle / Ivy

Go to download

SPL(Structured Process Language) A programming language specially for structured data computing.

There is a newer version: 20240823
Show newest version
package com.scudata.expression.mfn.op;

import com.scudata.dm.Context;
import com.scudata.dm.op.Run;
import com.scudata.expression.Expression;
import com.scudata.expression.OperableFunction;
import com.scudata.expression.ParamInfo2;

/**
 * ???α??ܵ????Ӽ??????ʽ????
 * op.run(xi,??) op.run(xi:Fi:,??) op???α??ܵ?
 * @author RunQian
 *
 */
public class AttachRun extends OperableFunction {
	public Object calculate(Context ctx) {
		if (param == null) {
			return operable;
		} else if (param.isLeaf()) {
			Expression exp = param.getLeafExpression();
			Run run = new Run(this, exp);
			if (cs != null) {
				run.setCurrentCell(cs.getCurrent());
			}
			
			return operable.addOperation(run, ctx);
		} else {
			ParamInfo2 pi = ParamInfo2.parse(param, "run", true, false);
			Expression []exps = pi.getExpressions1();
			Expression []assignExps = pi.getExpressions2();

			Run run = new Run(this, assignExps, exps);
			if (cs != null) {
				run.setCurrentCell(cs.getCurrent());
			}
			
			return operable.addOperation(run, ctx);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy