|
Sequence of 'unions'?
Is it possible to return a sequence of (simulated) union values?
I'm trying to do something along the lines of the following:
class SymValue { };
class ByteValue extends SymValue { byte byteval; };
class ShortValue extends SymValue { short shortval; };
class LongValue extends SymValue { long longval; };
class FloatValue extends SymValue { float floatval; };
class DoubleValue extends SymValue { double doubleval; };
struct SymDatum {
string name;
double rate;
short units;
SymValue* value;
};
sequence<string> SymNameSeq;
sequence<SymDatum> SymDataSeq;
// Return symbols matching 'symname'
class Source
{
nonmutating SymDataSeq SymQuery( string symname );
.
.
};
I've been having problems getting a test program for this to compile,
and just wanted to ask: is this even possible, or does the Slice-to-C++
mapping not permit such usage?
|