Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.mtl')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.mtl52
1 files changed, 52 insertions, 0 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.mtl
new file mode 100644
index 00000000000..95a0f6b8e65
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.mtl
@@ -0,0 +1,52 @@
+[module CppPackageHeader('http://www.eclipse.org/uml2/4.0.0/UML')/]
+[import org::eclipse::papyrus::cpp::codegen::utils::GenUtils/]
+[import org::eclipse::papyrus::cpp::codegen::preferences::CppCodeGenUtils/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::Constants/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::IncludeUtils/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::util::clazz::CppClassIncludeClassDeclaration/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::util::clazz::CppClassTypeAndEnum/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::util::clazz::CppClassFriendDeclaration/]
+
+
+[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppDocumentation/]
+
+
+[template public CppPackageHeader(pkg : Package)]
+#ifndef PKG_[getFullNameUC()/]
+#define PKG_[getFullNameUC()/]
+
+/************************************************************
+ Pkg_[name/] package header
+ ************************************************************/
+
+[nestingPackage.CppOwnerPackageIncludeDeclaration()/]
+
+#ifndef _IN_
+#define _IN_
+#endif
+#ifndef _OUT_
+#define _OUT_
+#endif
+#ifndef _INOUT_
+#define _INOUT_
+#endif
+
+
+/* Package dependency header include */
+[for (getUsedPackages())]
+#include <[getFullPath()/]/Pkg_[name/].[getHeaderSuffix()/]>
+[/for]
+
+[IncludeHeader()/]
+
+[openNS()/]
+[packageTypes()/]
+[CppClassTypeAndEnumPackage()/]
+[closeNS()/]
+
+/************************************************************
+ End of Pkg_[name/] package header
+ ************************************************************/
+
+#endif
+[/template]

Back to the top