Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/templates/util/property/CppAttributeDeclaration.util.jet')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/templates/util/property/CppAttributeDeclaration.util.jet78
1 files changed, 0 insertions, 78 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/templates/util/property/CppAttributeDeclaration.util.jet b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/templates/util/property/CppAttributeDeclaration.util.jet
deleted file mode 100644
index 58c5fc97a71..00000000000
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/templates/util/property/CppAttributeDeclaration.util.jet
+++ /dev/null
@@ -1,78 +0,0 @@
-<%@ jet package = "org.eclipse.papyrus.cpp.codegen.jet.util"
- skeleton = "../../generator.skeleton"
- imports = "org.eclipse.uml2.uml.Property org.eclipse.papyrus.cpp.codegen.jet.doc.* Cpp.* org.eclipse.papyrus.cpp.codegen.utils.*"
- class = "CppAttributeDeclaration"
-%>
-<%
-//////////////////////////////////////////////////////////////////////////////////////////
-// Java preparation
-//////////////////////////////////////////////////////////////////////////////////////////
-
- // Retrieve the property
- Property currentAttribute = (Property) argument;
-
- String attributeName = currentAttribute.getName();
- String typeName = "";
- String prefix = "";
- String suffix = "";
- String multiple = "";
-
- // For property documentation
- String propDoc = "";
-
- // Retrieve enum doc
- CppElementDoc jDoc = new CppElementDoc();
- propDoc = jDoc.generate(currentAttribute);
- propDoc = propDoc.replaceAll(NL, NL+" ");
-
- if (currentAttribute.getType() == null) {
- typeName = "undefined";
- } else {
- typeName = GenUtils.qualifiedName (currentAttribute.getType());
- }
-
- // Static attribute
- if (currentAttribute.isStatic()) {
- prefix = "static"+" ";
- }
-
- Modifier modifier = new Modifier(currentAttribute);
-
- // Treat multiplicity for association attributes
- int multiplicity = currentAttribute.getUpper();
- if (multiplicity == 1) {
- multiple = "";
- } else if (multiplicity == -1) {
- multiple = "*";
- } else {
- multiple = "";
- modifier.array = "[" + multiplicity + "]";
- }
-
- // If attribute is aggregation
- if (GenUtils.isAggregation(currentAttribute)) {
- // attributeName = "(*"+attributeName+")"; // this produce a pointer on a tab
- attributeName = "*"+attributeName; // this produce a tab of pointers
- }
-
-
- if (GenUtils.hasStereotype(currentAttribute, CppConst.class) && currentAttribute.isStatic()) {
- // const & static attributes may be initialized within class declaration
- // check if initial value UML or profile
- if (currentAttribute.getDefaultValue() != null) {
- suffix = " = " + currentAttribute.getDefaultValue().stringValue();
- }
- else {
- CppDefault cppDefault = GenUtils.getApplication(currentAttribute, CppDefault.class);
- if (cppDefault != null) {
- suffix = " = " + cppDefault.getValue();
- }
- }
- }
-
-//////////////////////////////////////////////////////////////////////////////////////////
-// The following part contains the template
-//////////////////////////////////////////////////////////////////////////////////////////%>
-
- <%= propDoc %>
- <%= prefix %><%= modifier.isConst %><%= typeName %><%= multiple %><%= modifier.ptr %><%= modifier.ref %> <%= attributeName %><%= modifier.array %><%= suffix %>; \ No newline at end of file

Back to the top