Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: aabc48325341316a7009b14d429e9ef48b9628fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[module CppClassTypeAndEnum('http://www.eclipse.org/uml2/4.0.0/UML', 'http://www.eclipse.org/papyrus/C_Cpp/1')/]
[import org::eclipse::papyrus::cpp::codegen::utils::GenUtils/]
[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppPrimitiveTypes/]
[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppEnumerations/]

[template public TypeAndEnumForVisibility(element : Element, visibilityFilter : VisibilityKind)]
[if (not hasStereotype(NoCodeGen) and oclIsKindOf(Classifier) and oclAsType(Classifier).visibility = visibilityFilter)]
[  if (oclIsKindOf(Enumeration))][oclAsType(Enumeration).CppEnumerationDefinition()/][/if]
[  if (oclIsKindOf(PrimitiveType))][oclAsType(PrimitiveType).CppPrimitiveTypeDefinition()/][/if]
[/if]
[/template]

[template public TypesAndEnumsForVisibility(ne : Namespace, visibilityFilter : VisibilityKind)]
[for (ownedElement)][TypeAndEnumForVisibility(visibilityFilter)/][/for]
[/template]

[template public CppClassTypeAndEnum(class : Classifier)]
  public:
	[TypesAndEnumsForVisibility(VisibilityKind::public)/]
  protected:
	[TypesAndEnumsForVisibility(VisibilityKind::protected)/]
  private:
	[TypesAndEnumsForVisibility(VisibilityKind::private)/]
[/template]


[template public CppClassTypeAndEnumPackage(pkg : Package)]
[TypesAndEnumsForVisibility(VisibilityKind::_package)/]
[TypesAndEnumsForVisibility(VisibilityKind::public)/]
[/template]

Back to the top