Re: Is 'choice' and 'group' in UNO possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/5/23 18:47, Regina Henschel wrote:
In RELAX NG (used for ODF file format) the structure below is possible. Is something similar possible for to define an "enhanced-color" for API? I mean, to have two members, where the data type of the second depends on the value of the first.

UNO does not support sum types. So you'd need to resort to something more ugly, like a struct type with a discriminating member (e.g. an enum) plus two further members (of which one or the other would be ignored) or (probably more idiomatic) an ANY.




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux