blob: d7c7786cc027f92be7f241d80e790990483f7c82 (
plain) (
tree)
|
|
[module CppTemplates('http://www.eclipse.org/uml2/4.0.0/UML')/]
[import org::eclipse::papyrus::cpp::codegen::utils::GenUtils/]
[query public CppTemplateBindingParameter(tps : TemplateParameterSubstitution) : String =
if (tps.actual.oclIsKindOf(LiteralInteger)) then
tps.actual.oclAsType(LiteralInteger).value
else
tps.actual.oclAsType(NamedElement).name
endif
/]
[query public isTemplate(class : Classifier) : Boolean =
getTemplateParameters()->size() > 0
/]
[template public templateSignature(class : Classifier)]
[if isTemplate()]
template<[for (getTemplateParameters()) separator(', ')][getType()/][/for]>
[/if]
[/template]
[template public templateShortSignature(class : Classifier)]
[if isTemplate()]
<[for (getTemplateParameters()) separator(', ')][getName()/][/for]> [/if]
[/template]
[template public templateSignature(operation : Operation)]
[owner.oclAsType(Classifier).templateSignature()/]
[/template]
[template public templateShortSignature(operation : Operation)]
[owner.oclAsType(Classifier).templateShortSignature()/]
[/template]
|