1 Star 0 Fork 0

genrwoody / convert_proto_struct

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 575 Bytes
一键复制 编辑 原始数据 按行查看 历史
genrwoody 提交于 2022-06-29 23:52 . update README.md.

convert_proto_struct

中文 | English

介绍

转换Protobuf消息类为c++结构体, 或者转换c++结构体为Protobuf消息类

支持的Protobuf类型:

  1. 基本类型, 如int32, int64, bool, Enum, string等
  2. 容器, repeated, map

不支持: oneof

支持的结构体类型:

  1. 结构体不能设置对齐参数
  2. 基本类型, 如int, int64_t, bool, enum等
  3. 字符串必须是std::string
  4. repeated对应的类型为std::vector
  5. map对应的类型必须是std::map

不支持: 位域

使用方法

可参考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

搜索帮助