您的位置:首页 > Web前端

Google Protocol Buffer(2)—API

2015-04-05 15:35 337 查看
引言

google protocol buffer提供了三个API packeges, 其命名和功能概要分别如下:

google::protobuf   
protobuf核心运行库              

google::protobuf::io 
用于I/O的辅助类;

google::protobuf::compiler   
protocol buffer  compiler的实现库;

1. google::protobuf   

 protocol buffer 系统的核心库;
note:线程安全:只读对象(const 修饰)可以被多个线程同时访问,但允许写的对象只能同时被一个线程访问;
2.google::protobuf::io

可以encoding 和decoding 原始的字节;
开发者实现自己的I/O系统:例如,允许protobuf无需缓存从不同的输入流里读取数据;
3.google::protocol::compiler

动态编译.proto文件时应用,需包含import.h;
开发其他语言的.proto文件的编译器;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  google protocol buffer