thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Mans <paulm...@gmail.com>
Subject Re: how can i reuse the struct in multi-thrift files
Date Wed, 02 Nov 2011 12:57:56 GMT
Hi, here is an example of how you could do it with two files, common.thrift
and other.thrift:



common.thrift
---------------------------------------------------------------------


struct Coordinate {
1: required double latitude;
2: required double longitude;
}

----------------------------------------------------------------------



other.thrift
---------------------------------------------------------------------

include "common.thrift"

struct Location {
1: required common.Coordinate coordinate;
 2: optional string address;
}

----------------------------------------------------------------------




On Wed, Nov 2, 2011 at 1:02 AM, stream <stream1984@gmail.com> wrote:

> Hi
>
> As the subject.
> i have include the a file of thrift which contain a struct ,for instance
> call stract XXX. and now , i wanna  use this struct in another file of
> thrift.
>
> thanks
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message