Search in sources :

Example 1 with ResoluteFactory

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;
}
Also used : ResoluteFactory(com.rockwellcollins.atc.resolute.resolute.ResoluteFactory) FnCallExpr(com.rockwellcollins.atc.resolute.resolute.FnCallExpr)

Example 2 with ResoluteFactory

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;
}
Also used : ResoluteFactory(com.rockwellcollins.atc.resolute.resolute.ResoluteFactory) NestedDotID(com.rockwellcollins.atc.resolute.resolute.NestedDotID) ThisExpr(com.rockwellcollins.atc.resolute.resolute.ThisExpr)

Example 3 with ResoluteFactory

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;
}
Also used : ResoluteFactory(com.rockwellcollins.atc.resolute.resolute.ResoluteFactory) FnCallExpr(com.rockwellcollins.atc.resolute.resolute.FnCallExpr)

Example 4 with ResoluteFactory

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;
}
Also used : ResoluteFactory(com.rockwellcollins.atc.resolute.resolute.ResoluteFactory) NestedDotID(com.rockwellcollins.atc.resolute.resolute.NestedDotID) ThisExpr(com.rockwellcollins.atc.resolute.resolute.ThisExpr)

Aggregations

ResoluteFactory (com.rockwellcollins.atc.resolute.resolute.ResoluteFactory)4 FnCallExpr (com.rockwellcollins.atc.resolute.resolute.FnCallExpr)2 NestedDotID (com.rockwellcollins.atc.resolute.resolute.NestedDotID)2 ThisExpr (com.rockwellcollins.atc.resolute.resolute.ThisExpr)2