Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: bf013aa089fcb229df6e5103de94174b8b13c0bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[module CppParameter('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/]



[template public defaultValue(parameter : Parameter)]
[if (hasStereotype(C_Cpp::Default))] = [getApplication(C_Cpp::Default).oclAsType(C_Cpp::Default).value/][/if]
[/template]

[comment C++ parameter. Default values are added, if parameter showDefault is true (implementation signature
	may not repeat default value)/]
[template public CppParameter(parameter : Parameter, showDefault : Boolean)]
[modConst()/][parameter.type.qualifiedName()/][modPtr()/][modRef()/] [parameter.name/][modArray()/][if (showDefault)][defaultValue()/][/if]
[/template]


[template public CppOperationParameters(operation : Operation, showDefault : Boolean)]
[for (ownedParameter->select(direction <> ParameterDirectionKind::return)) separator(', ')][CppParameter(showDefault)/][/for]
[/template]

Back to the top