Commit c7a59dd5 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

work on c++ templates

but that won't work
parent 50e23713
......@@ -42,7 +42,7 @@
#include "Context-@_REPLACE_ALL(_/-):LOWER:Name_@.h"
@@END_IF@@
void @_LOWER:Name_@_startup()
void @_LOWER:Name_@::startup()
{
// Write your initialisation code, but DO NOT CALL REQUIRED INTERFACES
// puts ("[@_Name_@] Startup");
......@@ -51,11 +51,5 @@ void @_LOWER:Name_@_startup()
@@TABLE@@
@_Provided_Interfaces_@
@@END_TABLE@@
@@TABLE@@
//void @_LOWER:Name_@_PI_@_Timers_@()
//{
// This function is called when the timer @_Timers_@ expires
//}
@@END_TABLE@@
......@@ -13,7 +13,7 @@
@@-- @_IF_Property_Names_@, _Values_@ : User-defined properties (vector tag)
@@IF@@ not @_Is_Timer_@
@@IF@@ @_EXIST:Param_Names_@
void @_LOWER:Parent_Function_@_PI_@_Name_@
void @_LOWER:Parent_Function_@::@_Name_@
@@INLINE( \()(,\n )(\)\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
......@@ -24,7 +24,7 @@ asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *OUT_@_LOWER:Param_Names_@
@@END_TABLE@@
@@END_INLINE@@
@@ELSE@@
void @_LOWER:Parent_Function_@_PI_@_Name_@(void)
void @_LOWER:Parent_Function_@::@_Name_@(void)
@@END_IF@@
{
// Write your code here
......
......@@ -20,9 +20,6 @@
@@-- @_Property_Values_@ : List of User-defined properties (values)
@@-- @_Is_Type_@ : Flag, True if function is a component type
@@-- @_Instance_Of_@ : Optional name of component type
@@IF@@ not @_Is_Type_@ and not @_EXIST:Instance_Of_@
@@INCLUDE@@ ../c-header/function.tmplt
@@ELSE@@
/* C++ Function Type
* Header file for function @_Name_@ in @_Language_@ language
* Generated by TASTE on @_NOW_@
......@@ -40,32 +37,23 @@
#include "dataview-uniq.h"
#ifdef __cplusplus
extern "C" {
#endif
@@IF@@ @_Required_Interfaces'Length_@ > 0 or @_Timers'Length_@ > 0
template
<
@_Required_Interfaces_@
@@TABLE@@
void (*SET_@_Timers_@) (asn1SccT_Uint32 *),
void (*RESET_@_Timers_@) (void)
@@END_TABLE@@
>
@@END_IF@@
class @_LOWER:Name_@
{
public:
void startup();
/* Provided interfaces */
@@TABLE@@
@_Provided_Interfaces_@
@@END_TABLE@@
/* Required interfaces */
@@TABLE@@
@_Required_Interfaces_@
@@END_TABLE@@
@@TABLE@@
// void @_Timers_@(void);
/* Call these functions to set/reset @_Timers_@ (value in milliseconds)*/
void @_LOWER:Name_@_RI_SET_@_Timers_@(asn1SccT_UInt32 *);
void @_LOWER:Name_@_RI_RESET_@_Timers_@();
@@END_TABLE@@
}
#ifdef __cplusplus
}
#endif
@@END_IF@@
};
......@@ -9,9 +9,9 @@
@@-- @_Param_Directions_@ : |_ Corresponding direction
@@INLINE@@
@@IF@@ @_Direction_@ = "PI"
void @_LOWER:Parent_Function_@_PI_@_Name_@(
void @_Name_@(
@@ELSE@@
extern void @_LOWER:Parent_Function_@_RI_@_Name_@(
void (*RI_@_Name_@) (
@@END_IF@@
@@INLINE(, )@@
@@TABLE@@
......@@ -22,5 +22,9 @@ asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@IF@@ @_Direction_@ = "PI"
);
@@ELSE@@
)
@@END_IF@@
@@END_INLINE@@
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