Commit 94b35181 authored by Alexander David Hellwig's avatar Alexander David Hellwig

Merge branch 'master' into RosAndAdaptable

parents 2957882e 66c22251
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!-- == PROJECT COORDINATES ============================================= --> <!-- == PROJECT COORDINATES ============================================= -->
<groupId>de.moticore.lang.monticar</groupId> <groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-middleware-generator</artifactId> <artifactId>embedded-montiarc-math-middleware-generator</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
......
...@@ -15,15 +15,22 @@ import java.util.List; ...@@ -15,15 +15,22 @@ import java.util.List;
//TODO: make GeneratorCpp implement GeneratorImpl directly! //TODO: make GeneratorCpp implement GeneratorImpl directly!
public class CPPGenImpl implements GeneratorImpl { public class CPPGenImpl implements GeneratorImpl {
private String generationTargetPath; private String generationTargetPath;
private GeneratorCPP generatorCPP;
public CPPGenImpl(){
generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
}
public void setGeneratorCPP(GeneratorCPP generatorCPP){
this.generatorCPP = generatorCPP;
}
@Override @Override
public List<File> generate(ExpandedComponentInstanceSymbol componentInstanceSymbol, TaggingResolver taggingResolver) throws IOException { public List<File> generate(ExpandedComponentInstanceSymbol componentInstanceSymbol, TaggingResolver taggingResolver) throws IOException {
List<File> files = new ArrayList<>(); List<File> files = new ArrayList<>();
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.setGenerationTargetPath(generationTargetPath); generatorCPP.setGenerationTargetPath(generationTargetPath);
generatorCPP.useArmadilloBackend();
files.add(generatorCPP.generateFile(generateCMake(componentInstanceSymbol))); files.add(generatorCPP.generateFile(generateCMake(componentInstanceSymbol)));
files.addAll(generatorCPP.generateFiles(componentInstanceSymbol, taggingResolver)); files.addAll(generatorCPP.generateFiles(componentInstanceSymbol, taggingResolver));
......
...@@ -12,11 +12,19 @@ import java.util.List; ...@@ -12,11 +12,19 @@ import java.util.List;
//TODO: make GeneratorRosCpp implement GeneratorImpl //TODO: make GeneratorRosCpp implement GeneratorImpl
public class RosCppGenImpl implements GeneratorImpl { public class RosCppGenImpl implements GeneratorImpl {
private String generationTargetPath; private String generationTargetPath;
private GeneratorRosCpp generatorRosCpp;
public RosCppGenImpl(){
generatorRosCpp = new GeneratorRosCpp();
generatorRosCpp.setGenerateCMake(true);
}
public void setGeneratorRosCpp(GeneratorRosCpp generatorRosCpp) {
this.generatorRosCpp = generatorRosCpp;
}
@Override @Override
public List<File> generate(ExpandedComponentInstanceSymbol componentInstanceSymbol, TaggingResolver taggingResolver) throws IOException { public List<File> generate(ExpandedComponentInstanceSymbol componentInstanceSymbol, TaggingResolver taggingResolver) throws IOException {
GeneratorRosCpp generatorRosCpp = new GeneratorRosCpp();
generatorRosCpp.setGenerateCMake(true);
generatorRosCpp.setGenerationTargetPath(generationTargetPath); generatorRosCpp.setGenerationTargetPath(generationTargetPath);
return generatorRosCpp.generateFiles(componentInstanceSymbol, taggingResolver); return generatorRosCpp.generateFiles(componentInstanceSymbol, taggingResolver);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment