Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 65ecd6707e4b6803d27faf8be53e77defa7ac706 (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 CppParameter('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::utils::Modifier/]



[template public defaultValue(parameter : Parameter)]
[if (defaultValue <> null)] = [defaultValue.stringValue()/][/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.cppQualifiedName()/][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