简体   繁体   中英

Are there any data-binding solution that works in C++ and GWT and supports structures polymorphism?

I expect it should share a common description, like XmlSchema or IDL and should generate classes for target language.

I found Thrift and it's really nice solution, but it doesn't support structures polymorphism. I would like to have collections of base class objects, where I could place instances of subclasses, serialize this and deserialize at the opposite side. Some mechanism of polymorphic behavior support, like Visitor, would be a perfect.

Does anybody know something suitable for these requirements?

I would suggest trying Protocol Buffers. It is a Google originated technology so I would imagine it is well supported by C++ and GWT.

http://code.google.com/apis/protocolbuffers/

As mentioned, something like Protocol Buffer s would definitely be your best bet. It supports C++ and there are two separate projects that support GWT: protostuff and protobuf-gwt .

There are many comparisons between Protocol Buffers and Thrift, so if you're looking to use Thrift, it's possible to integrate with GWT as well, through the gwt-rpc-plus project .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM