Hirrolot / datatype99

Algebraic data types for C99
MIT License
1.36k stars 23 forks source link

How to export only the tags in a .h #6

Closed picca closed 3 years ago

picca commented 3 years ago

Hello, I have this datatype

datatype(
        Detector,
        (ImXpadS70, struct imxpad_t),
        (ImXpadS140, struct imxpad_t),
        (XpadFlatCorrected, struct rectangular_t),
        (Eiger1M, struct dectris_t)
        );

I do not want to expose all the struct in my API but only the enum with all the choices, in order to hide the implementation behind only a pointer to Detector.

Is it possible ?

thanks

Hirrolot commented 3 years ago

What kind of implementation do you want to hide?

picca commented 3 years ago

I will think more about my problem, thanks ;)

Hirrolot commented 3 years ago

Closed due to inactivity. Please let me know if you still have the trouble.