We publish the IDL files to represent the interface and would have a similar structure with C++/C code so that we can use to map them when the interface is invoked. So some conversion (equivalent) representation would be required.
Like a sequence
in IDL is represented by list
in C++ and etc.
Recently, I came across a complex (unique), valid IDL file like -
union HostAddress switch(EAddType)
{
case E_IPV_4:
char ipv4Addr[4];
case E_IPV_6:
char ipv6Addr[16];
};
- How does this structure help us? What is the meaning of having such a union?
- How do we represent the above IDL structure in C/C++?