|
@@ -13,7 +13,7 @@ package org.yakindu.sct.generator.cpp;
|
|
|
import org.yakindu.sct.generator.c.GenArtifactConfigurations;
|
|
import org.yakindu.sct.generator.c.GenArtifactConfigurations;
|
|
|
import org.yakindu.sct.generator.c.IGenArtifactConfigurations;
|
|
import org.yakindu.sct.generator.c.IGenArtifactConfigurations;
|
|
|
import org.yakindu.sct.generator.c.types.CTypeSystemAccess;
|
|
import org.yakindu.sct.generator.c.types.CTypeSystemAccess;
|
|
|
-import org.yakindu.sct.generator.core.impl.GenericJavaBasedGenerator;
|
|
|
|
|
|
|
+import org.yakindu.sct.generator.core.impl.AbstractSExecModelGenerator;
|
|
|
import org.yakindu.sct.generator.core.types.ICodegenTypeSystemAccess;
|
|
import org.yakindu.sct.generator.core.types.ICodegenTypeSystemAccess;
|
|
|
import org.yakindu.sct.model.sexec.ExecutionFlow;
|
|
import org.yakindu.sct.model.sexec.ExecutionFlow;
|
|
|
import org.yakindu.sct.model.sexec.naming.INamingService;
|
|
import org.yakindu.sct.model.sexec.naming.INamingService;
|
|
@@ -31,24 +31,24 @@ import com.google.inject.util.Modules;
|
|
|
* @author Markus Mühlbrandt - Initial contribution and API
|
|
* @author Markus Mühlbrandt - Initial contribution and API
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
-public class CppCodeGenerator extends GenericJavaBasedGenerator {
|
|
|
|
|
|
|
+public class CppCodeGenerator extends AbstractSExecModelGenerator {
|
|
|
|
|
|
|
|
@Inject
|
|
@Inject
|
|
|
private CppGenerator delegate;
|
|
private CppGenerator delegate;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Inject
|
|
@Inject
|
|
|
private IGenArtifactConfigurations artifactConfigs;
|
|
private IGenArtifactConfigurations artifactConfigs;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected void prepareGenerator(GeneratorEntry entry) {
|
|
protected void prepareGenerator(GeneratorEntry entry) {
|
|
|
super.prepareGenerator(entry);
|
|
super.prepareGenerator(entry);
|
|
|
initGenArtifactConfigurations();
|
|
initGenArtifactConfigurations();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
protected void initGenArtifactConfigurations() {
|
|
protected void initGenArtifactConfigurations() {
|
|
|
artifactConfigs.setFileSystemAccess(sctFsa);
|
|
artifactConfigs.setFileSystemAccess(sctFsa);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void runGenerator(Statechart statechart, GeneratorEntry entry) {
|
|
public void runGenerator(Statechart statechart, GeneratorEntry entry) {
|
|
|
ExecutionFlow flow = createExecutionFlow(statechart, entry);
|
|
ExecutionFlow flow = createExecutionFlow(statechart, entry);
|
|
@@ -66,7 +66,7 @@ public class CppCodeGenerator extends GenericJavaBasedGenerator {
|
|
|
binder.bind(ICodegenTypeSystemAccess.class).to(CTypeSystemAccess.class);
|
|
binder.bind(ICodegenTypeSystemAccess.class).to(CTypeSystemAccess.class);
|
|
|
binder.bind(INamingService.class).to(CppNamingService.class);
|
|
binder.bind(INamingService.class).to(CppNamingService.class);
|
|
|
binder.bind(GeneratorEntry.class).toInstance(entry);
|
|
binder.bind(GeneratorEntry.class).toInstance(entry);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
binder.bind(IGenArtifactConfigurations.class).to(GenArtifactConfigurations.class);
|
|
binder.bind(IGenArtifactConfigurations.class).to(GenArtifactConfigurations.class);
|
|
|
// default binding to ensure consistency of already used API
|
|
// default binding to ensure consistency of already used API
|
|
|
binder.bind(IGenArtifactConfigurations.class)
|
|
binder.bind(IGenArtifactConfigurations.class)
|