protobuf解析1-基本使用方法
2010-12-28 22:40
791 查看
[motadou@localhost ~]$ protoc -h Usage: protoc [OPTION] PROTO_FILES Parse PROTO_FILES and generate output based on the options given: -IPATH, --proto_path=PATH 指定包含文件的搜索目录。 可以同时指定多个,程序按指定的顺序搜索特定的文件。 如果没有指定,其默认值为当前目录。 --version 打印版本号,并退出程序 -h, --help 打印帮助信息,并退出程序 --encode=MESSAGE_TYPE Read a text-format message of the given type from standard input and write it in binary to standard output. The message type must be defined in PROTO_FILES or their imports. --decode=MESSAGE_TYPE Read a binary message of the given type from standard input and write it in text format to standard output. The message type must be defined in PROTO_FILES or their imports. --decode_raw Read an arbitrary protocol message from standard input and write the raw tag/value pairs in text format to standard output. No PROTO_FILES should be given when using this flag. -oFILE, Writes a FileDescriptorSet (a protocol buffer, --descriptor_set_out=FILE defined in descriptor.proto) containing all of the input files to FILE. --include_imports When using --descriptor_set_out, also include all dependencies of the input files in the set, so that the set is self-contained. --include_source_info When using --descriptor_set_out, do not strip SourceCodeInfo from the FileDescriptorProto. This results in vastly larger descriptors that include information about the original location of each decl in the source file as well as surrounding comments. --error_format=FORMAT Set the format in which to print errors. FORMAT may be 'gcc' (the default) or 'msvs' (Microsoft Visual Studio format). --print_free_field_numbers Print the free field numbers of the messages defined in the given proto files. Groups share the same field number space with the parent message. Extension ranges are counted as occupied fields numbers. --plugin=EXECUTABLE Specifies a plugin executable to use. Normally, protoc searches the PATH for plugins, but you may specify additional executables not in the path using this flag. Additionally, EXECUTABLE may be of the form NAME=PATH, in which case the given plugin name is mapped to the given executable even if the executable's own name differs. --cpp_out=OUT_DIR 生成C++语言的头文件以及代码文件,OUT_DIR为生成代码的存放路径 --java_out=OUT_DIR 生成Java语言的代码文件,OUT_DIR为生成代码的存放路径 --javanano_out=OUT_DIR 生成Java语言精简版的代码文件,OUT_DIR为生成代码的存放路径 --python_out=OUT_DIR 生成Python语言的代码文件,OUT_DIR为生成代码的存放路径 --ruby_out=OUT_DIR 生成Ruby语言的代码文件,,OUT_DIR为生成代码的存放路径
相关文章推荐
- 使用Python解析JSON数据的基本方法
- 使用Python解析JSON数据的基本方法
- Android图片载入框架最全解析(一),Glide的基本使用方法
- jsoup解析网络HTML页,基本的使用方法
- 使用Python解析JSON数据的基本方法
- 使用Python解析JSON数据的基本方法
- Android应用中使用DOM方式解析XML格式数据的基本方法
- 关于AFNetworking解析数据的基本使用方法
- 使用Python解析JSON数据的基本方法
- Android Glide的基本使用方法 , 内存优化以及源码解析
- DatePicker 和 DatePickerDialog的基本使用方法
- Java_java中FileWriter和FileReader类(基本使用方法)
- Intel_IPP的基本使用方法
- TotoiseSVN的基本使用方法
- MATLAB基本的使用方法(图像,矩阵及函数)
- Hibernate单独使用 (一)建立和基本使用方法
- emmet 基本使用方法
- ie无法使用jquery解析xml的解决方法
- 多线程的几中创建方法与基本使用
- vi/vim基本使用方法