Protocol Buffers C++ API
来源:互联网 发布:淘宝发票管家在哪里 编辑:程序博客网 时间:2024/06/06 06:32
source : https://developers.google.com/protocol-buffers/docs/reference/cpp/index
C++ API
Packages
google::protobuf
google::protobuf::io
google::protobuf::compiler
google::protobuf
Core components of the Protocol Buffers runtime library.
The files in this package represent the core of the Protocol Buffer system. All of them are part of the libprotobuf library.
A note on thread-safety:
Thread-safety in the Protocol Buffer library follows a simple rule: unless explicitly noted otherwise, it is always safe to use an object from multiple threads simultaneously as long as the object is declared const in all threads (or, it is only used in ways that would be allowed if it were declared const). However, if an object is accessed in one thread in a way that would not be allowed if it were const, then it is not safe to access that object in any other thread simultaneously.
Put simply, read-only access to an object can happen in multiple threads simultaneously, but write access can only happen in a single thread at a time.
The implementation does contain some "const" methods which actually modify the object behind the scenes -- e.g., to cache results -- but in these cases mutex locking is used to make the access thread-safe.
Files
google/protobuf/descriptor.h
google/protobuf/descriptor.pb.h
google/protobuf/descriptor_database.h
google/protobuf/dynamic_message.h
google/protobuf/message.h
google/protobuf/message_lite.h
google/protobuf/repeated_field.h
google/protobuf/service.h
google/protobuf/text_format.h
google/protobuf/unknown_field_set.h
google/protobuf/stubs/common.h
google::protobuf::io
Auxiliary classes used for I/O.
The Protocol Buffer library uses the classes in this package to deal with I/O and encoding/decoding raw bytes. Most users will not need to deal with this package. However, users who want to adapt the system to work with their own I/O abstractions -- e.g., to allow Protocol Buffers to be read from a different kind of input stream without the need for a temporary buffer -- should take a closer look.
Files
google/protobuf/io/coded_stream.h
google/protobuf/io/gzip_stream.h
google/protobuf/io/printer.h
google/protobuf/io/tokenizer.h
google/protobuf/io/zero_copy_stream.h
google/protobuf/io/zero_copy_stream_impl.h
google/protobuf/io/zero_copy_stream_impl_lite.h
google::protobuf::compiler
repeated_field.h
Implementation of the Protocol Buffer compiler.
This package contains code for parsing .proto files and generating code based on them. There are two reasons you might be interested in this package:
- You want to parse .proto files at runtime. In this case, you should look at importer.h. Since this functionality is widely useful, it is included in the libprotobuf base library; you do not have to link against libprotoc.
- You want to write a custom protocol compiler which generates different kinds of code, e.g. code in a different language which is not supported by the official compiler. For this purpose,command_line_interface.h provides you with a complete compiler front-end, so all you need to do is write a custom implementation ofCodeGenerator and a trivial main() function. You can even make your compiler support the official languages in addition to your own. Since this functionality is only useful to those writing custom compilers, it is in a separate library called "libprotoc" which you will have to link against.
Files
google/protobuf/compiler/code_generator.h
google/protobuf/compiler/command_line_interface.h
google/protobuf/compiler/importer.h
google/protobuf/compiler/parser.h
google/protobuf/compiler/plugin.h
google/protobuf/compiler/plugin.pb.h
google/protobuf/compiler/cpp/cpp_generator.h
google/protobuf/compiler/java/java_generator.h
google/protobuf/compiler/python/python_generator.h
- Protocol Buffers C++ API
- Protocol Buffers for C
- Protocol Buffers Lua API总结
- Protocol Buffers for Object-C
- Protocol Buffers for Object-C
- Objective C Protocol Buffers 编译
- Protocol Buffers for Object-C
- Protocol Buffers for Object-C
- Protocol Buffers 反射及相关 API
- google protocol buffers介绍(c++)
- protocol buffers c语言的使用
- protocol buffers
- Protocol Buffers
- Protocol Buffers
- Protocol Buffers
- Protocol Buffers
- Protocol Buffers
- Protocol Buffers
- 应届生大学毕业后后档案的三种去处及优缺点分析
- 过滤器和拦截器的比较及未登录用户权限限制的实现
- Cubieboard 超频实例
- 正则表达式
- Java虚拟机探索1
- Protocol Buffers C++ API
- ini文件配置模块
- red5 ffmpeg operation not permitted 问题解决
- 第十次上机实验任务
- 第十次C程序上机报告
- 直接拿来用!最火的iOS开源项目(一)
- 第十次上机实验
- 将3ds文件导入openGL框架中
- 第十次实验任务