Skip to main content



      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 11:57 Go to next message
Eclipse UserFriend
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 10:20 Go to previous message
Eclipse UserFriend
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: Thu May 22 03:45:36 EDT 2025

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

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

Back to the top