Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Remove strcmp for C++; == works (#2415)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeckmaR authored and tkutz committed Nov 12, 2018
1 parent a23b5ea commit 37bbc19
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ package org.yakindu.sct.generator.cpp
import com.google.inject.Inject
import org.yakindu.base.expressions.expressions.BoolLiteral
import org.yakindu.base.expressions.expressions.ElementReferenceExpression
import org.yakindu.base.expressions.expressions.Expression
import org.yakindu.base.expressions.expressions.FeatureCall
import org.yakindu.base.expressions.expressions.LogicalNotExpression
import org.yakindu.base.expressions.expressions.LogicalRelationExpression
import org.yakindu.base.expressions.expressions.StringLiteral
import org.yakindu.base.types.typesystem.GenericTypeSystem
import org.yakindu.base.types.typesystem.ITypeSystem
import org.yakindu.sct.generator.c.CExpressionsGenerator
import org.yakindu.sct.model.sexec.Method
import org.yakindu.sct.model.sexec.extensions.SExecExtensions
import org.yakindu.sct.model.sexec.naming.INamingService
import org.yakindu.sct.model.stext.stext.ActiveStateReferenceExpression
import org.yakindu.sct.model.stext.stext.EventRaisingExpression
import org.yakindu.sct.model.stext.stext.OperationDefinition
import org.yakindu.base.expressions.expressions.Expression
import org.yakindu.base.expressions.expressions.LogicalNotExpression
import org.yakindu.sct.model.sexec.Method

import static org.yakindu.sct.generator.c.CGeneratorConstants.*

Expand Down Expand Up @@ -68,6 +70,10 @@ class CppExpressionsGenerator extends CExpressionsGenerator {
/** Don't use bool_false for C++ code */
override dispatch CharSequence sc_boolean_code(LogicalNotExpression it) {code}

override dispatch CharSequence code(LogicalRelationExpression it)
'''((«leftOperand.code») «operator.literal» («rightOperand.code»))'''




}

0 comments on commit 37bbc19

Please sign in to comment.