<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Protocol &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/tag/protocol/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Sun, 03 May 2020 13:09:19 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[原创] Techniques 中文翻译（Google Protocol Buffers中文教程）</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 05:37:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Buffer]]></category>
		<category><![CDATA[Google Protocol Buffers]]></category>
		<category><![CDATA[Protocol]]></category>
		<category><![CDATA[Protocol Buffer]]></category>
		<category><![CDATA[Protocol Buffers]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[翻译]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=316</guid>

					<description><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;
color:black;mso-font-kerning:18.0pt">Techniques </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">技巧</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<h1>
	<span style="font-family:微软雅黑;"><span style="font-size:14px;">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<span style="color:#ff0000;">转载须注明出处</span>：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&#38;&#160;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</span></span></h1>
<p>
<span id="more-316"></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#streaming"><span style="color:#0000CC">Streaming Multiple Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#large-data"><span style="color:#0000CC">Large Data Sets</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#union"><span style="color:#0000CC">Union Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#self-description"><span style="color:#0000CC">Self-describing Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt">This page describes some commonly-used design patterns for dealing with Protocol Buffers. You can also send design and usage questions to the&#160;<a href="http://groups.google.com/group/protobuf"><span style="color:#0000CC">Protocol Buffers discussion group</span></a>.</span>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:18.0pt">Techniques </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">技巧</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<h1>
	<span style="font-family:微软雅黑;"><span style="font-size:14px;">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<span style="color:#ff0000;">转载须注明出处</span>：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&amp;&nbsp;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</span></span></h1>
<p>
<span id="more-316"></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#streaming"><span style="color:#0000CC">Streaming Multiple Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#large-data"><span style="color:#0000CC">Large Data Sets</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#union"><span style="color:#0000CC">Union Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#self-description"><span style="color:#0000CC">Self-describing Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This page describes some commonly-used design patterns for dealing with Protocol Buffers. You can also send design and usage questions to the&nbsp;<a href="http://groups.google.com/group/protobuf"><span style="color:#0000CC">Protocol Buffers discussion group</span></a>.<br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p> </o:p></span></p>
<h1>
	<span lang="EN-US" style="line-height: 15pt; text-align: left; text-indent: -21pt; font-size: 12pt; font-family: Wingdings; color: blue; ">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span><b style="line-height: 15pt; text-align: left; text-indent: -21pt; "><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">将多个消息转化为流</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo2"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">大数据集</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo2"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">联合类型</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo2"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">自描述的消息</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">本文描述了处理</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的时候一些常用的设计模式。你也可以向</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">讨论组（</span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://groups.google.com/group/protobuf"><span style="color:#0000CC">Protocol Buffers discussion group</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）发送设计和使用方面的问题寻求解答。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Streaming Multiple Messages </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">将多个消息转化为流</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If you want to write multiple messages to a single file or stream, it is up to you to keep track of where one message ends and the next begins. The Protocol Buffer wire format is not self-delimiting, so protocol buffer parsers cannot determine where a message ends on their own. The easiest way to solve this problem is to write the size of each message before you write the message itself. When you read the messages back in, you read the size, then read the bytes into a separate buffer, then parse from that buffer. (If you want to avoid copying bytes to a separate buffer, check out the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">CodedInputStream</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;class (in both C++ and Java) which can be told to limit reads to a certain number of bytes.)<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">如果你想将多个消息写入一个文件或流（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">stream</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）中，那么是由你来记录一个消息的终点以及另一个消息的起点的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">数据传输格式不是自我限定的（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">self-delimiting</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">），所以</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">解析器无法自己决定一个消息结束于何处。解决这个问题的最简单的方法就是：在写入每一个消息之前，先写入消息的大小。当你读取消息的时候，先读取消息大小，然后将指定的字节数读入一个独立的缓冲区中，然后再解析缓冲区里的东西。如果你不想将数据拷贝到一个独立的缓冲区中，请查看</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">CodedInputStream</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">都可用）的使用方法&mdash;&mdash;你可以用它来限制只读取指定字节的数据。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Large Data Sets </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">大数据集</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol Buffers are not designed to handle large messages. As a general rule of thumb, if you are dealing in messages larger than a megabyte each, it may be time to consider an alternate strategy.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">不是设计来处理大消息的。根据一般经验，如果你要处理的单条消息大于</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">1M</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，那就是采取其他策略的时候了。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">That said, Protocol Buffers are great for handling individual messages&nbsp;<i>within</i>&nbsp;a large data set. Usually, large data sets are really just a collection of small pieces, where each small piece may be a structured piece of data. Even though Protocol Buffers cannot handle the entire set at once, using Protocol Buffers to encode each piece greatly simplifies your problem: now all you need is to handle a set of byte strings rather than a set of structures.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">也就是说，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">非常适合于处理一个大数据集内有多个单独的消息。通常，大数据集只是许多小块数据的集合，每一小块都是一块结构化的数据。即使是这样，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">也不能马上处理整个数据集，使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来编码每一块数据可以极大地简化你的问题：现在你所需要的只是处理一组字符串，而不是一组结构体了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol Buffers do not include any built-in support for large data sets because different situations call for different solutions. Sometimes a simple list of records will do while other times you may want something more like a database. Each solution should be developed as a separate library, so that only those who need it need to pay the costs.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">没有内置任何对大数据集的支持，因为不同的情况需要不同的解决方案。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">有时，一个简单的记录列表就解决问题了，而在某些情况下，你可能更想要的是类似于数据库的东西。每个解决方案都应该作为一个独立的库来开发，所以只有需要它的人才需要付出代价。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Union Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">联合类型</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You may sometimes want to send a message that could be one of several different types. However, protocol buffer parsers cannot necessarily determine the type of a message based on the contents alone. So how do you make sure that the recipient application knows how to decode your message? One solution is to create a wrapper message that has one optional field for each possible message type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">有时，你可能想发送一个消息，它的类型可以是几种不同的类型之一。然而，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">解析器无法仅凭消息内容来决定消息的类型。所以，你如何确保接收方应用程序能知道怎么解析消息呢？有一个解决方案是：创建一个封装的消息，其含有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">N</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的字段，每一个字段对应一种可能的消息类型。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For example, if you have message types&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, you can combine them with a type like:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">例如，如果你有消息类型</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Bar</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，那么你可以将它们与类型结合起来，像这样：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// One of the following will be filled in.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Foo foo = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Bar bar = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz baz = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You may also want to have an enum field that identifies which message is filled in, so that you can&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">switch</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;on it:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">你也可能想这样做：添加一个枚举字段来标识是哪个消息被填充了，这样的话你就可以对它使用</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">switch</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（来进行不同的处理）：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>enum Type { FOO = 1; BAR = 2; BAZ = 3; }<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// Identifies which field is filled in.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required Type type = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// One of the following will be filled in.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Foo foo = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Bar bar = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz baz = 4;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If you have a very large number of possible types, listing every one of them in your container type may be unwieldy. Instead, you should consider using&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extensions</span></a>:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">如果你有大量&ldquo;可能的类型&rdquo;，那么在你的容器类型中将它们一一列举出来可能非常困难。在这种情况下，你应该考虑使用扩展（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extensions</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extensions 100 to max;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">// Elsewhere...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">extend OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Foo foo_ext = 100;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Bar bar_ext = 101;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz baz_ext = 102;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Note that you can use the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">ListFields</span><span lang="EN-US" style="font-size:12.0pt;font-family:
&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;reflection method (in C++, Java, and Python) to get a list of all fields present in the message, including extensions. You might use this as part of a scheme for registering handlers for diverse message types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">注意：你可以使用反射函数</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">ListFields</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">都可用）来获取一个消息中的所有字段的列表（包括扩展）。在实现一个为不同消息类型分别注册句柄的技术方案的时候，你可能用得上这个功能。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Self-describing Messages </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">自描述的消息</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol Buffers do not contain descriptions of their own types. Thus, given only a raw message without the corresponding&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file defining its type, it is difficult to extract any useful data.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">However, note that the contents of a .proto file can itself be represented using protocol buffers. The file&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">src/google/protobuf/descriptor.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">in the source code package defines the message types involved.&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">protoc</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;can output a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FileDescriptorSet</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;&ndash; which represents a set of .proto files &ndash; using the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">--descriptor_set_out</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;option. With this, you could define a self-describing protocol message like so:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">不包含自我类型描述的信息。因此，如果只提供原始消息，而不提供对应的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件，你将很难从中提取出任何有用的数据。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">然而，请注意：一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件的内容可以使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来描述。通过使用</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">--descriptor_set_out</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">选项，源代码包中的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">src/google/protobuf/descriptor.proto</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件定义了相关的消息类型。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protoc</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">编译器可以输出一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FileDescriptorSet</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">&mdash;&mdash;这个集合表示一系列的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件。利用它，你可以像这样定义一个自描述的协议消息：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SelfDescribingMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// Set of .proto files which define the type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span><span style="mso-spacerun:yes">&nbsp;</span>required FileDescriptorSet proto_files = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// Name of the message type.<span style="mso-spacerun:yes">&nbsp; </span>Must be defined by one of the files in<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// proto_files.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string type_name = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// The message data.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required bytes message_data = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">By using classes like&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">DynamicMessage</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;(available in C++ and Java), you can then write tools which can manipulate&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SelfDescribingMessage</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">s.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">All that said, the reason that this functionality is not included in the Protocol Buffer library is because we have never had a use for it inside Google.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">通过使用像</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">DynamicMessage</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这样的类（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">都可用），你可以编写出操作</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SelfDescribingMessage</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的工具。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">总之，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">库之所以没有包含这个特性，是因为我们在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Google</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">还从没有需要用它的机会。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] Style Guide中文翻译（Google Protocol Buffers中文教程）</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 05:30:16 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Buffer]]></category>
		<category><![CDATA[Google Protocol Buffers]]></category>
		<category><![CDATA[Protocol]]></category>
		<category><![CDATA[Protocol Buffer]]></category>
		<category><![CDATA[Protocol Buffers]]></category>
		<category><![CDATA[Style Guide]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[翻译]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=305</guid>

					<description><![CDATA[<h1>
	<b><span style="font-size:20.5pt;Helvetica&#34;,&#34;sans-serif&#34;;
color:black;">Style Guide </span></b><b><span style="font-size:20.5pt;color:blue;">风格指南</span></b></h1>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;">
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
		<span style="font-size:14px;"><span style="font-family:微软雅黑;"><font class="Apple-style-span" color="#000000">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（</font><strong><span style="color:#ff0000;"><font class="Apple-style-span">转载须注明出处</font></span></strong><font class="Apple-style-span" color="#000000">：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&#38;&#160;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</font></span></span></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
<span id="more-305"></span>	</div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&#34;,&#34;sans-serif&#34;;color:black;">This document provides a style guide for&#160;</span><span style="font-size:10.0pt;Courier New&#34;;
color:#007000;">.proto</span><span style="font-size:12.0pt;Helvetica&#34;,&#34;sans-serif&#34;;color:black;">&#160;files. By following these conventions, you&#39;ll make your protocol buffer message definitions and their corresponding classes consistent and easy to read.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">本文档提供了</span></b><b><span style="font-size:12.0pt;Helvetica&#34;,&#34;sans-serif&#34;;
color:blue;">.proto</span></b></font></div></div>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/" class="read-more">Read More </a>]]></description>
										<content:encoded><![CDATA[<h1>
	<b><span style="font-size:20.5pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Style Guide </span></b><b><span style="font-size:20.5pt;color:blue;">风格指南</span></b></h1>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"></p>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
		<span style="font-size:14px;"><span style="font-family:微软雅黑;"><font class="Apple-style-span" color="#000000">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（</font><strong><span style="color:#ff0000;"><font class="Apple-style-span">转载须注明出处</font></span></strong><font class="Apple-style-span" color="#000000">：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&amp;&nbsp;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</font></span></span></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
<span id="more-305"></span>	</div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">This document provides a style guide for&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">.proto</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">&nbsp;files. By following these conventions, you&#39;ll make your protocol buffer message definitions and their corresponding classes consistent and easy to read.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">本文档提供了</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">.proto</span></b><b><span style="font-size:12.0pt;
color:blue;">文件的书写风格指南。通过遵守这些约定，你的</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;">protocol buffer</span></b><b><span style="font-size:
12.0pt;color:blue;">消息定义和它们的对应类将会风格一致且易于阅读。</span></b></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		&nbsp;</div>
<div style="border:none;border-top:solid #3366CC 1.0pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<div align="left" style="margin-top:24.0pt;text-align:left;background:#E5ECF9;border:none;padding:0cm;">
			<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:15.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Message And Field Names </span></b><b><span style="font-size:15.0pt;color:blue;">消息和字段名</span></b></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Use CamelCase (with an initial capital) for message names &ndash; for example,&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">SongServerRequest</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">. Use underscore_separated_names for field names &ndash; for example,&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;color:#007000;">song_name</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">消息名使用驼峰格式（每个单词首字母大写）来书写&mdash;&mdash;例如</span></b><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">SongServerRequest</span><b><span style="font-size:12.0pt;color:blue;">。字段名使用小写的下划线分隔式（</span></b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">underscore_separated_names</span><b><span style="font-size:12.0pt;color:blue;">）来书写&mdash;&mdash;例如</span></b><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">song_name</span><b><span style="font-size:12.0pt;
color:blue;">。</span></b></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		&nbsp;</div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">message SongServerRequest {</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">&nbsp;required string song_name = 1;</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">}</span></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Using this naming convention for field names gives you accessors like the following:</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">字段名使用这种形式的命名约定的话，生成的访问类中的函数就有如下形式：</span></b></font></div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:black;">C</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">++:</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;
color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">const</span><span style="font-size:
9.0pt;Courier New&quot;;color:#000088;">string</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">&amp;</span><span style="font-size:9.0pt;Courier New&quot;;color:black;"> song_name</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">()</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">...</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">}</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">void</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> set_song_name</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">(</span><span style="font-size:
9.0pt;Courier New&quot;;color:#000088;">const</span><span style="font-size:9.0pt;Courier New&quot;;color:#000088;">string</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">&amp;</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> x</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">)</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">...</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">}</span></p>
<p>			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:black;">Java</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">:</span><br />
			<span style="font-size:
9.0pt;Courier New&quot;;color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">public</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> String getSongName</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">()</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">...</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">}</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">public</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> Builder setSongName</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">(</span><span style="font-size:
9.0pt;Courier New&quot;;color:black;">String v</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">)</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">{</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">...</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">}</span></font></div>
</p></div>
<div style="border:none;border-top:solid #3366CC 1.0pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<div align="left" style="margin-top:24.0pt;text-align:left;background:#E5ECF9;border:none;padding:0cm;">
			<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:15.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Enums </span></b><b><span style="font-size:
15.0pt;color:blue;">枚举</span></b></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Use CamelCase (with an initial capital) for enum type names and CAPITALS_WITH_UNDERSCORES for value names:</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">枚举名使用驼峰格式（每个单词首字母大写）来书写，值名使用大写的下划线分隔式（</span></b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">CAPITALS_WITH_UNDERSCORES</span><b><span style="font-size:12.0pt;color:blue;">）来书写：</span></b></font></div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#000088;">enum</span><span style="font-size:9.0pt;Courier New&quot;;color:black;"> Foo </span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:black;">&nbsp; FIRST_VALUE </span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">=</span><span style="font-size:9.0pt;Courier New&quot;;color:#006666;">1</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">;</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:black;">&nbsp; SECOND_VALUE </span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">=</span><span style="font-size:
9.0pt;Courier New&quot;;color:#006666;">2</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">;</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;
color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">}</span></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Each enum value should end with a semicolon, not a comma.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">每一个枚举值都应该以分号结尾，而不是逗号。</span></b></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></div>
<div style="border:none;border-top:solid #3366CC 1.0pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<div align="left" style="margin-top:24.0pt;text-align:left;background:#E5ECF9;border:none;padding:0cm;">
			<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:15.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Services </span></b><b><span style="font-size:15.0pt;color:blue;">服务</span></b></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">If your&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;color:#007000;">.proto</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">&nbsp;defines an RPC service, you should use CamelCase (with an initial capital) for both the service name and any RPC method names:</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">如果你的</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">.proto</span></b><b><span style="font-size:12.0pt;
color:blue;">文件定义了一个</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">RPC</span></b><b><span style="font-size:12.0pt;
color:blue;">服务，那么服务名和任何</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">RPC</span></b><b><span style="font-size:12.0pt;
color:blue;">函数名都应该使用驼峰格式（每个单词首字母大写）来书写：</span></b></font></div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">service FooService {</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">&nbsp;rpc GetSomething(FooRequest) returns (FooResponse);</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">}</span></font></div>
</p></div>
</div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
	<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
		<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] Language Guide中文翻译（Google Protocol Buffers中文教程）</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 05:22:37 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Buffer]]></category>
		<category><![CDATA[Google Protocol Buffers]]></category>
		<category><![CDATA[Language Guide]]></category>
		<category><![CDATA[Protocol]]></category>
		<category><![CDATA[Protocol Buffer]]></category>
		<category><![CDATA[Protocol Buffers]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[翻译]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=299</guid>

					<description><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;
color:black;mso-font-kerning:18.0pt">Language Guide </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">语言指南</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<strong><span style="color:#ff0000;">转载须注明出处</span></strong>：本文来自learnhard的博客：<span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; " target="_blank" rel="noopener noreferrer">http://www.codelast.com/</a>&#160;</span>&#38;&#160;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
<span id="more-299"></span></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#simple"><span style="color:#0000CC">Defining A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">Scalar Value Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">Optional And Default Values</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">Enumerations</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#other"><span style="color:#0000CC">Using Other Message Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#nested"><span style="color:#0000CC">Nested Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#updating"><span style="color:#0000CC">Updating A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">Extensions</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#packages"><span style="color:#0000CC">Packages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#services"><span style="color:#0000CC">Defining Services</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#options"><span style="color:#0000CC">Options</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">Generating Your Classes</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt">This guide describes how to use the protocol buffer language to structure your protocol buffer data, including&#160;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&#34;Courier New&#34;;color:#007000;
mso-font-kerning:0pt">.proto</span>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:18.0pt">Language Guide </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">语言指南</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<strong><span style="color:#ff0000;">转载须注明出处</span></strong>：本文来自learnhard的博客：<span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; " target="_blank" rel="noopener noreferrer">http://www.codelast.com/</a>&nbsp;</span>&amp;&nbsp;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
<span id="more-299"></span></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#simple"><span style="color:#0000CC">Defining A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">Scalar Value Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">Optional And Default Values</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">Enumerations</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#other"><span style="color:#0000CC">Using Other Message Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#nested"><span style="color:#0000CC">Nested Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#updating"><span style="color:#0000CC">Updating A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">Extensions</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#packages"><span style="color:#0000CC">Packages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#services"><span style="color:#0000CC">Defining Services</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#options"><span style="color:#0000CC">Options</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">Generating Your Classes</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This guide describes how to use the protocol buffer language to structure your protocol buffer data, including&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;file syntax and how to generate data access classes from your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;files.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This is a reference guide &ndash; for a step by step example that uses many of the features described in this document, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/tutorials.html"><span style="color:#0000CC">tutorial</span></a>&nbsp;for your chosen language.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span><span lang="EN-US" style="line-height: 26.25pt; text-indent: -21pt; font-size: 12pt; font-family: Wingdings; color: blue; ">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span><b style="line-height: 26.25pt; text-indent: -21pt; "><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">定义一个消息（</span></b><b style="line-height: 26.25pt; text-indent: -21pt; "><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="line-height: 26.25pt; text-indent: -21pt; "><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）类型</span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">标量值类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">可选的（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）字段以及默认值</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">枚举</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">使用其他消息类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">嵌套类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">更新一个消息类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">扩展</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">包（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">package</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">定义服务（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">service</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">选项（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">option</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">生成访问类</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">本指南描述了怎样使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">语言来构造你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">数据，包括</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件语法以及怎样生成</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件的数据访问类。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">本文是一个参考指南&mdash;&mdash;如果要查看如何使用本文中描述的多个特性的循序渐进的例子，请在</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/tutorials.html"><span style="color:#0000CC">tutorial</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">中查找你需要的语言的教程。</span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Defining A Message Type </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">定义一个消息类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">First let&#39;s look at a very simple example. Let&#39;s say you want to define a search request message format, where each search request has a query string, the particular page of results you are interested in, and a number of results per page. Here&#39;s the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file you use to define the message type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">首先看一个非常简单的例子。假设你想定义一个&ldquo;搜索请求&rdquo;（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">search request</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）的消息格式，每一个搜索请求含有一个查询字符串、你感兴趣的查询结果所在的页数，以及每一页多少条查询结果。那么下面这个就是用来定义消息类型的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件了：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;message definition specifies three fields (name/value pairs), one for each piece of data that you want to include in this type of message. Each field has a name and a type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchRequest</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">消息类型指定了</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">3</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">个字段（名</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">/</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">值</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"> </span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">对），你想在消息中承载的数据分别对应于每一个字段。每个字段都有一个名字（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">name</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）和一个类型（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">type</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b><span lang="EN-US" style="font-size: 15pt; font-family: Helvetica, sans-serif; ">Specifying Field Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">指定字段类型</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In the above example, all the fields are&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">scalar types</span></a>: two integers (</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">page_number</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">result_per_page</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">) and a string (</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">query</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">). However, you can also specify composite types for your fields, including&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">enumerations</span></a>&nbsp;and other message types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在上面的例子中，所有字段都是标量类型（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">scalar types</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">:</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">两个整型（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">page_number</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">result_per_page</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">），一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">query</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）。然而，你也可以为字段指定合成的类型，包括枚举（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">enumerations</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）以及其他消息类型。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Assigning Tags </span></b><b><span style="font-size:15.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">分配标识号</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">As you can see, each field in the message definition has a&nbsp;<b>unique numbered tag</b>. These tags are used to identify your fields in the&nbsp;<a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">message binary format</span></a>, and should not be changed once your message type is in use. Note that tags with values in the range 1 through 15 take one byte to encode. Tags in the range 16 through 2047 take two bytes. So you should reserve the tags 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The smallest tag number you can specify is 1, and the largest is 2<sup>29</sup>&nbsp;- 1, or 536,870,911. You also cannot use the numbers 19000 though 19999 (</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FieldDescriptor::kFirstReservedNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;through&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FieldDescriptor::kLastReservedNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">), as they are reserved for the Protocol Buffers implementation - the protocol buffer compiler will complain if you use one of these reserved numbers in your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">如你所见，在消息定义中，每一个字段都有一个</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#FF0066;mso-font-kerning:0pt">独一无二的标识号</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（</span></b><b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">unique numbered tag</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）。这些标识号是用来在</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#FF0066;mso-font-kerning:0pt">消息二进制格式</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（</span></b><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">message binary format</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）中识别你的字段的。注意：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">[1,15]</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">之内的标识号在编码的时候会占用一个字节。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">[16,2047]</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">之内的标识号则占用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">2</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个字节。所以你应该为那些频繁出现的消息元素保留</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">[1,15]</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">之内的标识号。切记：要为将来有可能添加的、频繁出现的标识号预留一些标识号。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Specifying Field Rules </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">指定字段规则</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You specify that message fields are one of the following:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo2;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: a well-formed message must have exactly one of this field.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo2;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: a well-formed message can have zero or one of this field (but not more than one).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo2;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: this field can be repeated any number of times (including zero) in a well-formed message. The order of the repeated values will be preserved.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">你所指定的消息字段必须是如下之一：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo10"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：一个格式良好的消息一定要含有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">1</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个这种字段。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo10"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：一个格式良好的消息可以有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">1</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">个这种字段（但不超过</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">1</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">个）。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo10"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：在一个格式良好的消息中，这种字段可以重复任意多次（包括</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">次）。重复的值的顺序会被保留。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（译者注：这一段内容我不太理解，因为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Google</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">提供的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">示例文件并没有按这个说法来编写</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">&hellip;</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">For historical reasons,&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">repeated</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;fields of basic numeric types aren&#39;t encoded as efficiently as they could be. New code should use the special option&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">[packed=true]</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;to get a more efficient encoding. For example:</span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">由于历史原因，基本数值类型的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的字段并没有被尽可能地高效编码。在新的代码（译者注：这里是指</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件的内容）中，用户应该使用特殊选项</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">[packed=true]</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">来保证更高效的编码。例如：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">repeated int32 samples = 4 [packed=true];<o:p></o:p></span></p>
</div>
<div style="mso-element:para-border-div;border-top:solid #FFCC33 1.0pt;
border-left:none;border-bottom:solid #FFCC33 1.0pt;border-right:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:2.0pt 0cm 2.0pt 0cm;background:#EFEFEF"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
		<b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Required Is Forever</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;You should be very careful about marking fields as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">. If at some point you wish to stop writing or sending a required field, it will be problematic to change the field to an optional field &ndash; old readers will consider messages without this field to be incomplete and may reject or drop them unintentionally. You should consider writing application-specific custom validation routines for your buffers instead. Some engineers at Google have come to the conclusion that using&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;does more harm than good; they prefer to use only</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">. However, this view is not universal.<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">是永久性的：在把一个字段标识为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的时候，你应该特别小心。如果在某些情况下你不想写入或者发送一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的字段，那么将该字段更改为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">可能会遇到问题&mdash;&mdash;旧版本的读者（译者注：即读取、解析消息的一方）会认为不含该字段的消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）是不完整的，从而有可能会拒绝解析。在这种情况下，你应该考虑编写特别针对于应用程序的、自定义的消息校验函数。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Google</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的一些工程师得出了一个结论：使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">弊多于利；他们更愿意使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">而不是</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">。当然，这个观点并不具有普遍性。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span>&nbsp;</b><b><span lang="EN-US" style="font-size: 15pt; font-family: Helvetica, sans-serif; ">Adding More Message Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">添加更多消息类型</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Multiple message types can be defined in a single&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file. This is useful if you are defining multiple related messages &ndash; so, for example, if you wanted to define the reply message format that corresponds to your&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;message type, you could add it to the same&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件中可以定义多个消息类型。在定义多个相关的消息的时候，这一点特别有用&mdash;&mdash;例如，如果你想定义与你的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">消息类型对应的回复消息格式的话，你可以将它添加到相同的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Adding Comments </span></b><b><span style="font-size:
15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">添加注释</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">To add comments to your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;files, use C/C++-style&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">//</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;syntax.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">向</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件添加注释，可以使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">C/C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">风格的双斜杠（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">//</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">语法格式。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;// Which page number do we want?<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3;// Number of results to return per page.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">What&#39;s Generated From Your</span></b><b><span lang="EN-US" style="font-size:15.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span></b><b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">? </span></b><b><span style="font-size:15.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">从你的</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b><span style="font-size:
15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">文件生成了什么？</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When you run the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">protocol buffer compiler</span></a>&nbsp;on a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, the compiler generates the code in your chosen language you&#39;ll need to work with the message types you&#39;ve described in the file, including getting and setting field values, serializing your messages to an output stream, and parsing your messages from an input stream.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">当你对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件运行</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">编译器（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">protocol buffer compiler</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）的时候，编译器生成你所选择的语言的代码，这些代码可以操作你在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中定义的消息类型，包括获取、设置字段值，将你的消息序列化到一个输出流中，以及从一个输入流中解析你的消息。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For&nbsp;<b>C++</b>, the compiler generates a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.h</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.cc</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file from each&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, with a class for each message type described in your file.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For&nbsp;<b>Java</b>, the compiler generates a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.java</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file with a class for each message type, as well as a special&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Builder</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;classes for creating message class instances.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说，编译器为每一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件生成了一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.h</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件和一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.cc</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件中的每一个消息有一个对应的类。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说，编译器为每一个消息类型生成了一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.java</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件，以及一个特殊的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Builder</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类（这个类是用来创建消息类接口的）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Python</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;is a little different &ndash; the Python compiler generates a module with a static descriptor of each message type in your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, which is then used with a&nbsp;<i>metaclass</i>&nbsp;to create the necessary Python data access class at runtime.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can find out more about using the APIs for each language by following the tutorial for your chosen language. For even more API details, see the relevant&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">API reference</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说，有点不一样&mdash;&mdash;</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">编译器为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件中的每个消息类型生成一个模型，其含有一个静态描述符（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">static descriptor</span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:black;
mso-font-kerning:0pt">，</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">译者注：没用过</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，不清楚这样翻译正确与否），该模型与一个元类（</span></b><i><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">metaclass</span></i><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）在运行时（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">runtime</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）被用来创建必需的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">数据访问类。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以从每种语言的教程中找到更多使用使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">API</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的方法。如欲查看更详细的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">API</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">信息，请阅相关的文章</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">API reference</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">。</span></b><span style="font-family: Helvetica, sans-serif; font-size: 12pt; line-height: 15pt; ">&nbsp;</span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Scalar Value Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">标量数值类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A scalar message field can have one of the following types &ndash; the table shows the type specified in the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file, and the corresponding type in the automatically generated class:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">一个标量消息字段可以含有一个如下的类型&mdash;&mdash;该表格展示了定义于</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中的类型，以及与之对应的、在自动生成的访问类中定义的类型：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="width:97.02%;margin-left:9.0pt;border-collapse:collapse;border:none;
 mso-border-alt:solid #BBBBBB .75pt;mso-yfti-tbllook:1184" width="97%"></p>
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  mso-border-alt:solid #BBBBBB .75pt;background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">.proto Type<o:p></o:p></span></b></p>
</td>
<td style="width:70.08%;border:solid #BBBBBB 1.0pt;
  border-left:none;mso-border-left-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Notes<o:p></o:p></span></b></p>
</td>
<td style="width:10.2%;border:solid #BBBBBB 1.0pt;
  border-left:none;mso-border-left-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">C++ Type<o:p></o:p></span></b></p>
</td>
<td style="width:11.22%;border:solid #BBBBBB 1.0pt;
  border-left:none;mso-border-left-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Java Type<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">double<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"><br />
				&nbsp;</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">double<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">double<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">float<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"><br />
				&nbsp;</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">float<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">float<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:3">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Inefficient for encoding negative numbers &ndash; if your field is likely to have negative values, use sint32 instead.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
  mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
  mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
  mso-font-kerning:0pt">使用可变长编码方式。编码负数时不够高效&mdash;&mdash;如果你的字段可能含有负数，那么请使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">sint32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:4">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Inefficient for encoding negative numbers &ndash; if your field is likely to have negative values, use sint64 instead.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。编码负数时不够高效&mdash;&mdash;如果你的字段可能含有负数，那么请使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">sint64</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:5">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:6">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:7">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sint32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。有符号的整型值。编码时比通常的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">int32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:8">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sint64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。有符号的整型值。编码时比通常的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">int64</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:9">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">fixed32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always four bytes. More efficient than uint32 if values are often greater than 2<sup>28</sup>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">4</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。如果数值总是比总是比</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt">2<sup>28</sup></span><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">大的话，这个类型会比</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">uint32</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:10">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">fixed64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always eight bytes. More efficient than uint64 if values are often greater than 2<sup>56</sup>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">8</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。如果数值总是比总是比</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt">2<sup>56</sup></span><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">大的话，这个类型会比</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">uint64</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:11">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sfixed32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always four bytes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">4</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:12">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sfixed64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always eight bytes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">8</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:13">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">bool<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"><br />
				&nbsp;</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">bool<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">boolean<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:14">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">string<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">A string must always contain UTF-8 encoded or 7-bit ASCII text.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">一个字符串必须是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">UTF-8</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">编码或者</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">7-bit ASCII</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">编码的文本。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">string<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">String<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:15;mso-yfti-lastrow:yes">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">bytes<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">May contain any arbitrary sequence of bytes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:
  宋体;color:#3333FF;mso-font-kerning:0pt">可能包含任意顺序的字节数据。<span lang="EN-US"><o:p></o:p></span></span></b></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">string<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">ByteString<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can find out more about how these types are encoded when you serialize your message in&nbsp;<a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">Protocol Buffer Encoding</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<sup><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">[1]</span></sup><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;In Java, unsigned 32-bit and 64-bit integers are represented using their signed counterparts, with the top bit simply being stored in the sign bit.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以在文章</span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">Protocol Buffer Encoding</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">中，找到更多&ldquo;序列化消息时各种类型如何编码&rdquo;的信息。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<sup><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">[1]</span></sup><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">在</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">中，无符号</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">32</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">位和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">64</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">位整型以它们对应的有符号类型来表示。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Optional Fields And Default Values </span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Optional</span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">的字段和默认值</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">As mentioned above, elements in a message description can be labeled&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. A well-formed message may or may not contain an optional element. When a message is parsed, if it does not contain an optional element, the corresponding field in the parsed object is set to the default value for that field. The default value can be specified as part of the message description. For example, let&#39;s say you want to provide a default value of 10 for a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">SearchRequest</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&#39;s&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result_per_page</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;value.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如上所述，消息描述中的一个元素可以被标记为&ldquo;可选的&rdquo;（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）。一个格式良好的消息可以包含一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">的元素，也可以不包含。当解析一个消息的时候，如果它不包含</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">的元素，那么解析出来的对象中的对应字段就被置为默认值。默认值可以在消息描述文件中指定。例如，要为</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result_per_page</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">字段指定默认值</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">10</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，可以这样做：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">optional int32 result_per_page = 3 [default = 10];<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If the default value is not specified for an optional element, a type-specific default value is used instead: for strings, the default value is the empty string. For bools, the default value is false. For numeric types, the default value is zero. For enums, the default value is the first value listed in the enum&#39;s type definition.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如果没有为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的元素指定默认值，</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">那么就会使用与特定类型相关的默认值：对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来说，默认值是空字符串。对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">bool</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来说，默认值是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">false</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。对数值类型来说，默认值是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。对枚举来说，默认值是枚举类型定义中的第一个值。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Enumerations </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">枚举</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When you&#39;re defining a message type, you might want one of its fields to only have one of a pre-defined list of values. For example, let&#39;s say you want to add a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">corpus</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;field for each&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, where the corpus can be&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">UNIVERSAL</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">WEB</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">IMAGES</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">LOCAL</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">NEWS</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">PRODUCTS</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;or&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">VIDEO</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. You can do this very simply by adding an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;to your message definition - a field with an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;type can only have one of a specified set of constants as its value (if you try to provide a different value, the parser will treat it like an unknown field). In the following example we&#39;ve added an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">with all the possible values, and a field of type&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">当你定义一个消息类型的时候，你可能想为一个字段指定某&ldquo;预定义值序列&rdquo;（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">pre-defined list of values</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）中的一个值。例如，假设你想为每一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息添加一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">字段，而</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的值可能是</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">UNIVERSAL</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">WEB</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">IMAGES</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">LOCAL</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">NEWS</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">PRODUCTS</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">或</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">VIDEO</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">中的一个。你可以很容易地实现这一点：通过向你的消息定义中添加一个枚举（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）就可以了。一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类型的字段只能用指定的常量集（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">specified set of constants</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）中的一个值作为其值（如果你尝试指定不同的值，解析器就会把它当作一个未知的字段来对待）。在下面的例子中，我们已经添加了一个叫做</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的枚举（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）&mdash;&mdash;它含有所有可能的值&mdash;&mdash;以及一个类型为</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3 [default = 10];<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>enum Corpus {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>UNIVERSAL = 0;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>WEB = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>IMAGES = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>LOCAL = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>NEWS = 4;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>PRODUCTS = 5;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>VIDEO = 6;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Corpus corpus = 4 [default = UNIVERSAL];<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Enumerator constants must be in the range of a 32-bit integer. Since&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;values use varint encoding on the wire, negative values are inefficient and thus not recommended. You can define&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">s within a message definition, as in the above example, or outside &ndash; these&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">s can be reused in any message definition in your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file. You can also use an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;type declared in one message as the type of a field in a different message, using the syntax&nbsp;</span><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">MessageType</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>EnumType</i></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When you run the protocol buffer compiler on a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;that uses an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, the generated code will have a corresponding&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;for Java or C++, or a special&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">EnumDescriptor</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;class for Python that&#39;s used to create a set of symbolic constants with integer values in the runtime-generated class.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For more information about how to work with message&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">s in your applications, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">generated code guide</span></a>&nbsp;for your chosen language.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">枚举常量必须在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">32</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">位整型值的范围内。因为</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">值是使用可变编码方式的，对负数不够高效，因此不推荐在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">enum</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">中使用负数。如上例所示，你可以在一个消息定义的内部或外部定义枚举&mdash;&mdash;这些枚举可以在你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中的任何消息定义里重用。你也可以在一个消息中声明一个枚举类型，而在另一个不同的消息中使用它&mdash;&mdash;采用</span></b><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">MessageType</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>EnumType</i></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的语法格式。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">当你对一个使用了枚举的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件运行</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">编译器的时候，生成的代码中将有一个对应的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">（对</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说），或者一个特殊的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">EnumDescriptor</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类（对</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Python</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">来说），它被用来在运行时生成的类中创建一系列的整型值符号常量（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">symbolic constants</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">关于如何在你的应用程序的消息中使用枚举的更多信息，请查看你所选择的语言的</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">generated code guide</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Using Other Message Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">使用其他消息类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can use other message types as field types. For example, let&#39;s say you wanted to include&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;messages in each&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">message &ndash; to do this, you can define a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;message type in the same&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;and then specify a field of type&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;in&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以将其他消息类型用作字段类型。例如，假设你想在每一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息中包含</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息，你可以这样做&mdash;&mdash;在相同的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中定义一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息类型，然后在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息中指定一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类型的字段：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated Result result = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Result {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string url = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional string title = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated string snippets = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Importing Definitions </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">导入定义</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In the above example, the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;message type is defined in the same file as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;&ndash; what if the message type you want to use as a field type is already defined in another&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file?<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">在上面的例子中，</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">消息类型与</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchResponse</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是定义在同一文件中的&mdash;&mdash;如果你要使用的消息类型已经在其他</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中已经定义过了呢？</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can use definitions from other&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;files by&nbsp;<i>importing</i>&nbsp;them. To import another&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&#39;s definitions, you add an import statement to the top of your file:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以通过导入（</span></b><i><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">importing</span></i><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）其他</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中的定义来使用它们。要导入其他</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件的定义，你需要在你的文件中添加一个导入声明：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">import &quot;myproject/other_protos.proto&quot;;<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The protocol compiler searches for imported files in a set of directories specified on the protocol compiler command line using the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">-I</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">/</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">--import_path</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;flag. If no flag was given, it looks in the directory in which the compiler was invoked.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">然后，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">protocol</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">编译器就会在一系列目录中查找需要被导入的文件，这些目录通过</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">protocol</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">编译器的命令行参数</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">-I</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">/</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">--import_path</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">指定。如果不提供参数，编译器就在其调用目录下查找。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Nested Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">嵌套类型</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can define and use message types inside other message types, as in the following example &ndash; here the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;message is defined inside the </span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;message:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以在其他消息类型中定义、使用消息类型，在下面的例子中，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息就定义在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息内：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>message Result {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>required string url = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional string title = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>repeated string snippets = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated Result result = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If you want to reuse this message type outside its parent message type, you refer to it as&nbsp;</span><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Parent</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>Type</i></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如果你想在它的父消息类型的外部重用这个消息类型，你需要以</span></b><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Parent</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>Type</i></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的形式使用它：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SomeOtherMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional SearchResponse.Result result = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can nest messages as deeply as you like:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以将消息嵌套任意多层：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Outer {<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>// Level 0<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>message MiddleAA {<span style="mso-spacerun:yes">&nbsp; </span>// Level 1<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>message Inner {<span style="mso-spacerun:yes">&nbsp;&nbsp; </span>// Level 2<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>required int64 ival = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>optional bool<span style="mso-spacerun:yes">&nbsp; </span>booly = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>message MiddleBB {<span style="mso-spacerun:yes">&nbsp; </span>// Level 1<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>message Inner {<span style="mso-spacerun:yes">&nbsp;&nbsp; </span>// Level 2<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>required int32 ival = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>optional bool<span style="mso-spacerun:yes">&nbsp; </span>booly = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Groups </span></b><b><span style="font-size:15.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">组</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Note that this feature is deprecated and should not be used when creating new message types &ndash; use nested message types instead.<o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:red;
mso-font-kerning:0pt">注意：这个特性已经被弃用了，在创建新的消息类型的时候，不应该再使用它&mdash;&mdash;你应该使用嵌套消息类型来代替它。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:red;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Groups are another way to nest information in your message definitions. For example, another way to specify a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:
&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;containing a number of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">s is as follows:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">&ldquo;组&rdquo;是在你的消息定义中嵌套信息的另一种方法。例如，在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">中包含若干</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的另一种方法是</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"> </span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated group Result = 1 {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>required string url = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional string title = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>repeated string snippets = 4;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A group simply combines a nested message type and a field into a single declaration. In your code, you can treat this message just as if it had a</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;type field called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;(the latter name is converted to lower-case so that it does not conflict with the former). Therefore, this example is exactly equivalent to the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:
&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;above, except that the message has a different&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">wire format</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">一个&ldquo;组&rdquo;只是简单地将一个嵌套消息类型和一个字段捆绑到一个单独的声明中。在你的代码中，你可以把它看成是含有一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类型、名叫</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段的消息（后面的名字被转换成了小写，所以它不会与前面的冲突）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">因此，除了数据传输格式（</span></b><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">wire format</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）不同之外，这个例子与上面的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">例子是完全等价的。</span></b><span style="font-family: Helvetica, sans-serif; font-size: 12pt; line-height: 15pt; ">&nbsp;</span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Updating A Message Type </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">更新一个消息类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If an existing message type no longer meets all your needs &ndash; for example, you&#39;d like the message format to have an extra field &ndash; but you&#39;d still like to use code created with the old format, don&#39;t worry! It&#39;s very simple to update message types without breaking any of your existing code. Just remember the following rules:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如果一个已有的消息无法再满足你的需求&mdash;&mdash;例如，你想在消息中添加一个额外的字段&mdash;&mdash;但是你同时还想让为旧版本写的代码仍然可用，不用怕！更新消息而不破坏已有代码是非常简单的。只要你记住下面的规则：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Don&#39;t change the numeric tags for any existing fields.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Any new fields that you add should be&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;or&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. This means that any messages serialized by code using your &quot;old&quot; message format can be parsed by your new generated code, as they won&#39;t be missing any&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;elements. You should set up sensible&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">default values</span></a>&nbsp;for these elements so that new code can properly interact with messages generated by old code. Similarly, messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing. However, the unknown fields are not discarded, and if the message is later serialized, the unknown fields are serialized along with it &ndash; so if the message is passed on to new code, the new fields are still available. Note that preservation of unknown fields is currently not available for Python.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Non-required fields can be removed, as long as the tag number is not used again in your updated message type (it may be better to rename the field instead, perhaps adding the prefix &quot;OBSOLETE_&quot;, so that future users of your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;can&#39;t accidentally reuse the number).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A non-required field can be converted to an&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extension</span></a>&nbsp;and vice versa, as long as the type and number stay the same.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">int32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">int64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bool</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;are all compatible &ndash; this means you can change a field from one of these types to another without breaking forwards- or backwards-compatibility. If a number is parsed from the wire which doesn&#39;t fit in the corresponding type, you will get the same effect as if you had cast the number to that type in C++ (e.g. if a 64-bit number is read as an int32, it will be truncated to 32 bits).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sint32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">sint64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;are compatible with each other but are&nbsp;<i>not</i>&nbsp;compatible with the other integer types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">string</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bytes</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;are compatible as long as the bytes are valid UTF-8.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Embedded messages are compatible with&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">bytes</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;if the bytes contain an encoded version of the message.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">fixed32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;is compatible with&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">sfixed32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">fixed64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;with&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">sfixed64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">不要更改任何已有的字段的数值标识（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">你添加的任何字段都必须是</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的。这就意味着任何使用你的&ldquo;旧&rdquo;消息格式的代码序列化的消息可以被你的新代码所解析，因为它们不会丢掉任何</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">的元素。你应该为这些元素设置合理的默认值（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">default values</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">），这样新的代码就能够正确地与老代码生成的消息交互了。类似地，你的新代码创建的消息也能被你的老代码解析：老的二进制程序在解析的时候只是简单地将新字段忽略。然而，未知的字段是没有被抛弃的，此后，如果消息被序列化，未知的字段会随之一起被序列化&mdash;&mdash;所以，如果消息传到了新代码那里，则新的字段仍然可用。注意：对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">来说，对未知字段的保留策略是无效的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">非</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段可以移除&mdash;&mdash;只要它们的标识号（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">tag number</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">）在你的新消息类型中不再使用（更好的做法可能是重命名那个字段，例如在字段前添加&ldquo;</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">OBSOLETE_</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">&rdquo;前缀，那样的话，你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件的用户将来就不会无意中重新使用了那些不该使用的标识号）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">一个非</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段可以转换为一个扩展（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extension</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">），反之亦然&mdash;&mdash;只要它的类型和标识号保持不变。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">int32</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">int64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bool</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">是全部兼容的，这意味着你可以将这些类型中的一个转换为另外一个，而不会破坏前向、后向的兼容性。如果解析出来的数字与对应的类型不相符，那么结果就像在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">中对它进行了强制类型转换一样（例如，如果把一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">64</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">位数字当作</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">int32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">来读取，那么它就会被截断为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">位的数字）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">sint32</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sint64</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是互相兼容的，但是它们与其他整数类型</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:red;mso-font-kerning:0pt">不兼容</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">string</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bytes</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">是兼容的&mdash;&mdash;只要</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bytes</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">是有效的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">UTF-8</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">编码。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">嵌套消息与</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bytes</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">是兼容的&mdash;&mdash;只要</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">bytes</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">包含该消息的一个编码过的版本。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">fixed32</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">与</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sfixed32</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是兼容的，</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">fixed64</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">与</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sfixed64</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是兼容的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Extensions </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">扩展</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Extensions let you declare that a range of field numbers in a message are available for third-party extensions. Other people can then declare new fields for your message type with those numeric tags in their own&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;files without having to edit the original file. Let&#39;s look at an example:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">通过扩展，你可以将一个范围内的字段标识号声明为可被第三方扩展所用。然后，其他人就可以在他们自己的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中为你的消息类型声明新的字段，而不必去编辑原始文件了。让我们看个例子：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// ...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extensions 100 to 199;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This says that the range of field numbers [100, 199] in&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;is reserved for extensions. Other users can now add new fields to&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;in their own</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;files that import your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, using tags within your specified range &ndash; for example:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这个例子表明：在消息</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">中，范围</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">[100,199]</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">之内的字段标识号被保留为扩展用。现在，其他人就可以在他们自己的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中添加新字段到</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">里了，但是添加的字段标识号要在指定的范围内&mdash;&mdash;例如：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 bar = 126;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This says that&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;now has an optional&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">int32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;field called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When your user&#39;s&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;messages are encoded, the wire format is exactly the same as if the user defined the new field inside&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. However, the way you access extension fields in your application code is slightly different to accessing regular fields &ndash; your generated data access code has special accessors for working with extensions. So, for example, here&#39;s how you set the value of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;in C++:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这个例子表明：消息</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">现在有一个名为</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bar</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt"> int32</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">字段。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">当用户的</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">消息被编码的时候，数据的传输格式与用户在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">里定义新字段的效果是完全一样的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">然而，你在程序代码中访问扩展字段的方法与访问普通的字段稍有不同&mdash;&mdash;你生成的数据访问代码为扩展准备了特殊的访问函数来访问它。例如，下面是你如何在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">中设置</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的值：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:black;
mso-font-kerning:0pt">Foo foo</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#666600;mso-font-kerning:
0pt">;</span><br />
		<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:black;mso-font-kerning:0pt">foo</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:black;
mso-font-kerning:0pt">SetExtension</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#666600;
mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:black;mso-font-kerning:
0pt">bar</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#006666;
mso-font-kerning:0pt">15</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#666600;mso-font-kerning:
0pt">);</span><span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt"><o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Similarly, the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;class defines templated accessors&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">HasExtension()</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">ClearExtension()</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">GetExtension()</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">MutableExtension()</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">, and</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">AddExtension()</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. All have semantics matching the corresponding generated accessors for a normal field. For more information about working with extensions, see the generated code reference for your chosen language.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Note that extensions can be of any field type, including message types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">类似地，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Foo</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类也定义了模板函数</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">HasExtension()</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">ClearExtension()</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">GetExtension()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">MutableExtension()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">，以及</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">AddExtension()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">。这些函数的语义都与对应的普通字段的访问函数相符。要查看更多使用扩展的信息，请参考相应语言的代码生成指南。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">注意：扩展可以是任何字段类型，包括消息类型。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Nested Extensions </span></b><b><span style="font-size:
15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">嵌套的扩展</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can declare extensions in the scope of another type:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">你可以在另一个类型的范围内声明扩展：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Baz {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional int32 bar = 126;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In this case, the C++ code to access this extension is:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在此例中，访问此扩展的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">代码是：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo foo;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">foo.SetExtension(Baz::bar, 15);<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In other words, the only effect is that&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;is defined within the scope of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">换句话说，唯一的效果就是</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:blue;mso-font-kerning:0pt">bar</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">被定义在</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:blue;mso-font-kerning:0pt">Baz</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的范围内。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border-top:solid #AA0033 1.0pt;
border-left:none;border-bottom:solid #AA0033 1.0pt;border-right:none;
mso-border-top-alt:solid #AA0033 .75pt;mso-border-bottom-alt:solid #AA0033 .75pt;
padding:2.0pt 0cm 2.0pt 0cm;background:#EFEFEF"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #AA0033 .75pt;mso-border-bottom-alt:solid #AA0033 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
		<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">This is a common source of confusion: Declaring an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">extend</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;block nested inside a message type&nbsp;</span><b><i><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#AA0033;mso-font-kerning:0pt">does not</span></i></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;imply any relationship between the outer type and the extended type. In particular, the above example&nbsp;</span><b><i><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#AA0033;mso-font-kerning:0pt">does not</span></i></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;mean that&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;is any sort of subclass of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. All it means is that the symbol&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;is declared inside the scope of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">; it&#39;s simply a static member.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #AA0033 .75pt;mso-border-bottom-alt:solid #AA0033 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">这是个引起混淆的来源：在一个消息类型中嵌套声明一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">extend</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">块并</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#C00000;mso-font-kerning:0pt">没有</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">暗示外部类型（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">outer type</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）与扩展类型（</span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">extended type</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">）之间有任何联系。特别地，上面的例子</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#C00000;mso-font-kerning:0pt">没有</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">表明</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">是</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">的任何类型的子类。它所表明的仅仅是：符号</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">是在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的内部声明的；它只是一个静态成员罢了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A common pattern is to define extensions inside the scope of the extension&#39;s field type &ndash; for example, here&#39;s an extension to&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;of type&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, where the extension is defined as part of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">一个通常的设计模式就是：在扩展的字段类型的范围内定义该扩展&mdash;&mdash;例如，下面是一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的扩展（该扩展是</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类型的），其中，扩展被定义为了</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的一部分：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">（译者注：这样的定义形式确很容易引起混淆，请继续往下看，以帮助你消除这种混淆）</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Baz {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional Baz foo_ext = 127;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">However, there is no requirement that an extension with a message type be defined inside that type. You can also do this:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">然而，并没有强制要求一个消息类型的扩展一定要定义在那个消息中。你也可以这样做：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Baz {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">// This can even be in a different file.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz foo_baz_ext = 127;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In fact, this syntax may be preferred to avoid confusion. As mentioned above, the nested syntax is often mistaken for subclassing by users who are not already familiar with extensions.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">事实上，这种语法格式更能防止引起混淆。正如上面所提到的，嵌套的语法通常被错误地认为有子类化的关系&mdash;&mdash;尤其是对那些还不熟悉扩展的用户来说。</span></b></p>
<p style="text-align: left;">
	&nbsp;</p>
<p></p>
<h2>
	&nbsp;</h2>
<p><span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] Protocol Buffer Basics: C++中文翻译（Google Protocol Buffers中文教程）</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-protocol-buffer-basics-c%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-protocol-buffer-basics-c%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 05:04:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Basics]]></category>
		<category><![CDATA[Buffer]]></category>
		<category><![CDATA[Google Protocol Buffers]]></category>
		<category><![CDATA[Protocol]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[翻译]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=280</guid>

					<description><![CDATA[<h2>
	<b><span style="font-size:20.5pt;Helvetica&#34;,&#34;sans-serif&#34;;
color:black;">Protocol Buffer Basics: C++</span></b><b><span style="font-size:20.5pt;color:blue;">（</span></b><b><span style="font-size:20.5pt;Helvetica&#34;,&#34;sans-serif&#34;;color:blue;">Protocol Buffer</span></b><b><span style="font-size:20.5pt;
color:blue;">基础：</span></b><b><span style="font-size:20.5pt;Helvetica&#34;,&#34;sans-serif&#34;;color:blue;">C++</span></b><b><span style="font-size:20.5pt;color:blue;">篇）</span></b></h2>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
	<font class="Apple-style-span" color="#0000FF">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（</font><strong><span style="color:#ff0000;"><font class="Apple-style-span">转载需注明出处</font></span></strong><font class="Apple-style-span" color="#0000FF">：本文来自learnhard的博客：<span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; " target="_blank" rel="noopener noreferrer">http://www.codelast.com/</a>&#160;</span>&#38;&#160;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</font></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
<span id="more-280"></span></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;">
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt">This tutorial provides a basic C++ programmer&#39;s introduction to working with protocol buffers. By walking through creating a simple example application, it shows you how to<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l18 level1 lfo1;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt">Define message formats in a&#160;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&#34;Courier New&#34;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">.proto</span></p></div>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-protocol-buffer-basics-c%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/" class="read-more">Read More </a>]]></description>
										<content:encoded><![CDATA[<h2>
	<b><span style="font-size:20.5pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Protocol Buffer Basics: C++</span></b><b><span style="font-size:20.5pt;color:blue;">（</span></b><b><span style="font-size:20.5pt;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;">Protocol Buffer</span></b><b><span style="font-size:20.5pt;
color:blue;">基础：</span></b><b><span style="font-size:20.5pt;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;">C++</span></b><b><span style="font-size:20.5pt;color:blue;">篇）</span></b></h2>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
	<font class="Apple-style-span" color="#0000FF">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（</font><strong><span style="color:#ff0000;"><font class="Apple-style-span">转载需注明出处</font></span></strong><font class="Apple-style-span" color="#0000FF">：本文来自learnhard的博客：<span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; " target="_blank" rel="noopener noreferrer">http://www.codelast.com/</a>&nbsp;</span>&amp;&nbsp;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</font></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
<span id="more-280"></span></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This tutorial provides a basic C++ programmer&#39;s introduction to working with protocol buffers. By walking through creating a simple example application, it shows you how to<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l18 level1 lfo1;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Define message formats in a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l18 level1 lfo1;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Use the protocol buffer compiler.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l18 level1 lfo1;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Use the C++ protocol buffer API to write and read messages.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">本教程提供了面向</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">程序员的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的基本介绍。通过创建一个简单的示例程序，它教你如何：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo12"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">定义</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件的消息格式。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo12"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的编译器。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo12"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protoco buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++ API</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">来读写消息。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This isn&#39;t a comprehensive guide to using protocol buffers in C++. For more detailed reference information, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html"><span style="color:#0000CC">Protocol Buffer Language Guide</span></a>, the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/index.html"><span style="color:#0000CC">C++ API Reference</span></a>, the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp-generated.html"><span style="color:#0000CC">C++ Generated Code Guide</span></a>, and the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">Encoding Reference</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">本文并不是关于</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">使用的全面教程。要查看更详细的参考资料，请阅如下文章：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html"><span style="color:#0000CC">Protocol Buffer Language Guide</span></a></span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:black;
mso-font-kerning:0pt">，</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/index.html"><span style="color:#0000CC">C++ API Reference</span></a></span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:black;
mso-font-kerning:0pt">，</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp-generated.html"><span style="color:#0000CC">C++ Generated Code Guide</span></a></span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:black;
mso-font-kerning:0pt">，</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">以及</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">&nbsp;</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">Encoding Reference</span></a></span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:black;
mso-font-kerning:0pt">。</span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Why Use Protocol Buffers? </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">为什么要使用</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">？</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The example we&#39;re going to use is a very simple &quot;address book&quot; application that can read and write people&#39;s contact details to and from a file. Each person in the address book has a name, an ID, an email address, and a contact phone number.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">How do you serialize and retrieve structured data like this? There are a few ways to solve this problem:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l3 level1 lfo2;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The raw in-memory data structures can be sent/saved in binary form. Over time, this is a fragile approach, as the receiving/reading code must be compiled with exactly the same memory layout, endianness, etc. Also, as files accumulate data in the raw format and copies of software that are wired for that format are spread around, it&#39;s very hard to extend the format.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l3 level1 lfo2;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can invent an ad-hoc way to encode the data items into a single string &ndash; such as encoding 4 ints as &quot;12:3:-23:67&quot;. This is a simple and flexible approach, although it does require writing one-off encoding and parsing code, and the parsing imposes a small run-time cost. This works best for encoding very simple data.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l3 level1 lfo2;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Serialize the data to XML. This approach can be very attractive since XML is (sort of) human readable and there are binding libraries for lots of languages. This can be a good choice if you want to share data with other applications/projects. However, XML is notoriously space intensive, and encoding/decoding it can impose a huge performance penalty on applications. Also, navigating an XML DOM tree is considerably more complicated than navigating simple fields in a class normally would be.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol buffers are the flexible, efficient, automated solution to solve exactly this problem. With protocol buffers, you write a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;description of the data structure you wish to store. From that, the protocol buffer compiler creates a class that implements automatic encoding and parsing of the protocol buffer data with an efficient binary format. The generated class provides getters and setters for the fields that make up a protocol buffer and takes care of the details of reading and writing the protocol buffer as a unit. Importantly, the protocol buffer format supports the idea of extending the format over time in such a way that the code can still read data encoded with the old format.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">（这一段不翻译了，没意思）</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Where to Find the Example Code </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在哪可以找到示例代码</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The example code is included in the source code package, under the &quot;examples&quot; directory.&nbsp;<a href="http://code.google.com/p/protobuf/downloads/"><span style="color:#0000CC">Download it here.</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">示例代码包含在源代码包中的&ldquo;</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">examples</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">&rdquo;目录下。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><a href="http://code.google.com/p/protobuf/downloads/"><span lang="EN-US" style="font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica"><span lang="EN-US">点<span lang="EN-US">击<span lang="EN-US">此处下载</span></span></span></span></a></span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Defining Your Protocol Format </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">定义你自己的协议格式</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">To create your address book application, you&#39;ll need to start with a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file. The definitions in a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file are simple: you add a&nbsp;<i>message</i>&nbsp;for each data structure you want to serialize, then specify a name and a type for each field in the message. Here is the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file that defines your messages,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">addressbook.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">要创建你的地址薄应用程序，你需要从编写一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件开始。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件的定义是比较简单的：为每一个你需要序列化的数据结构添加一个消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">），然后为消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）中的每一个字段（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">field</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）指定一个名字和一个类型。下面就是一个定义你的多个消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">messages</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）的文件</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">addressbook.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">package tutorial;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">message Person {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string name = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required int32 id = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional string email = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>enum PhoneType {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>MOBILE = 0;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>HOME = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>WORK = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>message PhoneNumber {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>required string number = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional PhoneType type = 2 [default = HOME];<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated PhoneNumber phone = 4;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">message AddressBook {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated Person person = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">}<o:p></o:p></span></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">As you can see, the syntax is similar to C++ or Java. Let&#39;s go through each part of the file and see what it does.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">正如你所看到的一样，该语法类似于</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的语法。让我们依次来看看文件的每一部分的作用。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">The&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">.proto</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;file starts with a package declaration, which helps to prevent naming conflicts between different projects. In C++, your generated classes will be placed in a namespace matching the package name.</span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件以一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">package</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">声明开始。这个声明是为了防止不同项目之间的命名冲突。对应到</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">中去，你用这个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件生成的类将被放置在一个与</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">package</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">名相同的命名空间中。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">Next, you have your message definitions. A message is just an aggregate containing a set of typed fields. Many standard simple data types are available as field types, including&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">bool</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">,&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">int32</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">,&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">float</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">,&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">double</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">, and&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">string</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">. You can also add further structure to your messages by using other message types as field types &ndash; in the above example the&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">Person</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;message contains&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">PhoneNumber</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;messages, while the&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">AddressBook</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;message contains&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">Person</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;messages. You can even define message types nested inside other messages &ndash; as you can see, the&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">PhoneNumber</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;type is defined inside&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">Person</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">. You can also define&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">enum</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;types if you want one of your fields to have one of a predefined list of values &ndash; here you want to specify that a phone number can be one of&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">MOBILE</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">,&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">HOME</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">, or&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">WORK</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">.</span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">再往下看，就是若干消息（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）定义了。一个消息就是某些类型的字段的集合。许多标准的、简单的数据类型都可以用作字段类型，包括</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">bool</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">int32</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">float</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">double</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，以及</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">。你也可以使用其他的消息（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）类型来作为你的字段类型&mdash;&mdash;在上面的例子中，消息</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Person</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">就是一个被用作字段类型的例子。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The &quot; = 1&quot;, &quot; = 2&quot; markers on each element identify the unique &quot;tag&quot; that field uses in the binary encoding. Tag numbers 1-15 require one less byte to encode than higher numbers, so as an optimization you can decide to use those tags for the commonly used or repeated elements, leaving tags 16 and higher for less-commonly used optional elements. Each element in a repeated field requires re-encoding the tag number, so repeated fields are particularly good candidates for this optimization.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在每一项后面的、类似于&ldquo;</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">= 1</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">&rdquo;，&ldquo;</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">= 2</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">&rdquo;的标志指出了该字段在二进制编码中使用的唯一&ldquo;标识（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）&rdquo;。标识号</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">1~15</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">编码所需的字节数比更大的标识号使用的字节数要少</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">1</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个，所以，如果你想寻求优化，可以为经常使用或者重复的项采用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">1~15</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的标识（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">），其他经常使用的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">项采用&ge;</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">16</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的标识（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）。在重复的字段中，每一项都要求重编码标识号（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">tag number</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">），所以重复的字段特别适用于这种优化情况。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span><span style="font-family: Helvetica, sans-serif; font-size: 12pt; line-height: 15pt; ">Each field must be annotated with one of the following modifiers:</span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo3;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">: a value for the field must be provided, otherwise the message will be considered &quot;uninitialized&quot;. If&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">libprotobuf</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;is compiled in debug mode, serializing an uninitialized message will cause an assertion failure. In optimized builds, the check is skipped and the message will be written anyway. However, parsing an uninitialized message will always fail (by returning&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">false</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;from the parse method). Other than this, a required field behaves exactly like an optional field.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo3;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">: the field may or may not be set. If an optional field value isn&#39;t set, a default value is used. For simple types, you can specify your own default value, as we&#39;ve done for the phone number&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">type</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;in the example. Otherwise, a system default is used: zero for numeric types, the empty string for strings, false for bools. For embedded messages, the default value is always the &quot;default instance&quot; or &quot;prototype&quot; of the message, which has none of its fields set. Calling the accessor to get the value of an optional (or required) field which has not been explicitly set always returns that field&#39;s default value.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo3;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">: the field may be repeated any number of times (including zero). The order of the repeated values will be preserved in the protocol buffer. Think of repeated fields as dynamically sized arrays.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">每一个字段都必须用以下之一的修饰符来修饰：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo11"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:red;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：必须提供字段值，否则对应的消息就会被认为是&ldquo;未初始化的&rdquo;。如果</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">libprotobuf</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">是以</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">debug</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">模式编译的，序列化一个未初始化的消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）将会导致一个断言错误。在优化过的编译情况下（译者注：例如</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">release</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">），该检查会被跳过，消息会被写入。然而，解析一个未初始化的消息仍然会失败（解析函数会返回</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">false</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）。除此之外，一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的字段与一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的字段就没有区别了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo11"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:red;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：字段值指定与否都可以。如果没有指定一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的字段值，它就会使用默认值。对简单类型来说，你可以指定你自己的默认值，就像我们在上面的例子中对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">phone number</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">type</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">字段所做的一样。如果你不指定默认值，就会使用系统默认值：数据类型的默认值为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的默认值为空字符串，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">bool</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的默认值为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">false</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">。对嵌套消息（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）来说，其默认值总是消息的&ldquo;默认实例&rdquo;或&ldquo;原型&rdquo;，即：没有任何一个字段是指定了值的。调用访问类来取一个未显式指定其值的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">（或者</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）的字段的值，总是会返回字段的默认值。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo11"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:red;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：字段会重复</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">N</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">次（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">N</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">可以为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）。重复的值的顺序将被保存在</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">中。你只要将重复的字段视为动态大小的数组就可以了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border-top:solid #FFCC33 1.0pt;
border-left:none;border-bottom:solid #FFCC33 1.0pt;border-right:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:2.0pt 0cm 2.0pt 0cm;background:#EFEFEF"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
			<b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Required Is Forever</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;You should be very careful about marking fields as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">. If at some point you wish to stop writing or sending a required field, it will be problematic to change the field to an optional field &ndash; old readers will consider messages without this field to be incomplete and may reject or drop them unintentionally. You should consider writing application-specific custom validation routines for your buffers instead. Some engineers at Google have come to the conclusion that using&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;does more harm than good; they prefer to use only</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">. However, this view is not universal.<o:p></o:p></span></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">是永久性的：在把一个字段标识为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的时候，你应该特别小心。如果在某些情况下你不想写入或者发送一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的字段，那么将该字段更改为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">可能会遇到问题&mdash;&mdash;旧版本的读者（译者注：即读取、解析消息的一方）会认为不含该字段的消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）是不完整的，从而有可能会拒绝解析。在这种情况下，你应该考虑编写特别针对于应用程序的、自定义的消息校验函数。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Google</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的一些工程师得出了一个结论：使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">弊多于利；他们更愿意使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">而不是</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">。当然，这个观点并不具有普遍性。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">You&#39;ll find a complete guide to writing&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">.proto</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;files &ndash; including all the possible field types &ndash; in the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html"><span style="color:#0000CC">Protocol Buffer Language Guide</span></a>. Don&#39;t go looking for facilities similar to class inheritance, though &ndash; protocol buffers don&#39;t do that.</span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">你可以在</span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html"><span style="color:#0000CC">Protocol Buffer Language Guide</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">一文中找到编写</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件的完整指南（包括所有可能的字段类型）。但是，不要想在里面找到与类继承相似的特性，因为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">不是拿来做这个的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Compiling Your Protocol Buffers </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:black;
mso-font-kerning:0pt">编译你的</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">protocol buffers<o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Now that you have a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">, the next thing you need to do is generate the classes you&#39;ll need to read and write&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">AddressBook</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;(and hence&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">PhoneNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">) messages. To do this, you need to run the protocol buffer compiler&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">protoc</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;on your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo4;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
Helvetica;color:black;mso-font-kerning:0pt"><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">If you haven&#39;t installed the compiler,&nbsp;<a href="http://code.google.com/p/protobuf/downloads/"><span style="color:#0000CC">download the package</span></a>&nbsp;and follow the instructions in the README.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo4;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
Helvetica;color:black;mso-font-kerning:0pt"><span style="mso-list:Ignore">2.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Now run the compiler, specifying the source directory (where your application&#39;s source code lives &ndash; the current directory is used if you don&#39;t provide a value), the destination directory (where you want the generated code to go; often the same as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">$SRC_DIR</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">), and the path to your</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">. In this case, you...:<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA;
margin-left:29.25pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;
margin-bottom:7.2pt;margin-left:0cm;text-align:left;line-height:12.75pt;
mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">protoc -I=$SRC_DIR --cpp_out=$DST_DIR $SRC_DIR/addressbook.proto<o:p></o:p></span></p>
</p></div>
<p align="left" class="MsoNormal" style="margin-left:29.25pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Because you want C++ classes, you use the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">--cpp_out</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;option &ndash; similar options are provided for other supported languages.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This generates the following files in your specified destination directory:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l15 level1 lfo5;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">addressbook.pb.h</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, the header which declares your generated classes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l15 level1 lfo5;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">addressbook.pb.cc</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, which contains the implementation of your classes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在得到了一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件之后，下一步你就要生成可以读写</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">AddressBook</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">消息（当然也就包括了</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Person</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">以及</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">PhoneNumber</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">消息）的类了。此时你需要运行</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">编译器来编译你的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">1. </span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">如果你还没有安装该编译器，</span></b><u><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#0000CC;
mso-font-kerning:0pt">下载安装包</span></u><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">并参照</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">README</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件中的说明来安装</span></b><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:black;mso-font-kerning:0pt">。</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">2. </span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">安装了之后，就可以运行编译器了。指定源目录（即你的应用程序源代码所在的目录&mdash;&mdash;如果不指定的话，就使用当前目录）、目标目录（即生成的代码放置的目录，通常与</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">$SRC_DIR</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">是一样的），以及你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件所在的目录。在我们这里，可以这样用：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA;
margin-left:29.25pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:6.0pt;margin-right:0cm;
margin-bottom:7.2pt;margin-left:0cm;text-align:left;line-height:12.75pt;
mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">protoc -I=$SRC_DIR --cpp_out=$DST_DIR $SRC_DIR/addressbook.proto<o:p></o:p></span></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">因为需要生成的是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类，所以使用了</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">--cpp_out</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">选项参数&mdash;&mdash;</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">也为其他支持的语言提供了类似的选项参数。这样就可以在你指定的目标目录下生成如下文件：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l6 level1 lfo13"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:red;mso-font-kerning:0pt">addressbook.pb.h</span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:&quot;Courier New&quot;;
mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;mso-font-kerning:
0pt">：</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">声明你生成的类的头文件。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l6 level1 lfo13"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:red;mso-font-kerning:0pt">addressbook.pb.cc</span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:&quot;Courier New&quot;;
mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;mso-font-kerning:
0pt">：</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">你生成的类的实现文件。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">The Protocol Buffer API<o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Let&#39;s look at some of the generated code and see what classes and functions the compiler has created for you. If you look in&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">tutorial.pb.h</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, you can see that you have a class for each message you specified in&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">tutorial.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. Looking closer at the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;class, you can see that the complier has generated accessors for each field. For example, for the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">name</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">id</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">email</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">phone</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;fields, you have these methods:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">让我们看一下生成的代码，了解一下编译器为你创建了什么样的类和函数。如果你看了</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">tutorial.pb.h</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件，就会发现你得到了一个类，它对应于</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">tutorial.proto</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中写的每一个消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）。更深入一步，看看</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类：编译器为每一个字段生成了读写函数。例如，对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">name</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">id</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">email</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">以及</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">phone</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">字段，分别有如下函数：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:0pt">// name</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">bool</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> has_name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> clear_name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> set_name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> value</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> set_name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">char</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> value</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> mutable_name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// id</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">bool</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> has_id</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> clear_id</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> int32_t id</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> set_id</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">int32_t value</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// email</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">bool</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> has_email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> clear_email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> set_email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> value</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> set_email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">char</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> value</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> mutable_email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// phone</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> phone_size</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> clear_phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">google</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">protobuf</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#007000;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.repeated_field.html#RepeatedPtrField"><span style="mso-bidi-font-size:11.0pt;color:#0000CC">RepeatedPtrField</span></a></span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person_PhoneNumber </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&gt;&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">google</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">protobuf</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#007000;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.repeated_field.html#RepeatedPtrField"><span style="mso-bidi-font-size:11.0pt;color:#0000CC">RepeatedPtrField</span></a></span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person_PhoneNumber </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&gt;*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> mutable_phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person_PhoneNumber</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> index</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person_PhoneNumber</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> mutable_phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> index</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">inline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person_PhoneNumber</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> add_phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#007000;mso-font-kerning:0pt"><o:p></o:p></span></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">As you can see, the getters have exactly the name as the field in lowercase, and the setter methods begin with&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">set_</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. There are also&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">has_</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;methods for each singular (required or optional) field which return true if that field has been set. Finally, each field has a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">clear_</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;method that un-sets the field back to its empty state.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">正如你所看到的，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">getter</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">函数具有与字段名一模一样的名字，并且是小写的，而</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">setter</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">函数都是以</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">set_</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">前缀开头。此外，还有</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">has_</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">前缀的函数，对每一个单一的（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的）字段（译者注：此处估计是&ldquo;非</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:red;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">字段&rdquo;的意思）来说，如果字段被置（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">set</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）了值，该函数会返回</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">true</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。最后，每一个字段还有一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">clear_</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">前缀的函数，用来将字段重置（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">un-set</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）到空状态（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">empty state</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">While the numeric&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">id</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;field just has the basic accessor set described above, the&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">name</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;and&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">email</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;fields have a couple of extra methods because they&#39;re strings &ndash; a&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">mutable_</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;getter that lets you get a direct pointer to the string, and an extra setter. Note that you can call&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">mutable_email()</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;even if</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">email</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;is not already set; it will be initialized to an empty string automatically. If you had a singular message field in this example, it would also have a&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">mutable_</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;method but not a&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">set_</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;method.</span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">然而，数值类型的字段</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">id</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">就只有如上所述的基本读写函数，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">name</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">email</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">字段则有一些额外的函数，因为它们是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">&mdash;&mdash;前缀为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">mutable_</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的函数返回</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的直接指针（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">direct pointer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）。除此之外，还有一个额外的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">setter</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">函数。注意：你甚至可以在</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">email</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">还没有被置（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">set</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）值的时候就调用</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">mutable_email()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，它会被自动初始化为一个空字符串。在此例中，如果有一个单一消息字段，那么它也会有一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">mutable_</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">前缀的函数，但是没有一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">set_</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">前缀的函数。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">Repeated fields also have some special methods &ndash; if you look at the methods for the repeated&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">phone</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;field, you&#39;ll see that you can</span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo6;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">check the repeated field&#39;s&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">_size</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;(in other words, how many phone numbers are associated with this&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo6;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">get a specified phone number using its index.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo6;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">update an existing phone number at the specified index.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo6;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">add another phone number to the message which you can then edit (repeated scalar types have an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">add_</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;that just lets you pass in the new value).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">重复的字段也有一些特殊的函数&mdash;&mdash;如果你看一下重复字段</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">phone</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的那些函数，就会发现你可以：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">得到重复字段的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">_size</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">（换句话说，这个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">关联了多少个电话号码）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">通过索引（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">index</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）来获取一个指定的电话号码。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">通过指定的索引（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">index</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）来更新一个已经存在的电话号码。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">向消息（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）中添加另一个电话号码，然后你可以编辑它（重复的标量类型有一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">add_</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">前缀的函数，允许你传新值进去）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For more information on exactly what members the protocol compiler generates for any particular field definition, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp-generated.html"><span style="color:#0000CC">C++ generated code reference</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">关于编译器如何生成特殊字段的更多信息，请查看文章</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp-generated.html"><span style="color:#0000CC">C++ generated code reference</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Enums and Nested Classes </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">枚举和嵌套类</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The generated code includes a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">PhoneType</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;enum that corresponds to your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;enum. You can refer to this type as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">Person::PhoneType</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;and its values as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::MOBILE</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::HOME</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::WORK</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;(the implementation details are a little more complicated, but you don&#39;t need to understand them to use the enum).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">生成的代码中包含了一个</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#007000;mso-font-kerning:0pt">PhoneType</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">枚举，它对应于</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件中的那个枚举。你可以把这个类型当作</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::PhoneType</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，其值为</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::MOBILE</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::HOME</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::WORK</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">（实现的细节稍微复杂了点，但是没关系，不理解它也不会影响你使用该枚举）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The compiler has also generated a nested class for you called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person::PhoneNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">. If you look at the code, you can see that the &quot;real&quot; class is actually called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person_PhoneNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, but a typedef defined inside&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;allows you to treat it as if it were a nested class. The only case where this makes a difference is if you want to forward-declare the class in another file &ndash; you cannot forward-declare nested types in C++, but you can forward-declare&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person_PhoneNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">编译器还生成了一个名为</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#007000;mso-font-kerning:0pt">Person::PhoneNumber</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的嵌套类。如果你看看代码，就会发现&ldquo;真实的&rdquo;类实际上是叫做</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person_PhoneNumber</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，只不过</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">内部的一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">typedef</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">允许你像一个嵌套类一样来对待它。这一点所造成的唯一一个区别就是：如果你想在另一个文件中对类进行前向声明（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">forward-declare</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）的话，你就不能在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">中对嵌套类型进行前向声明了，但是你可以对</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person_PhoneNumber</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">进行前向声明。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Standard Message Methods </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">标准消息函数</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Each message class also contains a number of other methods that let you check or manipulate the entire message, including:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l10 level1 lfo7;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">bool IsInitialized() const;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: checks if all the required fields have been set.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l10 level1 lfo7;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">string DebugString() const;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: returns a human-readable representation of the message, particularly useful for debugging.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l10 level1 lfo7;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">void CopyFrom(const Person&amp; from);</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: overwrites the message with the given message&#39;s values.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l10 level1 lfo7;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">void Clear();</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">: clears all the elements back to the empty state.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">These and the I/O methods described in the following section implement the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Message</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;interface shared by all C++ protocol buffer classes. For more info, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message"><span style="color:#0000CC">complete API documentation for&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000">Message</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">每一个消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）还包含了其他一系列函数，用来检查或管理整个消息，包括：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">bool IsInitialized() const;</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">：检查是否全部的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">字段都被置（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">set</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）了值。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">string DebugString() const;</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">：返回一个易读的消息表示形式，对调试特别有用。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">void CopyFrom(const Person&amp; from);</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">：用外部消息的值，覆写调用者消息内部的值。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l9 level1 lfo14"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">void Clear();</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：将所有项复位到空状态（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">empty state</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这些函数以及后面章节将要提到的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">I/O</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">函数实现了</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Message</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的接口，它们被所有</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++ protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">类共享。更多信息，请查看文章</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message"><span style="color:#0000CC">complete API documentation for&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000">Message</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Parsing and Serialization </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">解析</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">&amp;</span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">序列化</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Finally, each protocol buffer class has methods for writing and reading messages of your chosen type using the protocol buffer&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">binary format</span></a>. These include:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l7 level1 lfo8;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">bool SerializeToString(string* output) const;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: serializes the message and stores the bytes in the given string. Note that the bytes are binary, not text; we only use the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;class as a convenient container.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l7 level1 lfo8;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">bool ParseFromString(const string&amp; data);</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: parses a message from the given string.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l7 level1 lfo8;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">bool SerializeToOstream(ostream* output) const;</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: writes the message to the given C++&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">ostream</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l7 level1 lfo8;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">bool ParseFromIstream(istream* input);</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: parses a message from the given C++&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">istream</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">These are just a couple of the options provided for parsing and serialization. Again, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000">Message</span><span style="color:#0000CC">&nbsp;API reference</span></a>&nbsp;for a complete list.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">最后，每一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类都有读写你所选择的消息类型的函数。它们包括：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l14 level1 lfo17"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">bool SerializeToString(string* output) const;</span><span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:black;mso-font-kerning:0pt">：</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">将消息序列化并储存在指定的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">中。注意里面的内容是二进制的，而不是文本；我们只是使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">作为一个很方便的容器。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l14 level1 lfo17"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">bool ParseFromString(const string&amp; data);</span><span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:black;mso-font-kerning:0pt">：</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">从给定的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">解析消息。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l14 level1 lfo17"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">bool SerializeToOstream(ostream* output) const;</span><span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:black;mso-font-kerning:0pt">：</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">将消息写入到给定的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">C++ </span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">ostream</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">中。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l14 level1 lfo17"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">bool ParseFromIstream(istream* input);</span><span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:black;mso-font-kerning:0pt">：</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">从给定的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++ </span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">istream</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">解析消息。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这些函数只是用于解析和序列化的几个函数罢了。请再次参考</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000">Message</span><span style="color:#0000CC">&nbsp;API reference</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">以查看完整的函数列表。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border-top:solid #FFCC33 1.0pt;
border-left:none;border-bottom:solid #FFCC33 1.0pt;border-right:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:2.0pt 0cm 2.0pt 0cm;background:#EFEFEF"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
			<b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Protocol Buffers and O-O Design</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;Protocol buffer classes are basically dumb data holders (like structs in C++); they don&#39;t make good first class citizens in an object model. If you want to add richer behaviour to a generated class, the best way to do this is to wrap the generated protocol buffer class in an application-specific class. Wrapping protocol buffers is also a good idea if you don&#39;t have control over the design of the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file (if, say, you&#39;re reusing one from another project). In that case, you can use the wrapper class to craft an interface better suited to the unique environment of your application: hiding some data and methods, exposing convenience functions, etc.&nbsp;<b>You should never add behaviour to the generated classes by inheriting from them</b>. This will break internal mechanisms and is not good object-oriented practice anyway.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
			<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:red;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:red;mso-font-kerning:0pt">和面向对象的设计</span></b><span style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"> </span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">类通常只是纯粹的数据存储器（就像</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">中的结构体一样）；它们在对象模型中并不是一等公民。如果你想向生成的类中添加更丰富的行为，最好的方法就是在应用程序中对它进行封装。如果你无权控制</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件的设计的话，封装</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">也是一个好主意（例如，你从另一个项目中重用一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件）。在那种情况下，你可以用封装类来设计接口，以更好地适应你的应用程序的特定环境：隐藏一些数据和方法，暴露一些便于使用的函数，等等。</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#7030A0;mso-font-kerning:0pt">但是你绝对不要通过继承生成的类来添加行为</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。这样做的话，会破坏其内部机制，并且不是一个好的面向对象的实践。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
</p></div>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Writing A Message </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">写消息</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Now let&#39;s try using your protocol buffer classes. The first thing you want your address book application to be able to do is write personal details to your address book file. To do this, you need to create and populate instances of your protocol buffer classes and then write them to an output stream.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Here is a program which reads an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">AddressBook</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;from a file, adds one new&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;to it based on user input, and writes the new&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">AddressBook</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;back out to the file again. The parts which directly call or reference code generated by the protocol compiler are highlighted.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">现在让我们尝试使用你的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类。你想让你的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">address book</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">程序完成的第一件事情就是向你的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">address book</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件写入详细的个人信息。要实现这一点，你需要创建</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">类的实例并将它们写入到一个输出流（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">output stream</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">）中。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">下面的这个程序从一个文件中读取</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">AddressBook</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，然后根据用户的输入向其中添加一个新的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，然后再将新的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">AddressBook</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">写回文件中。由</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">编译器生成的代码或者直接调用的代码都被突出显示了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#880000;mso-font-kerning:0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&lt;iostream&gt;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#008800;mso-font-kerning:0pt">&lt;fstream&gt;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#008800;mso-font-kerning:0pt">&lt;string&gt;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#008800;mso-font-kerning:0pt">&quot;addressbook.pb.h&quot;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:
0pt">using</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">namespace</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">// This function fills in a Person message based on user input.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:
0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> PromptForAddress</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#008800;mso-font-kerning:0pt">&quot;Enter person ID number: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> id</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; cin </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">&gt;&gt;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> id</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">set_id</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">id</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; cin</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">ignore</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">256</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&#39;\n&#39;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);<span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">//</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:red;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">cin.ignore(a,ch)</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">方法是从输入流（</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">cin</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">）中提取字符，提取的字符被忽略（</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">ignore</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">），不被使用。每抛弃一个字符，它都要计数和比较字符：如果计数值达到</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">a</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">或者被抛弃的字符是</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">ch</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">，则</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#009900;mso-font-kerning:0pt">cin.ignore()</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">函数执行终止；否则，它继续等待。它的一个常用功能就是用来清除以回车结束的输入缓冲区的内容，消除上一次输入对下一次输入的影响。比如可以这么用：</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">cin.ignore(1024,&#39;\n&#39;)</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">，通常把第一个参数设置得足够大，这样实际上总是只有第二个参数</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#009900;mso-font-kerning:0pt">&#39;\n&#39;</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Courier New&quot;;mso-hansi-font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#009900;mso-font-kerning:0pt">起作用，所以这一句就是把回车（包括回车）之前的所以字符从输入缓冲（流）中清除出去。</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#008800;mso-font-kerning:0pt">&quot;Enter name: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; getline</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">cin</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">mutable_name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">());</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#008800;mso-font-kerning:0pt">&quot;Enter email address (blank for none): &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; getline</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">cin</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(!</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">empty</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">())</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; person</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">set_email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">while</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">true</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Enter a phone number (or leave blank to finish): &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; getline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">cin</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">empty</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">())</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">break</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; tutorial</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">PhoneNumber</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> phone_number </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">=</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">add_phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; phone_number</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">set_number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Is this a mobile, home, or work phone? &quot;</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">string</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> type</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; getline</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">cin</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> type</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">type </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">==</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;mobile&quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; phone_number</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">set_type</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">MOBILE</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">else</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">type </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">==</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;home&quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; phone_number</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">set_type</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">HOME</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">else</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">type </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">==</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;work&quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; phone_number</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">-&gt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">set_type</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">WORK</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">else</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Unknown phone type. &nbsp;Using default.&quot;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:
0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">// Main function: &nbsp;Reads the entire address book from a file,</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">// &nbsp; adds one person based on user input, then writes it back out to the same</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">// &nbsp; file.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:
&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:
0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> main</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> argc</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">char</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[])</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Verify that the version of the library that we linked against is</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// compatible with the version of the headers we compiled against.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; GOOGLE_PROTOBUF_VERIFY_VERSION</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">argc </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">!=</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">2</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; cerr </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Usage: &nbsp;&quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">0</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">]</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot; ADDRESS_BOOK_FILE&quot;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">return</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">-</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">AddressBook address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Read the existing address book.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; fstream input</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">],</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> ios</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">in</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">|</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> ios</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">binary</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(!</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">input</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">]</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;: File not found. &nbsp;Creating a new file.&quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">else</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(!</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">ParseFromIstream</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">input</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">))</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; cerr </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Failed to parse address book.&quot;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">return</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">-</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Add an address.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; PromptForAddress</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">add_person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">());</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Write the new address book back to disk.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; fstream output</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">],</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> ios</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">out</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">|</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> ios</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">trunc </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">|</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> ios</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">binary</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(!</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">SerializeToOstream</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">output</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">))</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; cerr </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Failed to write address book.&quot;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">return</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">-</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Optional: &nbsp;Delete all global objects allocated by libprotobuf.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; google</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">protobuf</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">ShutdownProtobufLibrary</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">return</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#006666;mso-font-kerning:0pt">0</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:
0pt">}</span><span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt"><o:p></o:p></span></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Notice the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">GOOGLE_PROTOBUF_VERIFY_VERSION</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;macro. It is good practice &ndash; though not strictly necessary &ndash; to execute this macro before using the C++ Protocol Buffer library. It verifies that you have not accidentally linked against a version of the library which is incompatible with the version of the headers you compiled with. If a version mismatch is detected, the program will abort. Note that every&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">.pb.cc</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;file automatically invokes this macro on startup.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">注意</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt">GOOGLE_PROTOBUF_VERIFY_VERSION</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">宏。你最好像这样&mdash;&mdash;尽管这不是严格要求的&mdash;&mdash;在使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">C++ Protocol Buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">库之前执行该宏。它会检查你是不是在无意中链接到了与你使用的头文件不兼容的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">库。如果检测到了不匹配情况，程序会中止运行下去。注意：每一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">.pb.cc</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件在开始的时候都会自动调用该宏。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">Also notice the call to&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">ShutdownProtobufLibrary()</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;at the end of the program. All this does is delete any global objects that were allocated by the Protocol Buffer library. This is unnecessary for most programs, since the process is just going to exit anyway and the OS will take care of reclaiming all of its memory. However, if you use a memory leak checker that requires that every last object be freed, or if you are writing a library which may be loaded and unloaded multiple times by a single process, then you may want to force Protocol Buffers to clean up everything.</span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">另外还需要注意的是程序结尾处调用的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">ShutdownProtobufLibrary()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">函数。该函数所做的所有工作就是删除由</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">库分配的全局对象。在大多数程序中，这都是没有必要的，因为进程一退出，操作系统就回收了它的内存。然而，如果你使用了内存检查工具（译者注：例如</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">valgrind</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）来检查你的程序的话（内存检查工具要求每一个对象最后都要被释放），或者你写了一个可能会在一个进程中多次被加载、卸载的库，那么你可能就需要强制</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">来清理一切了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Reading A Message </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">读消息</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Of course, an address book wouldn&#39;t be much use if you couldn&#39;t get any information out of it! This example reads the file created by the above example and prints all the information in it.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">当然，如果你不能从一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">address book</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">中取出信息的话，那么它也就没什么用了！下面的例子展示了如何读取上面的程序创建的文件，并将读到的所有信息打印出来。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
			<span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#880000;mso-font-kerning:0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&lt;iostream&gt;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#008800;mso-font-kerning:0pt">&lt;fstream&gt;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#008800;mso-font-kerning:0pt">&lt;string&gt;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">#include</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#008800;mso-font-kerning:0pt">&quot;addressbook.pb.h&quot;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:
0pt">using</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">namespace</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> std</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">// Iterates though all people in the AddressBook and prints info about them.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:
0pt">void</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> ListPeople</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">AddressBook</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">for</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> i </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">=</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">0</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> i </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">person_size</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> i</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">++)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> person </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">=</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">i</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Person ID: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:
0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> person</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">id</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot; &nbsp;Name: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:
0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> person</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">name</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">has_email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">())</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot; &nbsp;E-mail address: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">email</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">for</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> j </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">=</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">0</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> j </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">phone_size</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> j</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">++)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">const</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">PhoneNumber</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> phone_number </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">=</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">phone</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">j</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">switch</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">phone_number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">type</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">())</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">case</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">MOBILE</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">:</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot; &nbsp;Mobile phone #: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">break</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">case</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">HOME</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">:</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot; &nbsp;Home phone #: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">break</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">case</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">Person</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">WORK</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">:</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot; &nbsp;Work phone #: &quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">break</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; cout </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> phone_number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">number</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">()</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:
0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">// Main function: &nbsp;Reads the entire address book from a file and prints all</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;mso-font-kerning:
0pt">// &nbsp; the information inside.</span><br />
			<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:
0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> main</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">int</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> argc</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">char</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">*</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[])</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Verify that the version of the library that we linked against is</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// compatible with the version of the headers we compiled against.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; GOOGLE_PROTOBUF_VERIFY_VERSION</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">argc </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">!=</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">2</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">)</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; cerr </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Usage: &nbsp;&quot;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;
mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">0</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">]</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot; ADDRESS_BOOK_FILE&quot;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">return</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">-</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; tutorial</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">AddressBook address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Read the existing address book.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; fstream input</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">argv</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">[</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">],</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> ios</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#000088;mso-font-kerning:0pt">in</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">|</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> ios</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">binary</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">if</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">(!</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">ParseFromIstream</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">(&amp;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">input</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">))</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">{</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; cerr </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#008800;mso-font-kerning:0pt">&quot;Failed to parse address book.&quot;</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#666600;mso-font-kerning:0pt">&lt;&lt;</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> endl</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#000088;mso-font-kerning:0pt">return</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">-</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#006666;mso-font-kerning:0pt">1</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; &nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span><br />
			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">}</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; ListPeople</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#666600;mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt">address_book</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">);</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#880000;
mso-font-kerning:0pt">// Optional: &nbsp;Delete all global objects allocated by libprotobuf.</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; google</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;
mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt">protobuf</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">::</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:black;mso-font-kerning:0pt">ShutdownProtobufLibrary</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">();</span></p>
<p>			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:black;mso-font-kerning:
0pt">&nbsp; </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#000088;
mso-font-kerning:0pt">return</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:#006666;mso-font-kerning:0pt">0</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:0pt">;</span><br />
			<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:
宋体;color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#666600;mso-font-kerning:
0pt">}</span><span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt"><o:p></o:p></span></p>
</p></div>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Extending a Protocol Buffer </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">扩展一个</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Sooner or later after you release the code that uses your protocol buffer, you will undoubtedly want to &quot;improve&quot; the protocol buffer&#39;s definition. If you want your new buffers to be backwards-compatible, and your old buffers to be forward-compatible &ndash; and you almost certainly do want this &ndash; then there are some rules you need to follow. In the new version of the protocol buffer:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l17 level1 lfo9;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">you&nbsp;<i>must not</i>&nbsp;change the tag numbers of any existing fields.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l17 level1 lfo9;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">you&nbsp;<i>must not</i>&nbsp;add or delete any required fields.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l17 level1 lfo9;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">you&nbsp;<i>may</i>&nbsp;delete optional or repeated fields.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l17 level1 lfo9;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">you&nbsp;<i>may</i>&nbsp;add new optional or repeated fields but you must use fresh tag numbers (i.e. tag numbers that were never used in this protocol buffer, not even by deleted fields).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">(There are&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#updating"><span style="color:#0000CC">some exceptions</span></a>&nbsp;to these rules, but they are rarely used.)<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If you follow these rules, old code will happily read new messages and simply ignore any new fields. To the old code, optional fields that were deleted will simply have their default value, and deleted repeated fields will be empty. New code will also transparently read old messages. However, keep in mind that new optional fields will not be present in old messages, so you will need to either check explicitly whether they&#39;re set with&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">has_</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, or provide a reasonable default value in your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;file with&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">[default = value]</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;after the tag number. If the default value is not specified for an optional element, a type-specific default value is used instead: for strings, the default value is the empty string. For booleans, the default value is false. For numeric types, the default value is zero. Note also that if you added a new repeated field, your new code will not be able to tell whether it was left empty (by new code) or never set at all (by old code) since there is no&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;color:#007000;
mso-font-kerning:0pt">has_</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;flag for it.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">无论或早或晚，在你放出你那使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的代码之后，你必定会想&ldquo;改进&rdquo;</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的定义。如果你想让你的新</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">向后兼容（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">backwards-compatible</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">），并且旧的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">能够向前兼容（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">forward-compatible</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）&mdash;&mdash;你一定希望如此&mdash;&mdash;那么你在新的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">中就要遵守其他的一些规则了：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l2 level1 lfo19"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">对已存在的任何字段，你都不能更改其标识（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）号。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l2 level1 lfo19"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">你绝对不能添加或删除任何</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的字段。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l2 level1 lfo19"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">你可以添加新的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的字段，但是你必须使用新的标识（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）号（例如，在这个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">中从未使用过的标识号&mdash;&mdash;甚至于已经被删除过的字段使用过的标识号也不行）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（有一些</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#7030A0;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#updating"><span lang="EN-US" style="font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;color:#7030A0"><span lang="EN-US">例外情况</span></span></a></span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，但是它们很少使用。）</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">如果你遵守这些规则，老的代码将能很好地解析新的消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">），并忽略掉任何新的字段。对老代码来说，已经被删除的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">字段将被赋予默认值，已被删除的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">字段将是空的。新的代码也能够透明地读取旧的消息。但是，请牢记心中：新的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">字段将不会出现在旧的消息中，所以你要么需要显式地检查它们是否由</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">has_</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">前缀的函数置（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">set</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）了值，要么在你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中，在标识（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）号的后面用</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt">[default = value]</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">提供一个合理的默认值。如果没有为一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">项指定默认值，那么就会使用与特定类型相关的默认值：对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来说，默认值是空字符串。对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">boolean</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来说，默认值是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">false</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。对数值类型来说，默认值是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。还要注意：如果你添加了一个新的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">字段，你的新代码将无法告诉你它是否被留空了（被新代码），或者是否从未被置（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">set</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）值（被旧代码），这是因为它没有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">has_</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">标志。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Optimization Tips </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">优化小技巧</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The C++ Protocol Buffers library is extremely heavily optimized. However, proper usage can improve performance even more. Here are some tips for squeezing every last drop of speed out of the library:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l5 level1 lfo10;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Reuse message objects when possible. Messages try to keep around any memory they allocate for reuse, even when they are cleared. Thus, if you are handling many messages with the same type and similar structure in succession, it is a good idea to reuse the same message object each time to take load off the memory allocator. However, objects can become bloated over time, especially if your messages vary in &quot;shape&quot; or if you occasionally construct a message that is much larger than usual. You should monitor the sizes of your message objects by calling the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-bidi-font-family:宋体;
color:#007000;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message.SpaceUsed.details"><span style="color:#0000CC">SpaceUsed</span></a></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;method and delete them once they get too big.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l5 level1 lfo10;tab-stops:list 36.0pt"><br />
		<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Your system&#39;s memory allocator may not be well-optimized for allocating lots of small objects from multiple threads. Try using&nbsp;</span><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:red;mso-font-kerning:0pt"><a href="http://code.google.com/p/google-perftools/"><span style="color:red">Google&#39;s tcmalloc</span></a></span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;instead.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffer </span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">库已经做了极度优化。但是，正确的使用方法仍然会提高很多性能。下面是一些小技巧，用来提升</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">库的最后一丝速度能力：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l16 level1 lfo18"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">如果有可能，重复利用消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）对象。即使被清除掉，消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）对象也会尽量保存所有被分配来重用的内存。这样的话，如果你正在处理很多类型相同的消息以及一系列相似的结构，有一个好办法就是重复使用同一个消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）对象，从而使内存分配的压力减小一些。然而，随着时间的流逝，对象占用的内存也有可能变得越来越大，尤其是当你的消息尺寸（译者注：各消息内容不同，有些消息内容多一些，有些消息内容少一些）不同的时候，或者你偶尔创建了一个比平常大很多的消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）的时候。你应该自己监测消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）对象的大小&mdash;&mdash;通过调用</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message.SpaceUsed.details"><span style="color:#0000CC">SpaceUsed</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">函数&mdash;&mdash;并在它太大的时候删除它。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l16 level1 lfo18"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">在多线程中分配大量小对象的内存的时候，你的操作系统的内存分配器可能优化得不够好。在这种情况下，你可以尝试用一下</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:red;mso-font-kerning:0pt"><a href="http://code.google.com/p/google-perftools/"><span style="color:red">Google&#39;s tcmalloc</span></a></span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
			<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Advanced Usage </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">高级使用</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</p></div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol buffers have uses that go beyond simple accessors and serialization. Be sure to explore the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/index.html"><span style="color:#0000CC">C++ API reference</span></a>&nbsp;to see what else you can do with them.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">One key feature provided by protocol message classes is&nbsp;<i>reflection</i>. You can iterate over the fields of a message and manipulate their values without writing your code against any specific message type. One very useful way to use reflection is for converting protocol messages to and from other encodings, such as XML or JSON. A more advanced use of reflection might be to find differences between two messages of the same type, or to develop a sort of &quot;regular expressions for protocol messages&quot; in which you can write expressions that match certain message contents. If you use your imagination, it&#39;s possible to apply Protocol Buffers to a much wider range of problems than you might initially expect!<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
		<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Reflection is provided by the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message.Reflection"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000">Message::Reflection</span><span style="color:#0000CC">&nbsp;interface</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的作用绝不仅仅是简单的数据存取以及序列化。请阅读</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/index.html"><span style="color:#0000CC">C++ API reference</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">全文来看看你还能用它来做什么。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">消息类所提供的一个关键特性就是</span></b><b style="mso-bidi-font-weight:
normal"><i style="mso-bidi-font-style:normal"><span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:#7030A0;mso-font-kerning:0pt">反射</span></i></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。你不需要编写针对一个特殊的消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）类型的代码，就可以遍历一个消息的字段，并操纵它们的值，就像</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">XML</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">JSON</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">一样。&ldquo;反射&rdquo;的一个更高级的用法可能就是可以找出两个相同类型的消息之间的区别，或者开发某种&ldquo;协议消息的正则表达式&rdquo;，利用正则表达式，你可以对某种消息内容进行匹配。只要你发挥你的想像力，就有可能将</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">应用到一个更广泛的、你可能一开始就期望解决的问题范围上。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">&ldquo;反射&rdquo;是由</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message.Reflection"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-bidi-font-family:宋体;color:#007000">Message::Reflection</span><span style="color:#0000CC">&nbsp;interface</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">提供的。</span></b></p>
</div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"></p>
<div align="left" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;"><br />
		<br />
		<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
		<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
		转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
		感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
			<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
</p></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-protocol-buffer-basics-c%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
