1 Star 0 Fork 0

genrwoody / convert_proto_struct

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.en-US.md 597 Bytes
一键复制 编辑 原始数据 按行查看 历史
genrwoody 提交于 2021-11-01 20:34 . do not set aliment for struct.

convert_proto_struct

中文 | English

Introduction

Convert 'Protobuf message' to 'c++ struct', or convert 'c++ struct' to 'Protobuf message'.

Support Protobuf Type:

  1. Fundamental types, such as int32, int64, bool, Enum, string and so on.
  2. Containers, repeated or map

Unsupport: oneof

Support struct:

  1. Do NOT set alignment for struct.
  2. Fundamental types, such as int, int64_t, bool, enum and so on.
  3. String should be std::string.
  4. The repeated should be std::vector.
  5. The map should be std::map

Unsupport: bit field.

Usage

Refer the example in test.

C++
1
https://gitee.com/genrwoody/convert_proto_struct.git
git@gitee.com:genrwoody/convert_proto_struct.git
genrwoody
convert_proto_struct
convert_proto_struct
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891