I am developing middleware for communication in an application that has a module in Ada and many C ++ modules, which exchanges transmitting parameters (scalar values) and structures. The application works in MS Windows XP and Windows 7, part C ++ is developed in MSVC ++ 2008, part Ada is developed using GPS / GNAT. Ada version is 1995, but we are in the middle of compiler migration (newer version of GPS / GNAT) with the possibility of using the newer Ada specification.
The middle software is written in C ++, and I would like to use a union type containing all the types that are passed between the modules, so I do not need to specify one put / get function for each type that is used in the system.
The question is, are C ++ binary joins compatible with Ada writing options? In other words, if I pass the C ++ union to Ada code, can it read it as a Variant record? (and vice versa)
I think that in order to make this possible, some corrections will be needed ... (For example: C ++ unions do not contain a member that describes its contents, while the entries are Ada variants)
Guarita
source share