Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: f4ad914778afe9e27f7db737a237eae8dd3b7039 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[module CppClassAttributesDeclaration('http://www.eclipse.org/uml2/4.0.0/UML')/]
[import org::eclipse::papyrus::cpp::codegen::acceleo::util::CppAttribute/]


[query public getOwnedAttributes(cl : Classifier) : Sequence(Property) =
	if (cl.oclIsKindOf(Class)) then
		oclAsType(Class).ownedAttribute
	else
		if (cl.oclIsKindOf(DataType)) then
			oclAsType(DataType).ownedAttribute
		else
			null
		endif
	endif
/]

[template public CppClassAttributesDeclaration(class : Classifier, visibilityFilter : VisibilityKind)]
[for (getOwnedAttributes()->select(visibility = visibilityFilter))]

	[CppAttributeDeclaration()/]
[/for]
[/template]

Back to the top