Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuai Li2016-01-27 12:10:12 +0000
committerGerrit Code Review @ Eclipse.org2016-01-27 13:26:30 +0000
commita6758c8345c45d4212f9577cbbf1eeb0a0b5c213 (patch)
treecd0aeec7e263c0630956ccef11ceda1117cc9062 /extraplugins/qompass
parent2a57d574039b38e83849c466e717273976179144 (diff)
downloadorg.eclipse.papyrus-a6758c8345c45d4212f9577cbbf1eeb0a0b5c213.tar.gz
org.eclipse.papyrus-a6758c8345c45d4212f9577cbbf1eeb0a0b5c213.tar.xz
org.eclipse.papyrus-a6758c8345c45d4212f9577cbbf1eeb0a0b5c213.zip
Bug 486356 - [C++ codegen] The code generator does create forward
declarations for signals - We now generate a forward declaration for everything except Enumeration and PrimitiveType Change-Id: I5468793d9af45d51df63ffc4f94958ce4d1e1ffc Signed-off-by: Shuai Li <shuai.li@cea.fr>
Diffstat (limited to 'extraplugins/qompass')
-rw-r--r--extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppClassIncludeClassDeclaration.xtend12
1 files changed, 6 insertions, 6 deletions
diff --git a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppClassIncludeClassDeclaration.xtend b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppClassIncludeClassDeclaration.xtend
index c41218e8dae..4b3f1a5df3c 100644
--- a/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppClassIncludeClassDeclaration.xtend
+++ b/extraplugins/qompass/codegen/cpp/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/xtend/CppClassIncludeClassDeclaration.xtend
@@ -81,12 +81,12 @@ class CppClassIncludeClassDeclaration {
if ((cl != classifier) && (!GenUtils.hasStereotype(cl, NoCodeGen)) || (GenUtils.hasStereotype(cl, External))) {
var declaration = "";
- if ((cl instanceof Enumeration) || (cl instanceof PrimitiveType)) {
- // Ignore
- } else if (cl instanceof DataType) {
- declaration = CppGenUtils.openNSMinimal(cl) + "struct " + cl.name + ";" + CppGenUtils.closeNSMinimal(cl);
- } else if (cl.eClass.equals(UMLFactory.eINSTANCE.getUMLPackage().getClass_())) {
- declaration = CppGenUtils.openNSMinimal(cl).replaceAll("\r", "").replaceAll("\n", "") + "class " + cl.name + ";" + CppGenUtils.closeNSMinimal(cl).replaceAll("\r", "").replaceAll("\n", "");
+ if (!(cl instanceof Enumeration) && !(cl instanceof PrimitiveType)) {
+ if (cl instanceof DataType) {
+ declaration = CppGenUtils.openNSMinimal(cl) + "struct " + cl.name + ";" + CppGenUtils.closeNSMinimal(cl);
+ } else {
+ declaration = CppGenUtils.openNSMinimal(cl).replaceAll("\r", "").replaceAll("\n", "") + "class " + cl.name + ";" + CppGenUtils.closeNSMinimal(cl).replaceAll("\r", "").replaceAll("\n", "");
+ }
}
if (declaration != "") {

Back to the top