Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraradermache2013-04-04 22:03:13 +0000
committeraradermache2013-04-04 22:03:13 +0000
commit168bcb97ea99372e921c00bd859b0bab61076cf8 (patch)
tree1b182af08dd573928591906d9adf4b2d13373524 /extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppBindHeader.mtl
parent51518784b0995b2f15bff5982cd1421be3fe6910 (diff)
downloadorg.eclipse.papyrus-168bcb97ea99372e921c00bd859b0bab61076cf8.tar.gz
org.eclipse.papyrus-168bcb97ea99372e921c00bd859b0bab61076cf8.tar.xz
org.eclipse.papyrus-168bcb97ea99372e921c00bd859b0bab61076cf8.zip
Transition to Acceleo based generator
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppBindHeader.mtl')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppBindHeader.mtl38
1 files changed, 38 insertions, 0 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppBindHeader.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppBindHeader.mtl
new file mode 100644
index 00000000000..99148264afc
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppBindHeader.mtl
@@ -0,0 +1,38 @@
+[module CppBindHeader('http://www.eclipse.org/uml2/4.0.0/UML')/]
+[import org::eclipse::papyrus::cpp::codegen::utils::GenUtils/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::util::clazz::CppClassIncludeClassDeclaration/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppTemplates/]
+[import org::eclipse::papyrus::cpp::codegen::preferences::CppCodeGenUtils/]
+
+
+[template public CppBindHeader(class : Class)]
+#ifndef [getFullNameUC()/]_H
+#define [getFullNameUC()/]_H
+
+/************************************************************
+ [class.name/] template binding header
+ ************************************************************/
+
+[_package.CppOwnerPackageIncludeDeclaration()/]
+
+[CppClassAllIncludesDeclaration()/]
+
+[getApplication(C_Cpp::Include).oclAsType(C_Cpp::Include).header/]
+
+[let tb : TemplateBinding = getTemplateBindings()]
+[let templateElement : Classifier = tb.target->asSequence()->first()]
+#include <[_package.getFullPath()/]/[templateElement.owner.oclAsType(NamedElement).name/].[getHeaderSuffix()/]>
+
+[openNS()/]
+/************************************************************/
+typedef [templateElement.name/] <[for (tb.parameterSubstitution)][CppTemplateBindingParameter()/][/for]> [class.name/];
+
+[closeNS()/]
+[/let][/let]
+
+/************************************************************
+ End of [class.name/] template binding header
+ ************************************************************/
+
+#endif
+[/template]

Back to the top