use of com.rockwellcollins.atc.resolute.resolute.ResoluteFactory in project osate2 by osate.
the class ResoluteInterface method createWrapperFunctionCall.
private FnCallExpr createWrapperFunctionCall(FunctionDefinition fd, InstanceObject io, List<PropertyExpression> params) {
ResoluteFactory factory = ResoluteFactory.eINSTANCE;
FnCallExpr call = factory.createFnCallExpr();
call.setFn(fd);
int fdparams = fd.getArgs().size();
int aparams = 0;
if (params != null) {
aparams = params.size();
}
if (fdparams == aparams + 1) {
call.getArgs().add(createInstanceObjectReference(io));
}
if (params != null) {
addParams(call, params);
}
return call;
}
use of com.rockwellcollins.atc.resolute.resolute.ResoluteFactory in project osate2 by osate.
the class ResoluteInterface method createInstanceObjectReference.
private ThisExpr createInstanceObjectReference(InstanceObject io) {
ResoluteFactory factory = ResoluteFactory.eINSTANCE;
NestedDotID nid = null;
if (io != null) {
nid = factory.createNestedDotID();
nid.setBase(io);
}
ThisExpr te = factory.createThisExpr();
te.setSub(nid);
return te;
}
use of com.rockwellcollins.atc.resolute.resolute.ResoluteFactory in project osate2 by osate.
the class ExecuteResoluteUtil method createWrapperFunctionCall.
private FnCallExpr createWrapperFunctionCall(FunctionDefinition fd, ComponentInstance evalContext, InstanceObject io, List<PropertyExpression> params) {
ResoluteFactory factory = ResoluteFactory.eINSTANCE;
FnCallExpr call = factory.createFnCallExpr();
call.setFn(fd);
call.getArgs().add(createInstanceObjectReference(evalContext, io));
if (params != null) {
addParams(call, params);
}
return call;
}
use of com.rockwellcollins.atc.resolute.resolute.ResoluteFactory in project osate2 by osate.
the class ExecuteResoluteUtil method createInstanceObjectReference.
private ThisExpr createInstanceObjectReference(ComponentInstance evalContext, InstanceObject io) {
ResoluteFactory factory = ResoluteFactory.eINSTANCE;
NestedDotID nid = null;
if (io != null) {
nid = factory.createNestedDotID();
nid.setBase(io);
}
ThisExpr te = factory.createThisExpr();
te.setSub(nid);
return te;
}
Aggregations