Unverified Commit 49eaafdf authored by sschneiders's avatar sschneiders Committed by GitHub
Browse files

Update GeneratorCPP.java

parent 2ccf3f2b
......@@ -345,10 +345,7 @@ public class GeneratorCPP implements Generator {
}
private static FileContent generateAutopilotAdapter(ExpandedComponentInstanceSymbol componentSymbol) {
AutopilotAdapterViewModel vm = new AutopilotAdapterViewModel();
vm.setMainModelName(GeneralHelperMethods.getTargetLanguageComponentName(componentSymbol.getFullName()));
String fileContents = AllTemplates.generateAutopilotAdapter(vm);
return new FileContent(fileContents, "AutopilotAdapter.cpp");
return generateWrapper(componentSymbol, "AutopilotAdapter.cpp");
}
private static List<FileContent> getServerWrapperFiles(ExpandedComponentInstanceSymbol componentSymbol) {
......@@ -366,9 +363,13 @@ public class GeneratorCPP implements Generator {
}
private static FileContent generateServerWrapper(ExpandedComponentInstanceSymbol componentSymbol) {
return generateWrapper(componentSymbol, name);
}
private static FileContent generateWrapper(ExpandedComponentInstanceSymbol componentSymbol, String name) {
ServerWrapperViewModel vm = new ServerWrapperViewModel();
vm.setMainModelName(GeneralHelperMethods.getTargetLanguageComponentName(componentSymbol.getFullName()));
String fileContents = AllTemplates.generateServerWrapper(vm);
return new FileContent(fileContents, "server.cc");
return new FileContent(fileContents, name);
}
}
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