开发者

ZeroCopyOutputStream into a streambuf

I would like to write a class that inherites from streambuf and adapts a ZeroCopyOutputStream (开发者_如何学Cgoogle/protobuf/io/) into a streambuf.

any ideas?


  1. write a proto description file and compile it to c++ code using protoc
  2. the generated c++ class has functions to read/write to stream: SerializeToOstream(ostream* stream) and ParseFromIstream(istream* stream)

You may need to create iostream from streambuf by yourself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜