Archived
This forum has been archived. Please start a new discussion on GitHub.
How to define a variant type?
fengxb
in Help Center
Hi,
Did anybody define "Variant" data type like windows's COM in ICE? I had defined a struct to present the variant.
enum ValueType {VTINT, VTSHORT, VTLONG, VTFLOAT, VTDOUBLE, VTSTRING, VTBYTE, VTBOOLEAN,
VTINTSEQ, VTSHORTSEQ, VTLONGSEQ, VTFLOATSEQ, VTDOUBLESEQ, VTSTRINGSEQ, VTBYTESEQ, VTBOOLEANSEQ};
struct Variant
{
ValueType type;
Ice::ByteSeq byValues;
};
I'm not very satisfact with the definition. Have any more suggestion?
Thanks in advance.
Did anybody define "Variant" data type like windows's COM in ICE? I had defined a struct to present the variant.
enum ValueType {VTINT, VTSHORT, VTLONG, VTFLOAT, VTDOUBLE, VTSTRING, VTBYTE, VTBOOLEAN,
VTINTSEQ, VTSHORTSEQ, VTLONGSEQ, VTFLOATSEQ, VTDOUBLESEQ, VTSTRINGSEQ, VTBYTESEQ, VTBOOLEANSEQ};
struct Variant
{
ValueType type;
Ice::ByteSeq byValues;
};
I'm not very satisfact with the definition. Have any more suggestion?
Thanks in advance.
0
