Help with data types :-(

2 posts / 0 new
Last post
Offline
Last seen: 5 years 4 months ago
Joined: 03/04/2014
Posts: 15
Help with data types :-(

Hello, I'd really appreciate any help with this:

How can I create a vector of elements of data types?

I mean, each data type is of different kind, for example, if I've defined 3 data types (structs) within the IDL file, let's name them as "Flight", "Track" and "Foo".

I'm not able to find a supertype for the data types.

Thanks

sara's picture
Offline
Last seen: 2 weeks 5 days ago
Joined: 01/16/2013
Posts: 125

Hi Roderick,

I'm not sure I'm understanding you. What I understood is that you have defined 3 different data types and you want to create a new type containing all three of them. Am I right? If that's what you need, you can just create a struct containing one of each types. Would that work for you?

If what you need is a type that can be any of those three types, you can create a union in your IDL. Something like:

union SuperUnionType switch (long) {

    case 0: Flight myFlightMember;

    case 1: Track myTrackMember;

    case 2: Foo myFooMember[3];

};

Let me know if any of these ideas help you.

Sara