GenoM IDL unions map onto C struct
s. The discriminator in the enum
is referred to as _d
, the union itself is referred to as _u
.
For instance, the following IDL:
union u switch(long) { case 1: long a; case 2: float b; default: char c; };
would map into
typedef struct { int32_t _d; union { int32_t a; float b; char c; } _u; } u;