Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » How to make template member function
How to make template member function [message #1776620] Sat, 18 November 2017 16:57 Go to next message
Sekwon Jang is currently offline Sekwon JangFriend
Messages: 10
Registered: November 2017
Junior Member
I need to make template member function given below :

template <typename T>
void testf(T data) {


I found template parameter option in Advanced Tab in properties of operation and parameter and set template option to function and parameter.
But these options didn't sustain and didn't make template member function.

Re: How to make template member function [message #1776704 is a reply to message #1776620] Mon, 20 November 2017 15:20 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 416
Registered: March 2011
Senior Member
Hi. Papyrus-RT doesn't have direct support for templates (either class or function templates). However there is a workaround, for function templates at least. You can use the "publicDeclarations", "protectedDeclarations" or "privateDeclarations" properties of the "CapsuleProperties" or the "PassiveClassProperties" stereotypes. Essentially you can put any (legal) declaration in these fields. See the attached model and generated code for an example.
Previous Topic:scope of trigger/message parameters
Next Topic:What is the best way to add comments to model elements?
Goto Forum:

Current Time: Sun Nov 27 20:16:48 GMT 2022

Powered by FUDForum. Page generated in 0.02178 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top