Commit 5ec4f83f authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update function type support for c++

parent c7a59dd5
......@@ -37,22 +37,43 @@
#include "dataview-uniq.h"
@@IF@@ @_Required_Interfaces'Length_@ > 0 or @_Timers'Length_@ > 0
template
<
class @_LOWER:Name_@ {
@@TABLE@@
@_Required_Interfaces_@
@@END_TABLE@@
@@TABLE@@
void (*SET_@_Timers_@) (asn1SccT_Uint32 *),
void (*RESET_@_Timers_@) (void)
typedef void (*SET_@_Timers_@_ptr)(asn1SccT_Uint32 *);
typedef void (*RESET_@_Timers_@_ptr)(void);
SET_@_Timers_@_ptr SET_@_Timers_@;
RESET_@_Timers_@_ptr RESET_@_Timers_@;
@@END_TABLE@@
>
@@END_IF@@
class @_LOWER:Name_@
{
public:
void startup();
/* Provided interfaces */
public:
@@IF@@ @_List_Of_RIs'Length_@ = 0 and @_Timers'Length_@ = 0
@_LOWER:Name_@() {}
@@ELSE@@
@@INLINE@@
@_LOWER:Name_@
@@INLINE(\()(, )(\):)@@
@@TABLE@@
RI_@_List_Of_RIs_@_ptr RI_@_List_Of_RIs_@_arg
@@END_TABLE@@
@@TABLE@@
SET_@_Timers_@_ptr SET_@_Timers_@_arg, RESET_@_Timers_@_ptr RESET_@_Timers_@_arg
@@END_TABLE@@
@@END_INLINE@@
@@END_INLINE@@
@@INLINE( )(, )( {})@@
@@TABLE@@
RI_@_List_Of_RIs_@(RI_@_List_Of_RIs_@_arg)
@@END_TABLE@@
@@TABLE@@
SET_@_Timers_@(SET_@_Timers_@_arg), RESET_@_Timers_@(RESET_@_Timers_@_arg)
@@END_TABLE@@
@@END_INLINE@@
@@END_IF@@ @@-- RI or Timers
void startup();
/* Provided interfaces */
@@TABLE@@
@_Provided_Interfaces_@
@@END_TABLE@@
......
......@@ -10,8 +10,8 @@
@@INLINE@@
@@IF@@ @_Direction_@ = "PI"
void @_Name_@(
@@ELSE@@
void (*RI_@_Name_@) (
@@ELSE@@ @@-- RI
typedef void (*RI_@_Name_@_ptr) (
@@END_IF@@
@@INLINE(, )@@
@@TABLE@@
......@@ -22,9 +22,8 @@ asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@IF@@ @_Direction_@ = "PI"
);
@@ELSE@@
)
@@END_IF@@
@@END_INLINE@@
@@IF@@ @_Direction_@ = RI
RI_@_Name_@_ptr RI_@_Name_@;
@@END_IF@@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment