reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
type_converter.h File Reference

This file provides macro DO_CONVERT(fromType, toType, value). More...

Go to the source code of this file.

Macros

#define DO_CONVERT(fromType, toType, value)
 Convert the specified value from one type to another.
#define PASTE(x, y)
#define RESOLVE(i, o, in)

Detailed Description

This file provides macro DO_CONVERT(fromType, toType, value).

Author
Muhammad Khubaib Umer

Sometimes the generic Reactor can work as a connector between two reactors. We provide this macro to enable user to provide their own converter libraries as long as they follow the convention for naming their conversion functions this macro will work.

Convention: toType convert__fromType_to__toType(fromType x).

Macro Definition Documentation

◆ PASTE

#define PASTE ( x,
y )
Value:
x##y

◆ RESOLVE

#define RESOLVE ( i,
o,
in )
Value:
PASTE(convert__##i, _to__##o)(in)
#define PASTE(x, y)
Definition type_converter.h:18