use of org.osate.ba.aadlba.UnaryBooleanOperator in project osate2 by osate.
the class FactorImpl method unsetUnaryBooleanOperator.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void unsetUnaryBooleanOperator() {
UnaryBooleanOperator oldUnaryBooleanOperator = unaryBooleanOperator;
boolean oldUnaryBooleanOperatorESet = unaryBooleanOperatorESet;
unaryBooleanOperator = UNARY_BOOLEAN_OPERATOR_EDEFAULT;
unaryBooleanOperatorESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, AadlBaPackage.FACTOR__UNARY_BOOLEAN_OPERATOR, oldUnaryBooleanOperator, UNARY_BOOLEAN_OPERATOR_EDEFAULT, oldUnaryBooleanOperatorESet));
}
use of org.osate.ba.aadlba.UnaryBooleanOperator in project osate2 by osate.
the class FactorImpl method setUnaryBooleanOperator.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setUnaryBooleanOperator(UnaryBooleanOperator newUnaryBooleanOperator) {
UnaryBooleanOperator oldUnaryBooleanOperator = unaryBooleanOperator;
unaryBooleanOperator = newUnaryBooleanOperator == null ? UNARY_BOOLEAN_OPERATOR_EDEFAULT : newUnaryBooleanOperator;
boolean oldUnaryBooleanOperatorESet = unaryBooleanOperatorESet;
unaryBooleanOperatorESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AadlBaPackage.FACTOR__UNARY_BOOLEAN_OPERATOR, oldUnaryBooleanOperator, unaryBooleanOperator, !oldUnaryBooleanOperatorESet));
}
use of org.osate.ba.aadlba.UnaryBooleanOperator in project osate-plugin by sireum.
the class BAVisitor method caseFactor.
@Override
public Boolean caseFactor(Factor object) {
BinaryNumericOperator bno = object.getBinaryNumericOperator();
UnaryBooleanOperator ubo = object.getUnaryBooleanOperator();
visit(object.getFirstValue());
BTSExp lhs = pop();
if (object.getSecondValue() != null) {
assert (!BAUtils.isNoneEnumerator(bno));
visit(object.getSecondValue());
BTSExp rhs = pop();
BTSBinaryOp.Type op = BAUtils.toBinaryOp(bno);
push(BTSBinaryExp$.MODULE$.apply(op, lhs, rhs, toNone()));
} else {
if (BAUtils.isNoneEnumerator(ubo)) {
push(lhs);
} else {
BAUtils.convertToUnaryExp(lhs, ubo);
}
}
return false;
}
Aggregations