Are you using C++? If so, don't think in a C-like manner, but think in an object-oriented manner. The way this is usually done is to use inheritance and virtual functions. This would eventually mean that your DATA struct needs to be changed to handle this, as well as your code to read the data (you will need to read the data differently, no?).

Also, I suggest you draw out a proper design before doing anything else.

Regards,

Paul McKenzie