Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-10-28 10:26:07 -0400
committerAnsgar Radermacher2013-11-04 08:13:39 -0500
commit61b70f20dcd46e22e93831d517625c61f863301c (patch)
tree9fd2b544bcb1a4bfaa5aaec213a5254e6171b856 /extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz
parent3499d425ccb5ab47baf342a117517b3ff533d884 (diff)
downloadorg.eclipse.papyrus-61b70f20dcd46e22e93831d517625c61f863301c.tar.gz
org.eclipse.papyrus-61b70f20dcd46e22e93831d517625c61f863301c.tar.xz
org.eclipse.papyrus-61b70f20dcd46e22e93831d517625c61f863301c.zip
- [Bug 420376] Generated C++ code is not formatted
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassFriendDeclaration.emtl15
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeClassDeclaration.emtl15
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeDeclaration.emtl10
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassInheritedDeclarations.emtl15
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl221
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.mtl7
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl227
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.mtl8
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.emtl416
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.mtl11
10 files changed, 768 insertions, 177 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassFriendDeclaration.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassFriendDeclaration.emtl
index 27efaf43084..66d52bdae88 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassFriendDeclaration.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassFriendDeclaration.emtl
@@ -210,11 +210,26 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OpaqueBehavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PrimitiveType_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//PrimitiveType"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VisibilityKind_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeClassDeclaration.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeClassDeclaration.emtl
index a76899974b6..182fe336b92 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeClassDeclaration.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeClassDeclaration.emtl
@@ -483,11 +483,26 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OpaqueBehavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PrimitiveType_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//PrimitiveType"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VisibilityKind_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeDeclaration.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeDeclaration.emtl
index 955bf835784..24d14dd0bdb 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeDeclaration.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassIncludeDeclaration.emtl
@@ -368,6 +368,16 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OpaqueBehavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassInheritedDeclarations.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassInheritedDeclarations.emtl
index ceb8ba59ce9..08f2e3c32d2 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassInheritedDeclarations.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassInheritedDeclarations.emtl
@@ -343,11 +343,26 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OpaqueBehavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PrimitiveType_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//PrimitiveType"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VisibilityKind_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl
index d5881c6a4cc..050bd67f409 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl
@@ -42,6 +42,63 @@
</iterator>
</iterSet>
</body>
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="mtl:IfBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;&#x9;// opaque behavior without specification (typically from state machine)&#xA;&#x9;"/>
+ <body xsi:type="mtl:TemplateInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="../operation/CppOperations.emtl#/0/CppBehaviorDeclaration"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/16">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;"/>
+ <ifExpr xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioralFeature"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="b" referredVariable="/0/CppClassOperationsDeclaration/%.1/b">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior/specification"/>
+ </source>
+ <argument xsi:type="ocl.ecore:NullLiteralExp">
+ <eType xsi:type="ocl.ecore:VoidType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclVoid"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/="/>
+ </ifExpr>
+ </body>
+ <loopVariable name="b">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </loopVariable>
+ <iterSet xsi:type="ocl.ecore:IteratorExp" name="select" eType="/6/Sequence(OpaqueBehavior)">
+ <source xsi:type="ocl.ecore:OperationCallExp" eType="/6/Sequence(OpaqueBehavior)" referredOperation="/1/EObject_Class/eAllContents">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/13">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </source>
+ <argument xsi:type="ocl.ecore:TypeExp" eType="/12/OpaqueBehavior">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </argument>
+ </source>
+ <body xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppClassOperationsDeclaration/%.1/select/temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </source>
+ <referredProperty xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </source>
+ <argument xsi:type="ocl.ecore:VariableExp" name="visibilityFilter" referredVariable="/0/CppClassOperationsDeclaration/visibilityFilter">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/="/>
+ </body>
+ <iterator xsi:type="ocl.ecore:Variable" name="temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </iterator>
+ </iterSet>
+ </body>
<parameter name="class">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
</parameter>
@@ -70,6 +127,13 @@
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eAnnotations>
+ <eOperations name="eAllContents">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/acceleo/mtl/3.0/mtlnonstdlib.ecore#//Sequence(OclAny)"/>
+ <eParameters name="filter">
+ <eType xsi:type="ocl.ecore:TypeType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclType"/>
+ </eParameters>
+ </eOperations>
<eOperations name="CppClassOperationsDeclaration">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -95,6 +159,18 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorDeclaration">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL">
+ <references href="../operation/CppOperations.emtl#/0/CppBehaviorDeclaration"/>
+ </eAnnotations>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eParameters>
+ </eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OclAny_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
@@ -126,11 +202,21 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Element_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OpaqueBehavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
@@ -148,6 +234,12 @@
<eClassifiers xsi:type="ocl.ecore:SetType" name="Set(Operation)" instanceClassName="java.util.Set">
<elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SequenceType" name="Sequence(OclAny)" instanceClassName="java.util.List">
+ <elementType xsi:type="ocl.ecore:AnyType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SequenceType" name="Sequence(OpaqueBehavior)" instanceClassName="java.util.List">
+ <elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
@@ -164,13 +256,36 @@
<ocl.ecore:Variable name="i">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
</ocl.ecore:Variable>
+ <ecore:EPackage name="types">
+ <eClassifiers xsi:type="ocl.ecore:TypeType" name="OpaqueBehavior">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</ocl.ecore:Variable>
<ecore:EAnnotation source="positions">
<eAnnotations source="positions.0" references="/0/CppClassOperationsDeclaration">
<details key="start" value="170"/>
- <details key="end" value="386"/>
+ <details key="end" value="625"/>
<details key="line" value="5"/>
</eAnnotations>
<eAnnotations source="positions.1" references="/0/CppClassOperationsDeclaration/%">
@@ -238,12 +353,112 @@
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.14" references="/0/CppClassOperationsDeclaration/class">
+ <eAnnotations source="positions.14" references="/0/CppClassOperationsDeclaration/%.1">
+ <details key="start" value="375"/>
+ <details key="end" value="613"/>
+ <details key="line" value="10"/>
+ </eAnnotations>
+ <eAnnotations source="positions.15" references="/0/CppClassOperationsDeclaration/%.1/%">
+ <details key="start" value="467"/>
+ <details key="end" value="606"/>
+ <details key="line" value="11"/>
+ </eAnnotations>
+ <eAnnotations source="positions.16" references="/0/CppClassOperationsDeclaration/%.1/%/%">
+ <details key="start" value="497"/>
+ <details key="end" value="572"/>
+ <details key="line" value="12"/>
+ </eAnnotations>
+ <eAnnotations source="positions.17" references="/0/CppClassOperationsDeclaration/%.1/%/%.1">
+ <details key="start" value="573"/>
+ <details key="end" value="597"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.18" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.19" references="/0/CppClassOperationsDeclaration/%.1/%/%.2">
+ <details key="start" value="599"/>
+ <details key="end" value="600"/>
+ <details key="line" value="15"/>
+ </eAnnotations>
+ <eAnnotations source="positions.20" references="/0/CppClassOperationsDeclaration/%.1/%/%.3">
+ <details key="start" value="471"/>
+ <details key="end" value="495"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.21" references="/0/CppClassOperationsDeclaration/%.1/%/%.3/%">
+ <details key="start" value="472"/>
+ <details key="end" value="487"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.22" references="/0/CppClassOperationsDeclaration/%.1/%/%.3/%/b">
+ <details key="start" value="472"/>
+ <details key="end" value="473"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.23" references="/0/CppClassOperationsDeclaration/%.1/%/%.3/%.1">
+ <details key="start" value="490"/>
+ <details key="end" value="494"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.24" references="/0/CppClassOperationsDeclaration/%.1/b">
+ <details key="start" value="381"/>
+ <details key="end" value="393"/>
+ <details key="line" value="10"/>
+ </eAnnotations>
+ <eAnnotations source="positions.25" references="/0/CppClassOperationsDeclaration/%.1/select">
+ <details key="start" value="396"/>
+ <details key="end" value="463"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.26" references="/0/CppClassOperationsDeclaration/%.1/select/%">
+ <details key="start" value="396"/>
+ <details key="end" value="424"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.27" references="/0/CppClassOperationsDeclaration/%.1/select/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.28" references="/0/CppClassOperationsDeclaration/%.1/select/%/%">
+ <details key="start" value="409"/>
+ <details key="end" value="423"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.29" references="/0/CppClassOperationsDeclaration/%.1/select/%.1">
+ <details key="start" value="433"/>
+ <details key="end" value="462"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.30" references="/0/CppClassOperationsDeclaration/%.1/select/%.1/%">
+ <details key="start" value="433"/>
+ <details key="end" value="443"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.31" references="/0/CppClassOperationsDeclaration/%.1/select/%.1/%/temp1">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.32" references="/0/CppClassOperationsDeclaration/%.1/select/%.1/visibilityFilter">
+ <details key="start" value="446"/>
+ <details key="end" value="462"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.33" references="/0/CppClassOperationsDeclaration/%.1/select/temp2">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.34" references="/0/CppClassOperationsDeclaration/class">
<details key="start" value="217"/>
<details key="end" value="235"/>
<details key="line" value="5"/>
</eAnnotations>
- <eAnnotations source="positions.15" references="/0/CppClassOperationsDeclaration/visibilityFilter">
+ <eAnnotations source="positions.35" references="/0/CppClassOperationsDeclaration/visibilityFilter">
<details key="start" value="237"/>
<details key="end" value="270"/>
<details key="line" value="5"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.mtl
index bc129027d9f..a73127c132a 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.mtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.mtl
@@ -7,4 +7,11 @@
[CppOperationDeclaration()/]
[/for]
+[for (b : Behavior | eAllContents(OpaqueBehavior)->select(visibility = visibilityFilter))]
+ [if (b.specification = null)]
+
+ // opaque behavior without specification (typically from state machine)
+ [CppBehaviorDeclaration()/]
+ [/if]
+[/for]
[/template]
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl
index 28113103aec..ce3c9c9a852 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl
@@ -81,6 +81,66 @@
</iterator>
</iterSet>
</body>
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="mtl:IfBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;// opaque behavior without specification (typically from state machine)&#xA;"/>
+ <body xsi:type="mtl:TemplateInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="../operation/CppOperations.emtl#/0/CppBehaviorImplementation"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/16">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;"/>
+ <ifExpr xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioralFeature"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="b" referredVariable="/0/CppClassOperationsImplementation/%.1/b">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior/specification"/>
+ </source>
+ <argument xsi:type="ocl.ecore:NullLiteralExp">
+ <eType xsi:type="ocl.ecore:VoidType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclVoid"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/="/>
+ </ifExpr>
+ </body>
+ <loopVariable name="b">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </loopVariable>
+ <iterSet xsi:type="ocl.ecore:IteratorExp" name="select" eType="/6/Sequence(OpaqueBehavior)">
+ <source xsi:type="ocl.ecore:OperationCallExp" eType="/6/Sequence(OpaqueBehavior)" referredOperation="/1/EObject_Class/eAllContents">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/13">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </source>
+ <argument xsi:type="ocl.ecore:TypeExp" eType="/7/OpaqueBehavior">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </argument>
+ </source>
+ <body xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="mtl:QueryInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/hasStereotype.1"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppClassOperationsImplementation/%.1/select/temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:TypeExp" eType="/7/Inline">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/papyrus/C_Cpp/1#//Inline"/>
+ </argument>
+ </source>
+ <argument xsi:type="ocl.ecore:VariableExp" name="inline" referredVariable="/0/CppClassOperationsImplementation/inline">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean_Class/="/>
+ </body>
+ <iterator xsi:type="ocl.ecore:Variable" name="temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </iterator>
+ </iterSet>
+ </body>
<parameter name="class">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
</parameter>
@@ -109,6 +169,13 @@
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eAnnotations>
+ <eOperations name="eAllContents">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/acceleo/mtl/3.0/mtlnonstdlib.ecore#//Sequence(OclAny)"/>
+ <eParameters name="filter">
+ <eType xsi:type="ocl.ecore:TypeType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclType"/>
+ </eParameters>
+ </eOperations>
<eOperations name="CppClassOperationsImplementation">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -149,6 +216,18 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorImplementation">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL">
+ <references href="../operation/CppOperations.emtl#/0/CppBehaviorImplementation"/>
+ </eAnnotations>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eParameters>
+ </eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OclAny_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
@@ -205,6 +284,16 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OpaqueBehavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
@@ -222,6 +311,12 @@
<eClassifiers xsi:type="ocl.ecore:SetType" name="Set(Operation)" instanceClassName="java.util.Set">
<elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SequenceType" name="Sequence(OclAny)" instanceClassName="java.util.List">
+ <elementType xsi:type="ocl.ecore:AnyType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SequenceType" name="Sequence(OpaqueBehavior)" instanceClassName="java.util.List">
+ <elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eClassifiers>
</ecore:EPackage>
<ecore:EPackage name="types">
<eClassifiers xsi:type="ocl.ecore:TypeType" name="NoCodeGen">
@@ -230,6 +325,9 @@
<eClassifiers xsi:type="ocl.ecore:TypeType" name="Inline">
<referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/papyrus/C_Cpp/1#//Inline"/>
</eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:TypeType" name="OpaqueBehavior">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
@@ -247,6 +345,24 @@
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
</ocl.ecore:Variable>
<ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</ocl.ecore:Variable>
<ecore:EAnnotation source="positions">
@@ -257,7 +373,7 @@
</eAnnotations>
<eAnnotations source="positions.1" references="/0/CppClassOperationsImplementation">
<details key="start" value="396"/>
- <details key="end" value="665"/>
+ <details key="end" value="924"/>
<details key="line" value="8"/>
</eAnnotations>
<eAnnotations source="positions.2" references="/0/CppClassOperationsImplementation/%">
@@ -370,12 +486,117 @@
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.24" references="/0/CppClassOperationsImplementation/class">
+ <eAnnotations source="positions.24" references="/0/CppClassOperationsImplementation/%.1">
+ <details key="start" value="654"/>
+ <details key="end" value="912"/>
+ <details key="line" value="15"/>
+ </eAnnotations>
+ <eAnnotations source="positions.25" references="/0/CppClassOperationsImplementation/%.1/%">
+ <details key="start" value="765"/>
+ <details key="end" value="905"/>
+ <details key="line" value="17"/>
+ </eAnnotations>
+ <eAnnotations source="positions.26" references="/0/CppClassOperationsImplementation/%.1/%/%">
+ <details key="start" value="795"/>
+ <details key="end" value="868"/>
+ <details key="line" value="18"/>
+ </eAnnotations>
+ <eAnnotations source="positions.27" references="/0/CppClassOperationsImplementation/%.1/%/%.1">
+ <details key="start" value="869"/>
+ <details key="end" value="896"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.28" references="/0/CppClassOperationsImplementation/%.1/%/%.1/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.29" references="/0/CppClassOperationsImplementation/%.1/%/%.2">
+ <details key="start" value="898"/>
+ <details key="end" value="899"/>
+ <details key="line" value="21"/>
+ </eAnnotations>
+ <eAnnotations source="positions.30" references="/0/CppClassOperationsImplementation/%.1/%/%.3">
+ <details key="start" value="769"/>
+ <details key="end" value="793"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.31" references="/0/CppClassOperationsImplementation/%.1/%/%.3/%">
+ <details key="start" value="770"/>
+ <details key="end" value="785"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.32" references="/0/CppClassOperationsImplementation/%.1/%/%.3/%/b">
+ <details key="start" value="770"/>
+ <details key="end" value="771"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.33" references="/0/CppClassOperationsImplementation/%.1/%/%.3/%.1">
+ <details key="start" value="788"/>
+ <details key="end" value="792"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.34" references="/0/CppClassOperationsImplementation/%.1/b">
+ <details key="start" value="660"/>
+ <details key="end" value="678"/>
+ <details key="line" value="15"/>
+ </eAnnotations>
+ <eAnnotations source="positions.35" references="/0/CppClassOperationsImplementation/%.1/select">
+ <details key="start" value="681"/>
+ <details key="end" value="761"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.36" references="/0/CppClassOperationsImplementation/%.1/select/%">
+ <details key="start" value="681"/>
+ <details key="end" value="709"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.37" references="/0/CppClassOperationsImplementation/%.1/select/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.38" references="/0/CppClassOperationsImplementation/%.1/select/%/%">
+ <details key="start" value="694"/>
+ <details key="end" value="708"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.39" references="/0/CppClassOperationsImplementation/%.1/select/%.1">
+ <details key="start" value="721"/>
+ <details key="end" value="760"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.40" references="/0/CppClassOperationsImplementation/%.1/select/%.1/%">
+ <details key="start" value="722"/>
+ <details key="end" value="750"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.41" references="/0/CppClassOperationsImplementation/%.1/select/%.1/%/temp1">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.42" references="/0/CppClassOperationsImplementation/%.1/select/%.1/%/%">
+ <details key="start" value="736"/>
+ <details key="end" value="749"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.43" references="/0/CppClassOperationsImplementation/%.1/select/%.1/inline">
+ <details key="start" value="753"/>
+ <details key="end" value="759"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.44" references="/0/CppClassOperationsImplementation/%.1/select/temp2">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.45" references="/0/CppClassOperationsImplementation/class">
<details key="start" value="446"/>
<details key="end" value="464"/>
<details key="line" value="8"/>
</eAnnotations>
- <eAnnotations source="positions.25" references="/0/CppClassOperationsImplementation/inline">
+ <eAnnotations source="positions.46" references="/0/CppClassOperationsImplementation/inline">
<details key="start" value="466"/>
<details key="end" value="482"/>
<details key="line" value="8"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.mtl
index 1f67d8afc62..fc54cddb7de 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.mtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.mtl
@@ -12,4 +12,12 @@
[CppOperationImplementation()/]
[/for]
+[for (b : OpaqueBehavior | eAllContents(OpaqueBehavior)->select(
+ (hasStereotype(C_Cpp::Inline) = inline)))]
+ [if (b.specification = null)]
+
+// opaque behavior without specification (typically from state machine)
+[CppBehaviorImplementation()/]
+ [/if]
+[/for]
[/template]
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.emtl
index 1358ce3dc3e..87f12d18900 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.emtl
@@ -8,6 +8,10 @@
<takesTypesFrom href="http://www.eclipse.org/papyrus/C_Cpp/1#/"/>
</input>
<imports href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0"/>
+<<<<<<< HEAD
+=======
+ <imports href="platform:/plugin/utils/CppGenUtils.emtl#/0"/>
+>>>>>>> - [Bug 420376] Generated C++ code is not formatted
<imports href="../CppPrimitiveTypes.emtl#/0"/>
<imports href="../CppEnumerations.emtl#/0"/>
<ownedModuleElement xsi:type="mtl:Template" name="TypeAndEnumForVisibility" visibility="Public">
@@ -153,38 +157,62 @@
</parameter>
</ownedModuleElement>
<ownedModuleElement xsi:type="mtl:Template" name="CppClassTypeAndEnum" visibility="Public">
- <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" public:&#xA;&#x9;"/>
- <body xsi:type="mtl:TemplateInvocation" definition="/0/TypesAndEnumsForVisibility">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" "/>
+ <body xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/26">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
- </argument>
+ <definition href="platform:/plugin/utils/CppGenUtils.emtl#/0/getSection"/>
<argument xsi:type="ocl.ecore:EnumLiteralExp">
<eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
<referredEnumLiteral xsi:type="ecore:EEnumLiteral" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind/public"/>
</argument>
+ <argument xsi:type="mtl:TemplateInvocation" definition="/0/TypesAndEnumsForVisibility">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/26">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:EnumLiteralExp">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ <referredEnumLiteral xsi:type="ecore:EEnumLiteral" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind/public"/>
+ </argument>
+ </argument>
</body>
- <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA; protected:&#xA;&#x9;"/>
- <body xsi:type="mtl:TemplateInvocation" definition="/0/TypesAndEnumsForVisibility">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA; "/>
+ <body xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/27">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
- </argument>
+ <definition href="platform:/plugin/utils/CppGenUtils.emtl#/0/getSection"/>
<argument xsi:type="ocl.ecore:EnumLiteralExp">
<eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
<referredEnumLiteral xsi:type="ecore:EEnumLiteral" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind/protected"/>
</argument>
+ <argument xsi:type="mtl:TemplateInvocation" definition="/0/TypesAndEnumsForVisibility">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/27">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:EnumLiteralExp">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ <referredEnumLiteral xsi:type="ecore:EEnumLiteral" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind/protected"/>
+ </argument>
+ </argument>
</body>
- <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA; private:&#xA;&#x9;"/>
- <body xsi:type="mtl:TemplateInvocation" definition="/0/TypesAndEnumsForVisibility">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA; "/>
+ <body xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/28">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
- </argument>
+ <definition href="platform:/plugin/utils/CppGenUtils.emtl#/0/getSection"/>
<argument xsi:type="ocl.ecore:EnumLiteralExp">
<eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
<referredEnumLiteral xsi:type="ecore:EEnumLiteral" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind/private"/>
</argument>
+ <argument xsi:type="mtl:TemplateInvocation" definition="/0/TypesAndEnumsForVisibility">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/28">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:EnumLiteralExp">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ <referredEnumLiteral xsi:type="ecore:EEnumLiteral" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind/private"/>
+ </argument>
+ </argument>
</body>
<parameter name="class">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
@@ -298,6 +326,21 @@
<eType xsi:type="ocl.ecore:AnyType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
</eParameters>
</eOperations>
+ <eOperations name="getSection">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL">
+ <references href="platform:/plugin/utils/CppGenUtils.emtl#/0/getSection"/>
+ </eAnnotations>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="arg0">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ </eParameters>
+ <eParameters name="arg1">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </eParameters>
+ </eOperations>
<eOperations name="CppPrimitiveTypeDefinition">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -383,11 +426,26 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OpaqueBehavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PrimitiveType_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//PrimitiveType"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VisibilityKind_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//VisibilityKind"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Enumeration_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Enumeration"/>
@@ -511,28 +569,28 @@
</ocl.ecore:Variable>
<ecore:EAnnotation source="positions">
<eAnnotations source="positions.0" references="/0/TypeAndEnumForVisibility">
- <details key="start" value="323"/>
- <details key="end" value="745"/>
- <details key="line" value="6"/>
+ <details key="start" value="389"/>
+ <details key="end" value="811"/>
+ <details key="line" value="7"/>
</eAnnotations>
<eAnnotations source="positions.1" references="/0/TypeAndEnumForVisibility/%">
- <details key="start" value="420"/>
- <details key="end" value="733"/>
- <details key="line" value="7"/>
+ <details key="start" value="486"/>
+ <details key="end" value="799"/>
+ <details key="line" value="8"/>
</eAnnotations>
<eAnnotations source="positions.2" references="/0/TypeAndEnumForVisibility/%/%">
- <details key="start" value="540"/>
- <details key="end" value="630"/>
- <details key="line" value="8"/>
+ <details key="start" value="606"/>
+ <details key="end" value="696"/>
+ <details key="line" value="9"/>
</eAnnotations>
<eAnnotations source="positions.3" references="/0/TypeAndEnumForVisibility/%/%/%">
- <details key="start" value="574"/>
- <details key="end" value="623"/>
+ <details key="start" value="640"/>
+ <details key="end" value="689"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.4" references="/0/TypeAndEnumForVisibility/%/%/%/%">
- <details key="start" value="574"/>
- <details key="end" value="596"/>
+ <details key="start" value="640"/>
+ <details key="end" value="662"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.5" references="/0/TypeAndEnumForVisibility/%/%/%/%/self">
@@ -541,13 +599,13 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.6" references="/0/TypeAndEnumForVisibility/%/%/%/%/%">
- <details key="start" value="584"/>
- <details key="end" value="595"/>
+ <details key="start" value="650"/>
+ <details key="end" value="661"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.7" references="/0/TypeAndEnumForVisibility/%/%/%.1">
- <details key="start" value="546"/>
- <details key="end" value="572"/>
+ <details key="start" value="612"/>
+ <details key="end" value="638"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.8" references="/0/TypeAndEnumForVisibility/%/%/%.1/self">
@@ -556,28 +614,28 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.9" references="/0/TypeAndEnumForVisibility/%/%/%.1/%">
- <details key="start" value="559"/>
- <details key="end" value="570"/>
+ <details key="start" value="625"/>
+ <details key="end" value="636"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.10" references="/0/TypeAndEnumForVisibility/%/%.1">
- <details key="start" value="630"/>
- <details key="end" value="631"/>
- <details key="line" value="9"/>
+ <details key="start" value="696"/>
+ <details key="end" value="697"/>
+ <details key="line" value="10"/>
</eAnnotations>
<eAnnotations source="positions.11" references="/0/TypeAndEnumForVisibility/%/%.2">
- <details key="start" value="631"/>
- <details key="end" value="727"/>
- <details key="line" value="9"/>
+ <details key="start" value="697"/>
+ <details key="end" value="793"/>
+ <details key="line" value="10"/>
</eAnnotations>
<eAnnotations source="positions.12" references="/0/TypeAndEnumForVisibility/%/%.2/%">
- <details key="start" value="667"/>
- <details key="end" value="720"/>
+ <details key="start" value="733"/>
+ <details key="end" value="786"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.13" references="/0/TypeAndEnumForVisibility/%/%.2/%/%">
- <details key="start" value="667"/>
- <details key="end" value="691"/>
+ <details key="start" value="733"/>
+ <details key="end" value="757"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.14" references="/0/TypeAndEnumForVisibility/%/%.2/%/%/self">
@@ -586,13 +644,13 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.15" references="/0/TypeAndEnumForVisibility/%/%.2/%/%/%">
- <details key="start" value="677"/>
- <details key="end" value="690"/>
+ <details key="start" value="743"/>
+ <details key="end" value="756"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.16" references="/0/TypeAndEnumForVisibility/%/%.2/%.1">
- <details key="start" value="637"/>
- <details key="end" value="665"/>
+ <details key="start" value="703"/>
+ <details key="end" value="731"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.17" references="/0/TypeAndEnumForVisibility/%/%.2/%.1/self">
@@ -601,33 +659,33 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.18" references="/0/TypeAndEnumForVisibility/%/%.2/%.1/%">
- <details key="start" value="650"/>
- <details key="end" value="663"/>
+ <details key="start" value="716"/>
+ <details key="end" value="729"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.19" references="/0/TypeAndEnumForVisibility/%/%.3">
- <details key="start" value="727"/>
- <details key="end" value="728"/>
- <details key="line" value="10"/>
+ <details key="start" value="793"/>
+ <details key="end" value="794"/>
+ <details key="line" value="11"/>
</eAnnotations>
<eAnnotations source="positions.20" references="/0/TypeAndEnumForVisibility/%/%.4">
- <details key="start" value="424"/>
- <details key="end" value="538"/>
+ <details key="start" value="490"/>
+ <details key="end" value="604"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.21" references="/0/TypeAndEnumForVisibility/%/%.4/%">
- <details key="start" value="425"/>
- <details key="end" value="481"/>
+ <details key="start" value="491"/>
+ <details key="end" value="547"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.22" references="/0/TypeAndEnumForVisibility/%/%.4/%/%">
- <details key="start" value="425"/>
- <details key="end" value="453"/>
+ <details key="start" value="491"/>
+ <details key="end" value="519"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.23" references="/0/TypeAndEnumForVisibility/%/%.4/%/%/%">
- <details key="start" value="429"/>
- <details key="end" value="453"/>
+ <details key="start" value="495"/>
+ <details key="end" value="519"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.24" references="/0/TypeAndEnumForVisibility/%/%.4/%/%/%/self">
@@ -636,13 +694,13 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.25" references="/0/TypeAndEnumForVisibility/%/%.4/%/%/%/%">
- <details key="start" value="443"/>
- <details key="end" value="452"/>
+ <details key="start" value="509"/>
+ <details key="end" value="518"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.26" references="/0/TypeAndEnumForVisibility/%/%.4/%/%.1">
- <details key="start" value="458"/>
- <details key="end" value="481"/>
+ <details key="start" value="524"/>
+ <details key="end" value="547"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.27" references="/0/TypeAndEnumForVisibility/%/%.4/%/%.1/self">
@@ -651,23 +709,23 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.28" references="/0/TypeAndEnumForVisibility/%/%.4/%/%.1/%">
- <details key="start" value="470"/>
- <details key="end" value="480"/>
+ <details key="start" value="536"/>
+ <details key="end" value="546"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.29" references="/0/TypeAndEnumForVisibility/%/%.4/%.1">
- <details key="start" value="486"/>
- <details key="end" value="537"/>
+ <details key="start" value="552"/>
+ <details key="end" value="603"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.30" references="/0/TypeAndEnumForVisibility/%/%.4/%.1/%">
- <details key="start" value="486"/>
- <details key="end" value="518"/>
+ <details key="start" value="552"/>
+ <details key="end" value="584"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.31" references="/0/TypeAndEnumForVisibility/%/%.4/%.1/%/%">
- <details key="start" value="486"/>
- <details key="end" value="507"/>
+ <details key="start" value="552"/>
+ <details key="end" value="573"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.32" references="/0/TypeAndEnumForVisibility/%/%.4/%.1/%/%/self">
@@ -676,38 +734,38 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.33" references="/0/TypeAndEnumForVisibility/%/%.4/%.1/%/%/%">
- <details key="start" value="496"/>
- <details key="end" value="506"/>
+ <details key="start" value="562"/>
+ <details key="end" value="572"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.34" references="/0/TypeAndEnumForVisibility/%/%.4/%.1/visibilityFilter">
- <details key="start" value="521"/>
- <details key="end" value="537"/>
+ <details key="start" value="587"/>
+ <details key="end" value="603"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.35" references="/0/TypeAndEnumForVisibility/element">
- <details key="start" value="365"/>
- <details key="end" value="382"/>
- <details key="line" value="6"/>
+ <details key="start" value="431"/>
+ <details key="end" value="448"/>
+ <details key="line" value="7"/>
</eAnnotations>
<eAnnotations source="positions.36" references="/0/TypeAndEnumForVisibility/visibilityFilter">
- <details key="start" value="384"/>
- <details key="end" value="417"/>
- <details key="line" value="6"/>
+ <details key="start" value="450"/>
+ <details key="end" value="483"/>
+ <details key="line" value="7"/>
</eAnnotations>
<eAnnotations source="positions.37" references="/0/TypesAndEnumsForVisibility">
- <details key="start" value="747"/>
- <details key="end" value="926"/>
- <details key="line" value="13"/>
+ <details key="start" value="813"/>
+ <details key="end" value="992"/>
+ <details key="line" value="14"/>
</eAnnotations>
<eAnnotations source="positions.38" references="/0/TypesAndEnumsForVisibility/%">
- <details key="start" value="843"/>
- <details key="end" value="914"/>
- <details key="line" value="14"/>
+ <details key="start" value="909"/>
+ <details key="end" value="980"/>
+ <details key="line" value="15"/>
</eAnnotations>
<eAnnotations source="positions.39" references="/0/TypesAndEnumsForVisibility/%/%">
- <details key="start" value="864"/>
- <details key="end" value="906"/>
+ <details key="start" value="930"/>
+ <details key="end" value="972"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.40" references="/0/TypesAndEnumsForVisibility/%/%/self">
@@ -716,13 +774,13 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.41" references="/0/TypesAndEnumsForVisibility/%/%/visibilityFilter">
- <details key="start" value="889"/>
- <details key="end" value="905"/>
+ <details key="start" value="955"/>
+ <details key="end" value="971"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.42" references="/0/TypesAndEnumsForVisibility/%/%.1">
- <details key="start" value="849"/>
- <details key="end" value="861"/>
+ <details key="start" value="915"/>
+ <details key="end" value="927"/>
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.43" references="/0/TypesAndEnumsForVisibility/%/%.1/self">
@@ -731,129 +789,159 @@
<details key="line" value="0"/>
</eAnnotations>
<eAnnotations source="positions.44" references="/0/TypesAndEnumsForVisibility/ne">
- <details key="start" value="791"/>
- <details key="end" value="805"/>
- <details key="line" value="13"/>
+ <details key="start" value="857"/>
+ <details key="end" value="871"/>
+ <details key="line" value="14"/>
</eAnnotations>
<eAnnotations source="positions.45" references="/0/TypesAndEnumsForVisibility/visibilityFilter">
- <details key="start" value="807"/>
- <details key="end" value="840"/>
- <details key="line" value="13"/>
+ <details key="start" value="873"/>
+ <details key="end" value="906"/>
+ <details key="line" value="14"/>
</eAnnotations>
<eAnnotations source="positions.46" references="/0/CppClassTypeAndEnum">
- <details key="start" value="928"/>
- <details key="end" value="1200"/>
- <details key="line" value="17"/>
+ <details key="start" value="994"/>
+ <details key="end" value="1350"/>
+ <details key="line" value="18"/>
</eAnnotations>
<eAnnotations source="positions.47" references="/0/CppClassTypeAndEnum/%">
- <details key="start" value="986"/>
- <details key="end" value="997"/>
- <details key="line" value="18"/>
+ <details key="start" value="1052"/>
+ <details key="end" value="1056"/>
+ <details key="line" value="19"/>
</eAnnotations>
<eAnnotations source="positions.48" references="/0/CppClassTypeAndEnum/%.1">
- <details key="start" value="998"/>
- <details key="end" value="1048"/>
+ <details key="start" value="1057"/>
+ <details key="end" value="1142"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.49" references="/0/CppClassTypeAndEnum/%.1/%">
+ <details key="start" value="1057"/>
+ <details key="end" value="1079"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.49" references="/0/CppClassTypeAndEnum/%.1/self">
+ <eAnnotations source="positions.50" references="/0/CppClassTypeAndEnum/%.1/%.1">
+ <details key="start" value="1091"/>
+ <details key="end" value="1141"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.51" references="/0/CppClassTypeAndEnum/%.1/%.1/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.50" references="/0/CppClassTypeAndEnum/%.1/%">
- <details key="start" value="1025"/>
- <details key="end" value="1047"/>
+ <eAnnotations source="positions.52" references="/0/CppClassTypeAndEnum/%.1/%.1/%">
+ <details key="start" value="1118"/>
+ <details key="end" value="1140"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.51" references="/0/CppClassTypeAndEnum/%.2">
- <details key="start" value="1050"/>
- <details key="end" value="1065"/>
+ <eAnnotations source="positions.53" references="/0/CppClassTypeAndEnum/%.2">
+ <details key="start" value="1144"/>
+ <details key="end" value="1149"/>
<details key="line" value="20"/>
</eAnnotations>
- <eAnnotations source="positions.52" references="/0/CppClassTypeAndEnum/%.3">
- <details key="start" value="1066"/>
- <details key="end" value="1119"/>
+ <eAnnotations source="positions.54" references="/0/CppClassTypeAndEnum/%.3">
+ <details key="start" value="1150"/>
+ <details key="end" value="1241"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.55" references="/0/CppClassTypeAndEnum/%.3/%">
+ <details key="start" value="1150"/>
+ <details key="end" value="1175"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.56" references="/0/CppClassTypeAndEnum/%.3/%.1">
+ <details key="start" value="1187"/>
+ <details key="end" value="1240"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.53" references="/0/CppClassTypeAndEnum/%.3/self">
+ <eAnnotations source="positions.57" references="/0/CppClassTypeAndEnum/%.3/%.1/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.54" references="/0/CppClassTypeAndEnum/%.3/%">
- <details key="start" value="1093"/>
- <details key="end" value="1118"/>
+ <eAnnotations source="positions.58" references="/0/CppClassTypeAndEnum/%.3/%.1/%">
+ <details key="start" value="1214"/>
+ <details key="end" value="1239"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.55" references="/0/CppClassTypeAndEnum/%.4">
- <details key="start" value="1121"/>
- <details key="end" value="1134"/>
- <details key="line" value="22"/>
+ <eAnnotations source="positions.59" references="/0/CppClassTypeAndEnum/%.4">
+ <details key="start" value="1243"/>
+ <details key="end" value="1248"/>
+ <details key="line" value="21"/>
</eAnnotations>
- <eAnnotations source="positions.56" references="/0/CppClassTypeAndEnum/%.5">
- <details key="start" value="1135"/>
- <details key="end" value="1186"/>
+ <eAnnotations source="positions.60" references="/0/CppClassTypeAndEnum/%.5">
+ <details key="start" value="1249"/>
+ <details key="end" value="1336"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.57" references="/0/CppClassTypeAndEnum/%.5/self">
+ <eAnnotations source="positions.61" references="/0/CppClassTypeAndEnum/%.5/%">
+ <details key="start" value="1249"/>
+ <details key="end" value="1272"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.62" references="/0/CppClassTypeAndEnum/%.5/%.1">
+ <details key="start" value="1284"/>
+ <details key="end" value="1335"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.63" references="/0/CppClassTypeAndEnum/%.5/%.1/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.58" references="/0/CppClassTypeAndEnum/%.5/%">
- <details key="start" value="1162"/>
- <details key="end" value="1185"/>
+ <eAnnotations source="positions.64" references="/0/CppClassTypeAndEnum/%.5/%.1/%">
+ <details key="start" value="1311"/>
+ <details key="end" value="1334"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.59" references="/0/CppClassTypeAndEnum/class">
- <details key="start" value="965"/>
- <details key="end" value="983"/>
- <details key="line" value="17"/>
+ <eAnnotations source="positions.65" references="/0/CppClassTypeAndEnum/class">
+ <details key="start" value="1031"/>
+ <details key="end" value="1049"/>
+ <details key="line" value="18"/>
</eAnnotations>
- <eAnnotations source="positions.60" references="/0/CppClassTypeAndEnumPackage">
- <details key="start" value="1203"/>
- <details key="end" value="1384"/>
- <details key="line" value="27"/>
+ <eAnnotations source="positions.66" references="/0/CppClassTypeAndEnumPackage">
+ <details key="start" value="1352"/>
+ <details key="end" value="1533"/>
+ <details key="line" value="24"/>
</eAnnotations>
- <eAnnotations source="positions.61" references="/0/CppClassTypeAndEnumPackage/%">
- <details key="start" value="1264"/>
- <details key="end" value="1316"/>
+ <eAnnotations source="positions.67" references="/0/CppClassTypeAndEnumPackage/%">
+ <details key="start" value="1413"/>
+ <details key="end" value="1465"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.62" references="/0/CppClassTypeAndEnumPackage/%/self">
+ <eAnnotations source="positions.68" references="/0/CppClassTypeAndEnumPackage/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.63" references="/0/CppClassTypeAndEnumPackage/%/%">
- <details key="start" value="1291"/>
- <details key="end" value="1315"/>
+ <eAnnotations source="positions.69" references="/0/CppClassTypeAndEnumPackage/%/%">
+ <details key="start" value="1440"/>
+ <details key="end" value="1464"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.64" references="/0/CppClassTypeAndEnumPackage/%.1">
- <details key="start" value="1318"/>
- <details key="end" value="1319"/>
- <details key="line" value="29"/>
+ <eAnnotations source="positions.70" references="/0/CppClassTypeAndEnumPackage/%.1">
+ <details key="start" value="1467"/>
+ <details key="end" value="1468"/>
+ <details key="line" value="26"/>
</eAnnotations>
- <eAnnotations source="positions.65" references="/0/CppClassTypeAndEnumPackage/%.2">
- <details key="start" value="1320"/>
- <details key="end" value="1370"/>
+ <eAnnotations source="positions.71" references="/0/CppClassTypeAndEnumPackage/%.2">
+ <details key="start" value="1469"/>
+ <details key="end" value="1519"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.66" references="/0/CppClassTypeAndEnumPackage/%.2/self">
+ <eAnnotations source="positions.72" references="/0/CppClassTypeAndEnumPackage/%.2/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.67" references="/0/CppClassTypeAndEnumPackage/%.2/%">
- <details key="start" value="1347"/>
- <details key="end" value="1369"/>
+ <eAnnotations source="positions.73" references="/0/CppClassTypeAndEnumPackage/%.2/%">
+ <details key="start" value="1496"/>
+ <details key="end" value="1518"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.68" references="/0/CppClassTypeAndEnumPackage/pkg">
- <details key="start" value="1247"/>
- <details key="end" value="1260"/>
- <details key="line" value="27"/>
+ <eAnnotations source="positions.74" references="/0/CppClassTypeAndEnumPackage/pkg">
+ <details key="start" value="1396"/>
+ <details key="end" value="1409"/>
+ <details key="line" value="24"/>
</eAnnotations>
</ecore:EAnnotation>
</xmi:XMI>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.mtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.mtl
index 9ba92353d94..f46d6e95933 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.mtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassTypeAndEnum.mtl
@@ -1,5 +1,6 @@
[module CppClassTypeAndEnum('http://www.eclipse.org/uml2/4.0.0/UML', 'http://www.eclipse.org/papyrus/C_Cpp/1')/]
[import org::eclipse::papyrus::acceleo::GenUtils/]
+[import org::eclipse::papyrus::cpp::codegen::utils::CppGenUtils/]
[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppPrimitiveTypes/]
[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppEnumerations/]
@@ -15,15 +16,11 @@
[/template]
[template public CppClassTypeAndEnum(class : Classifier)]
- public:
- [TypesAndEnumsForVisibility(VisibilityKind::public)/]
- protected:
- [TypesAndEnumsForVisibility(VisibilityKind::protected)/]
- private:
- [TypesAndEnumsForVisibility(VisibilityKind::private)/]
+ [VisibilityKind::public.getSection(TypesAndEnumsForVisibility(VisibilityKind::public))/]
+ [VisibilityKind::protected.getSection(TypesAndEnumsForVisibility(VisibilityKind::protected))/]
+ [VisibilityKind::private.getSection(TypesAndEnumsForVisibility(VisibilityKind::private))/]
[/template]
-
[template public CppClassTypeAndEnumPackage(pkg : Package)]
[TypesAndEnumsForVisibility(VisibilityKind::_package)/]
[TypesAndEnumsForVisibility(VisibilityKind::public)/]

Back to the top