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/IncludeUtils.mtl')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/IncludeUtils.mtl28
1 files changed, 28 insertions, 0 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/IncludeUtils.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/IncludeUtils.mtl
new file mode 100644
index 00000000000..cd81da94794
--- /dev/null
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/IncludeUtils.mtl
@@ -0,0 +1,28 @@
+[comment encoding = UTF-8 /]
+[module IncludeUtils('http://www.eclipse.org/uml2/4.0.0/UML')]
+[import org::eclipse::papyrus::cpp::codegen::utils::GenUtils/]
+[import org::eclipse::papyrus::cpp::codegen::acceleo::Constants/]
+
+[template public IncludeHeader(ne : NamedElement)]
+[if (hasStereotype(C_Cpp::Include) and (getApplication(C_Cpp::Include).oclAsType(C_Cpp::Include).header.size() > 0))]
+[IncludeHeaderStart()/]
+[getApplication(C_Cpp::Include).oclAsType(C_Cpp::Include).header/]
+[IncludeHeaderEnd()/]
+[/if]
+[/template]
+
+[template public IncludeBody(ne : NamedElement)]
+[if (hasStereotype(C_Cpp::Include) and (getApplication(C_Cpp::Include).oclAsType(C_Cpp::Include)._body <> null))]
+[IncludeBodyStart()/]
+[getApplication(C_Cpp::Include).oclAsType(C_Cpp::Include)._body/]
+[IncludeBodyEnd()/]
+[/if]
+[/template]
+
+[template public IncludePreBody(ne : NamedElement)]
+[if (hasStereotype(C_Cpp::Include))]
+[IncludePreBodyStart()/]
+[getApplication(C_Cpp::Include).oclAsType(C_Cpp::Include).preBody/]
+[IncludePreBodyEnd()/]
+[/if]
+[/template]

Back to the top