thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Ritchie <ritch...@apache.org>
Subject Struct definition : self-referencing structs and struct inheritance.
Date Fri, 19 Nov 2010 03:25:07 GMT
Hi I'm investigating the possibility of using Thrift however, I
currently have the need for two things that I don't think Thrift
currently supports: self referencing structs and struct inheritance.

The type of data I'm trying to serialise is a tree so Type A contains
a list of A.
However A also has a tree of sub-types A->B->C, A->D  etc.

Ideally I'd like to represent this in thrift as something like:

struct A
{
 1: i32 id,
 2: list<A> children
}

struct B extends A
{
 1:i32 extraField
}

Apologies if this has previously been discussed. Is this something
that was ruled out? Is anyone interested and/or working on this
already?

Regards

Martin

-- 
Martin Ritchie

Mime
View raw message