diff options
author | Philip Rauwolf <rauwolf@itestra.de> | 2013-02-08 17:57:22 +0100 |
---|---|---|
committer | Philip Rauwolf <rauwolf@itestra.de> | 2013-02-08 17:57:22 +0100 |
commit | d609de0c68d6ec2421b38229b277363b13461c3d (patch) | |
tree | 58a6cb374ed8060882ba1993665c41d6611db5b2 | |
parent | ac1491bd84d5c18876b83d6e4fe3a933617cff33 (diff) | |
download | genivi-common-api-runtime-d609de0c68d6ec2421b38229b277363b13461c3d.tar.gz |
Fixed comma-bug in generated stub, added virtual destructors where
necessary
2 files changed, 8 insertions, 2 deletions
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend index 778ee7d..e3a7ddd 100644 --- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend +++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend @@ -60,6 +60,8 @@ class FInterfaceStubGenerator { class «fInterface.stubClassName» : public CommonAPI::Stub<«fInterface.stubAdapterClassName» , «fInterface.stubRemoteEventClassName»> { public: + virtual ~«fInterface.stubClassName»() { } + «FOR attribute : fInterface.attributes» virtual const «attribute.type.getNameReference(fInterface.model)»& «attribute.stubClassGetMethodName»() = 0; «ENDFOR» diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend index 448b065..0bbef24 100644 --- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend +++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend @@ -220,12 +220,16 @@ class FrancaGeneratorExtensions { def generateStubSignature(FMethod fMethod) { var signature = fMethod.inArgs.map[type.getNameReference(fMethod.model) + ' ' + name].join(', ') + if (!fMethod.inArgs.empty && (fMethod.hasError || !fMethod.outArgs.empty)) + signature = signature + ', ' if (fMethod.hasError) - signature = signature + ', ' + fMethod.getErrorNameReference(fMethod.eContainer) + '& methodError' + signature = signature + fMethod.getErrorNameReference(fMethod.eContainer) + '& methodError' + if (fMethod.hasError && !fMethod.outArgs.empty) + signature = signature + ', ' if (!fMethod.outArgs.empty) - signature = signature + ', ' + fMethod.outArgs.map[type.getNameReference(fMethod.model) + '& ' + name].join(', ') + signature = signature + fMethod.outArgs.map[type.getNameReference(fMethod.model) + '& ' + name].join(', ') return signature } |