diff options
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/property/CppAttributeDeclaration.mtl')
-rw-r--r-- | extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/property/CppAttributeDeclaration.mtl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/property/CppAttributeDeclaration.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/property/CppAttributeDeclaration.mtl new file mode 100644 index 00000000000..9a22ee68143 --- /dev/null +++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/property/CppAttributeDeclaration.mtl @@ -0,0 +1,21 @@ +[module CppAttributeDeclaration('http://www.eclipse.org/uml2/4.0.0/UML')/] +[import org::eclipse::papyrus::cpp::codegen::utils::GenUtils/] +[import org::eclipse::papyrus::cpp::codegen::utils::Modifier/] +[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppDocumentation/] + + + + +[template public defaultValue(attribute : Property)] +[if (defaultValue <> null) and isStatic] = [attribute.defaultValue.stringValue()/][/if] +[/template] + +[template public staticValue(attribute : Property)] +[if (attribute.isStatic)]static [/if] +[/template] + +[template public CppAttributeDeclaration(attribute : Property)]
+[CppElementDoc()/]
+[staticValue()/][modConst()/][attribute.type.qualifiedName()/][modPtr()/][modRef()/] [attribute.name/][modArray()/][defaultValue()/]; +[/template] + |