protobufjs 4.1.2 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/.travis.yml +3 -1
  2. package/README.md +147 -25
  3. package/bin/pbjs +2 -2
  4. package/bower.json +3 -3
  5. package/cli/pbjs/targets/amd.js +1 -1
  6. package/cli/pbjs/targets/json.js +9 -1
  7. package/cli/pbjs/targets/proto.js +48 -24
  8. package/cli/pbjs/util.js +1 -1
  9. package/cli/pbjs.js +9 -2
  10. package/dist/README.md +10 -10
  11. package/dist/{ProtoBuf-light.js → protobuf-light.js} +207 -152
  12. package/dist/protobuf-light.min.js +94 -0
  13. package/dist/protobuf-light.min.js.gz +0 -0
  14. package/dist/protobuf-light.min.map +8 -0
  15. package/dist/{ProtoBuf.js → protobuf.js} +265 -175
  16. package/dist/protobuf.min.js +116 -0
  17. package/dist/protobuf.min.js.gz +0 -0
  18. package/dist/protobuf.min.map +8 -0
  19. package/docs/ProtoBuf.Builder.Message.html +1473 -967
  20. package/docs/ProtoBuf.Builder.Service.html +266 -197
  21. package/docs/ProtoBuf.Builder.html +758 -542
  22. package/docs/ProtoBuf.DotProto.Parser.html +223 -161
  23. package/docs/ProtoBuf.DotProto.Tokenizer.html +344 -248
  24. package/docs/ProtoBuf.DotProto.html +20 -12
  25. package/docs/ProtoBuf.Element.html +554 -554
  26. package/docs/ProtoBuf.Map.html +158 -123
  27. package/docs/ProtoBuf.Reflect.Element.html +286 -143
  28. package/docs/ProtoBuf.Reflect.Enum.Value.html +329 -228
  29. package/docs/ProtoBuf.Reflect.Enum.html +757 -537
  30. package/docs/ProtoBuf.Reflect.Extension.html +73 -56
  31. package/docs/ProtoBuf.Reflect.Message.ExtensionField.html +1013 -740
  32. package/docs/ProtoBuf.Reflect.Message.Field.html +926 -649
  33. package/docs/ProtoBuf.Reflect.Message.OneOf.html +327 -245
  34. package/docs/ProtoBuf.Reflect.Message.html +919 -652
  35. package/docs/ProtoBuf.Reflect.Namespace.html +648 -447
  36. package/docs/ProtoBuf.Reflect.Service.Method.html +363 -251
  37. package/docs/ProtoBuf.Reflect.Service.RPCMethod.html +545 -397
  38. package/docs/ProtoBuf.Reflect.Service.html +721 -511
  39. package/docs/ProtoBuf.Reflect.T.html +268 -197
  40. package/docs/ProtoBuf.Reflect.html +20 -12
  41. package/docs/ProtoBuf.Util.html +169 -118
  42. package/docs/ProtoBuf.html +840 -628
  43. package/docs/ProtoBuf.js.html +271 -180
  44. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  45. package/docs/fonts/OpenSans-Bold-webfont.svg +1830 -0
  46. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  47. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  48. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  49. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  50. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  51. package/docs/fonts/OpenSans-Italic-webfont.svg +1830 -0
  52. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  53. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  54. package/docs/fonts/OpenSans-Light-webfont.svg +1831 -0
  55. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  56. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  57. package/docs/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  58. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  59. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  60. package/docs/fonts/OpenSans-Regular-webfont.svg +1831 -0
  61. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  62. package/docs/index.html +7 -5
  63. package/docs/styles/jsdoc-default.css +95 -75
  64. package/docs/styles/prettify-tomorrow.css +1 -1
  65. package/donate.png +0 -0
  66. package/examples/protoify/json.js +123 -123
  67. package/examples/protoify/json.json +123 -123
  68. package/examples/websocket/server.js +4 -4
  69. package/externs/{ProtoBuf.js → protobuf.js} +933 -922
  70. package/index.js +1 -18
  71. package/jsdoc.json +1 -1
  72. package/package.json +11 -11
  73. package/protobuf.png +0 -0
  74. package/scripts/build.js +53 -58
  75. package/src/ProtoBuf/Builder/Message.js +18 -9
  76. package/src/ProtoBuf/Builder/Service.js +3 -0
  77. package/src/ProtoBuf/Builder.js +34 -10
  78. package/src/ProtoBuf/DotProto/Parser.js +58 -23
  79. package/src/ProtoBuf/Reflect/Element.js +17 -4
  80. package/src/ProtoBuf/Reflect/Message/Field.js +6 -5
  81. package/src/ProtoBuf/Reflect/Message.js +9 -4
  82. package/src/ProtoBuf/Util.js +116 -116
  83. package/src/bower.json +2 -2
  84. package/src/google/protobuf/descriptor.json +55 -15
  85. package/src/{ProtoBuf.js → protobuf.js} +0 -0
  86. package/src/wrap.js +4 -4
  87. package/tests/bench.txt +373 -373
  88. package/tests/complex.json +8 -1
  89. package/tests/custom-options.json +169 -169
  90. package/tests/extend.json +71 -71
  91. package/tests/imports-weak.proto +7 -0
  92. package/tests/imports.json +83 -83
  93. package/tests/nodeunit-browser/nodeunit.css +70 -70
  94. package/tests/nodeunit-browser/nodeunit.js +2108 -2108
  95. package/tests/options.json +32 -32
  96. package/tests/proto2js/Bar.json +46 -46
  97. package/tests/suite.js +107 -82
  98. package/ProtoBuf.png +0 -0
  99. package/dist/ProtoBuf-light.min.js +0 -87
  100. package/dist/ProtoBuf-light.min.js.gz +0 -0
  101. package/dist/ProtoBuf-light.min.map +0 -8
  102. package/dist/ProtoBuf.min.js +0 -108
  103. package/dist/ProtoBuf.min.js.gz +0 -0
  104. package/dist/ProtoBuf.min.map +0 -8
  105. package/externs/ByteBuffer.js +0 -767
  106. package/externs/Long.js +0 -328
  107. package/sandbox/gapi/googleapis/google/api/annotations.proto +0 -29
  108. package/sandbox/gapi/googleapis/google/api/http.proto +0 -245
  109. package/sandbox/gapi/googleapis/google/datastore/v1beta3/datastore.proto +0 -281
  110. package/sandbox/gapi/googleapis/google/datastore/v1beta3/entity.proto +0 -189
  111. package/sandbox/gapi/googleapis/google/datastore/v1beta3/query.proto +0 -281
  112. package/sandbox/gapi/googleapis/google/longrunning/operations.proto +0 -144
  113. package/sandbox/gapi/googleapis/google/protobuf/any.proto +0 -98
  114. package/sandbox/gapi/googleapis/google/protobuf/any_test.proto +0 -41
  115. package/sandbox/gapi/googleapis/google/protobuf/api.proto +0 -201
  116. package/sandbox/gapi/googleapis/google/protobuf/descriptor.proto +0 -773
  117. package/sandbox/gapi/googleapis/google/protobuf/duration.proto +0 -95
  118. package/sandbox/gapi/googleapis/google/protobuf/empty.proto +0 -50
  119. package/sandbox/gapi/googleapis/google/protobuf/field_mask.proto +0 -167
  120. package/sandbox/gapi/googleapis/google/protobuf/map_lite_unittest.proto +0 -130
  121. package/sandbox/gapi/googleapis/google/protobuf/map_proto2_unittest.proto +0 -60
  122. package/sandbox/gapi/googleapis/google/protobuf/map_unittest.proto +0 -129
  123. package/sandbox/gapi/googleapis/google/protobuf/map_unittest_proto3.proto +0 -120
  124. package/sandbox/gapi/googleapis/google/protobuf/source_context.proto +0 -47
  125. package/sandbox/gapi/googleapis/google/protobuf/struct.proto +0 -94
  126. package/sandbox/gapi/googleapis/google/protobuf/timestamp.proto +0 -107
  127. package/sandbox/gapi/googleapis/google/protobuf/type.proto +0 -176
  128. package/sandbox/gapi/googleapis/google/protobuf/unittest.proto +0 -878
  129. package/sandbox/gapi/googleapis/google/protobuf/unittest_arena.proto +0 -46
  130. package/sandbox/gapi/googleapis/google/protobuf/unittest_custom_options.proto +0 -394
  131. package/sandbox/gapi/googleapis/google/protobuf/unittest_drop_unknown_fields.proto +0 -58
  132. package/sandbox/gapi/googleapis/google/protobuf/unittest_embed_optimize_for.proto +0 -51
  133. package/sandbox/gapi/googleapis/google/protobuf/unittest_empty.proto +0 -38
  134. package/sandbox/gapi/googleapis/google/protobuf/unittest_enormous_descriptor.proto +0 -1048
  135. package/sandbox/gapi/googleapis/google/protobuf/unittest_import.proto +0 -66
  136. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_lite.proto +0 -52
  137. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_proto3.proto +0 -68
  138. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public.proto +0 -41
  139. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public_lite.proto +0 -43
  140. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public_proto3.proto +0 -42
  141. package/sandbox/gapi/googleapis/google/protobuf/unittest_lite.proto +0 -385
  142. package/sandbox/gapi/googleapis/google/protobuf/unittest_lite_imports_nonlite.proto +0 -44
  143. package/sandbox/gapi/googleapis/google/protobuf/unittest_mset.proto +0 -82
  144. package/sandbox/gapi/googleapis/google/protobuf/unittest_mset_wire_format.proto +0 -52
  145. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena.proto +0 -202
  146. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena_import.proto +0 -37
  147. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena_lite.proto +0 -42
  148. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_field_presence.proto +0 -138
  149. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_generic_services.proto +0 -54
  150. package/sandbox/gapi/googleapis/google/protobuf/unittest_optimize_for.proto +0 -67
  151. package/sandbox/gapi/googleapis/google/protobuf/unittest_preserve_unknown_enum.proto +0 -71
  152. package/sandbox/gapi/googleapis/google/protobuf/unittest_preserve_unknown_enum2.proto +0 -50
  153. package/sandbox/gapi/googleapis/google/protobuf/unittest_proto3.proto +0 -388
  154. package/sandbox/gapi/googleapis/google/protobuf/unittest_proto3_arena.proto +0 -206
  155. package/sandbox/gapi/googleapis/google/protobuf/unittest_well_known_types.proto +0 -112
  156. package/sandbox/gapi/googleapis/google/protobuf/unknown_enum_test.proto +0 -62
  157. package/sandbox/gapi/googleapis/google/protobuf/wrappers.proto +0 -117
  158. package/sandbox/gapi/googleapis/google/rpc/code.proto +0 -190
  159. package/sandbox/gapi/googleapis/google/rpc/error_details.proto +0 -157
  160. package/sandbox/gapi/googleapis/google/rpc/status.proto +0 -90
  161. package/sandbox/gapi/googleapis/google/type/color.proto +0 -163
  162. package/sandbox/gapi/googleapis/google/type/date.proto +0 -43
  163. package/sandbox/gapi/googleapis/google/type/dayofweek.proto +0 -50
  164. package/sandbox/gapi/googleapis/google/type/latlng.proto +0 -36
  165. package/sandbox/gapi/googleapis/google/type/money.proto +0 -40
  166. package/sandbox/gapi/googleapis/google/type/timeofday.proto +0 -42
  167. package/sandbox/gapi/test.js +0 -17
  168. package/sandbox/gapi/test.proto +0 -12
  169. package/sandbox/issue146/MyOptions.proto +0 -28
  170. package/sandbox/issue146/Sample.proto +0 -21
  171. package/sandbox/issue146/main.js +0 -3
  172. package/sandbox/issue147/enum.proto +0 -8
  173. package/sandbox/issue147/main.js +0 -3
  174. package/sandbox/issue182/commands.proto +0 -10
  175. package/sandbox/issue182/execute.js +0 -22
  176. package/sandbox/issue182/session_commands.proto +0 -14
  177. package/sandbox/issue289/A.proto +0 -8
  178. package/sandbox/issue289/B.proto +0 -8
  179. package/sandbox/issue289/common.proto +0 -5
  180. package/sandbox/issue289/main.js +0 -7
  181. package/sandbox/issue300/IAuth.proto +0 -14
  182. package/sandbox/issue300/Request.proto +0 -14
  183. package/sandbox/issue300/main.js +0 -26
  184. package/sandbox/issue42/innerextend.proto +0 -18
  185. package/sandbox/issue42/main.js +0 -8
  186. package/sandbox/issue42/outerextend.proto +0 -17
  187. package/tests/gtfs-realtime.proto +0 -552
  188. package/webpack.config.js +0 -9
@@ -1,555 +1,555 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>JSDoc: Class: Element</title>
6
-
7
- <script src="scripts/prettify/prettify.js"> </script>
8
- <script src="scripts/prettify/lang-css.js"> </script>
9
- <!--[if lt IE 9]>
10
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
- <![endif]-->
12
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
- </head>
15
-
16
- <body>
17
-
18
- <div id="main">
19
-
20
- <h1 class="page-title">Class: Element</h1>
21
-
22
-
23
-
24
-
25
-
26
- <section>
27
-
28
- <header>
29
- <h2>
30
- <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a>.</span>
31
-
32
- Element
33
- </h2>
34
-
35
- </header>
36
-
37
- <article>
38
- <div class="container-overview">
39
-
40
-
41
-
42
-
43
- <dt>
44
- <h4 class="name" id="Element"><span class="type-signature"></span>new Element<span class="signature">(type, resolvedType, isMapKey, syntax)</span><span class="type-signature"></span></h4>
45
-
46
-
47
- </dt>
48
- <dd>
49
-
50
-
51
- <div class="description">
52
- <p>Constructs a new Element implementation that checks and converts values for a
53
- particular field type, as appropriate.</p>
54
- <p>An Element represents a single value: either the value of a singular field,
55
- or a value contained in one entry of a repeated field or map field. This
56
- class does not implement these higher-level concepts; it only encapsulates
57
- the low-level typechecking and conversion.</p>
58
- </div>
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
- <h5>Parameters:</h5>
67
-
68
-
69
- <table class="params">
70
- <thead>
71
- <tr>
72
-
73
- <th>Name</th>
74
-
75
-
76
- <th>Type</th>
77
-
78
-
79
-
80
-
81
-
82
- <th class="last">Description</th>
83
- </tr>
84
- </thead>
85
-
86
- <tbody>
87
-
88
-
89
- <tr>
90
-
91
- <td class="name"><code>type</code></td>
92
-
93
-
94
- <td class="type">
95
-
96
-
97
- <span class="param-type"><a href="Object.html">Object</a></span>
98
-
99
-
100
-
101
- </td>
102
-
103
-
104
-
105
-
106
-
107
- <td class="description last"><p>Resolved data type</p></td>
108
- </tr>
109
-
110
-
111
-
112
- <tr>
113
-
114
- <td class="name"><code>resolvedType</code></td>
115
-
116
-
117
- <td class="type">
118
-
119
-
120
- <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
121
- |
122
-
123
- <span class="param-type">null</span>
124
-
125
-
126
-
127
- </td>
128
-
129
-
130
-
131
-
132
-
133
- <td class="description last"><p>Resolved type, if relevant
134
- (e.g. submessage field).</p></td>
135
- </tr>
136
-
137
-
138
-
139
- <tr>
140
-
141
- <td class="name"><code>isMapKey</code></td>
142
-
143
-
144
- <td class="type">
145
-
146
-
147
- <span class="param-type">boolean</span>
148
-
149
-
150
-
151
- </td>
152
-
153
-
154
-
155
-
156
-
157
- <td class="description last"><p>Is this element a Map key? The value will be
158
- converted to string form if so.</p></td>
159
- </tr>
160
-
161
-
162
-
163
- <tr>
164
-
165
- <td class="name"><code>syntax</code></td>
166
-
167
-
168
- <td class="type">
169
-
170
-
171
- <span class="param-type">string</span>
172
-
173
-
174
-
175
- </td>
176
-
177
-
178
-
179
-
180
-
181
- <td class="description last"><p>Syntax level of defining message type, e.g.,
182
- proto2 or proto3.</p></td>
183
- </tr>
184
-
185
-
186
- </tbody>
187
- </table>
188
-
189
-
190
-
191
- <dl class="details">
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
- <dt class="tag-source">Source:</dt>
212
- <dd class="tag-source"><ul class="dummy"><li>
213
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3754">line 3754</a>
214
- </li></ul></dd>
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
- </dl>
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
- </dd>
239
-
240
-
241
- </div>
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
- <h3 class="subsection-title">Members</h3>
257
-
258
- <dl>
259
-
260
- <dt>
261
- <h4 class="name" id="isMapKey"><span class="type-signature"></span>isMapKey<span class="type-signature"> :boolean</span></h4>
262
-
263
-
264
- </dt>
265
- <dd>
266
-
267
- <div class="description">
268
- <p>Element is a map key.</p>
269
- </div>
270
-
271
-
272
-
273
- <h5>Type:</h5>
274
- <ul>
275
- <li>
276
-
277
- <span class="param-type">boolean</span>
278
-
279
-
280
- </li>
281
- </ul>
282
-
283
-
284
-
285
- <dl class="details">
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
- <dt class="tag-source">Source:</dt>
306
- <dd class="tag-source"><ul class="dummy"><li>
307
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3771">line 3771</a>
308
- </li></ul></dd>
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
- </dl>
317
-
318
-
319
-
320
-
321
-
322
- </dd>
323
-
324
-
325
-
326
- <dt>
327
- <h4 class="name" id="resolvedType"><span class="type-signature"></span>resolvedType<span class="type-signature"> :<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>|null</span></h4>
328
-
329
-
330
- </dt>
331
- <dd>
332
-
333
- <div class="description">
334
- <p>Element type reference to submessage or enum definition, if needed.</p>
335
- </div>
336
-
337
-
338
-
339
- <h5>Type:</h5>
340
- <ul>
341
- <li>
342
-
343
- <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
344
- |
345
-
346
- <span class="param-type">null</span>
347
-
348
-
349
- </li>
350
- </ul>
351
-
352
-
353
-
354
- <dl class="details">
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
- <dt class="tag-source">Source:</dt>
375
- <dd class="tag-source"><ul class="dummy"><li>
376
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3765">line 3765</a>
377
- </li></ul></dd>
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
- </dl>
386
-
387
-
388
-
389
-
390
-
391
- </dd>
392
-
393
-
394
-
395
- <dt>
396
- <h4 class="name" id="syntax"><span class="type-signature"></span>syntax<span class="type-signature"> :string</span></h4>
397
-
398
-
399
- </dt>
400
- <dd>
401
-
402
- <div class="description">
403
- <p>Syntax level of defining message type, e.g., proto2 or proto3.</p>
404
- </div>
405
-
406
-
407
-
408
- <h5>Type:</h5>
409
- <ul>
410
- <li>
411
-
412
- <span class="param-type">string</span>
413
-
414
-
415
- </li>
416
- </ul>
417
-
418
-
419
-
420
- <dl class="details">
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
-
436
-
437
-
438
-
439
-
440
- <dt class="tag-source">Source:</dt>
441
- <dd class="tag-source"><ul class="dummy"><li>
442
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3777">line 3777</a>
443
- </li></ul></dd>
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
- </dl>
452
-
453
-
454
-
455
-
456
-
457
- </dd>
458
-
459
-
460
-
461
- <dt>
462
- <h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :<a href="Object.html">Object</a></span></h4>
463
-
464
-
465
- </dt>
466
- <dd>
467
-
468
- <div class="description">
469
- <p>Element type, as a string (e.g., int32).</p>
470
- </div>
471
-
472
-
473
-
474
- <h5>Type:</h5>
475
- <ul>
476
- <li>
477
-
478
- <span class="param-type"><a href="Object.html">Object</a></span>
479
-
480
-
481
- </li>
482
- </ul>
483
-
484
-
485
-
486
- <dl class="details">
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
-
496
-
497
-
498
-
499
-
500
-
501
-
502
-
503
-
504
-
505
-
506
- <dt class="tag-source">Source:</dt>
507
- <dd class="tag-source"><ul class="dummy"><li>
508
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3759">line 3759</a>
509
- </li></ul></dd>
510
-
511
-
512
-
513
-
514
-
515
-
516
-
517
- </dl>
518
-
519
-
520
-
521
-
522
-
523
- </dd>
524
-
525
- </dl>
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
- </article>
534
-
535
- </section>
536
-
537
-
538
-
539
-
540
- </div>
541
-
542
- <nav>
543
- <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Element.html">Element</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
544
- </nav>
545
-
546
- <br clear="both">
547
-
548
- <footer>
549
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> on Mon Jun 01 2015 01:15:14 GMT+0200 (Mitteleuropäische Sommerzeit)
550
- </footer>
551
-
552
- <script> prettyPrint(); </script>
553
- <script src="scripts/linenumber.js"> </script>
554
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Class: Element</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Class: Element</h1>
21
+
22
+
23
+
24
+
25
+
26
+ <section>
27
+
28
+ <header>
29
+ <h2>
30
+ <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a>.</span>
31
+
32
+ Element
33
+ </h2>
34
+
35
+ </header>
36
+
37
+ <article>
38
+ <div class="container-overview">
39
+
40
+
41
+
42
+
43
+ <dt>
44
+ <h4 class="name" id="Element"><span class="type-signature"></span>new Element<span class="signature">(type, resolvedType, isMapKey, syntax)</span><span class="type-signature"></span></h4>
45
+
46
+
47
+ </dt>
48
+ <dd>
49
+
50
+
51
+ <div class="description">
52
+ <p>Constructs a new Element implementation that checks and converts values for a
53
+ particular field type, as appropriate.</p>
54
+ <p>An Element represents a single value: either the value of a singular field,
55
+ or a value contained in one entry of a repeated field or map field. This
56
+ class does not implement these higher-level concepts; it only encapsulates
57
+ the low-level typechecking and conversion.</p>
58
+ </div>
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ <h5>Parameters:</h5>
67
+
68
+
69
+ <table class="params">
70
+ <thead>
71
+ <tr>
72
+
73
+ <th>Name</th>
74
+
75
+
76
+ <th>Type</th>
77
+
78
+
79
+
80
+
81
+
82
+ <th class="last">Description</th>
83
+ </tr>
84
+ </thead>
85
+
86
+ <tbody>
87
+
88
+
89
+ <tr>
90
+
91
+ <td class="name"><code>type</code></td>
92
+
93
+
94
+ <td class="type">
95
+
96
+
97
+ <span class="param-type"><a href="Object.html">Object</a></span>
98
+
99
+
100
+
101
+ </td>
102
+
103
+
104
+
105
+
106
+
107
+ <td class="description last"><p>Resolved data type</p></td>
108
+ </tr>
109
+
110
+
111
+
112
+ <tr>
113
+
114
+ <td class="name"><code>resolvedType</code></td>
115
+
116
+
117
+ <td class="type">
118
+
119
+
120
+ <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
121
+ |
122
+
123
+ <span class="param-type">null</span>
124
+
125
+
126
+
127
+ </td>
128
+
129
+
130
+
131
+
132
+
133
+ <td class="description last"><p>Resolved type, if relevant
134
+ (e.g. submessage field).</p></td>
135
+ </tr>
136
+
137
+
138
+
139
+ <tr>
140
+
141
+ <td class="name"><code>isMapKey</code></td>
142
+
143
+
144
+ <td class="type">
145
+
146
+
147
+ <span class="param-type">boolean</span>
148
+
149
+
150
+
151
+ </td>
152
+
153
+
154
+
155
+
156
+
157
+ <td class="description last"><p>Is this element a Map key? The value will be
158
+ converted to string form if so.</p></td>
159
+ </tr>
160
+
161
+
162
+
163
+ <tr>
164
+
165
+ <td class="name"><code>syntax</code></td>
166
+
167
+
168
+ <td class="type">
169
+
170
+
171
+ <span class="param-type">string</span>
172
+
173
+
174
+
175
+ </td>
176
+
177
+
178
+
179
+
180
+
181
+ <td class="description last"><p>Syntax level of defining message type, e.g.,
182
+ proto2 or proto3.</p></td>
183
+ </tr>
184
+
185
+
186
+ </tbody>
187
+ </table>
188
+
189
+
190
+
191
+ <dl class="details">
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+ <dt class="tag-source">Source:</dt>
212
+ <dd class="tag-source"><ul class="dummy"><li>
213
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3754">line 3754</a>
214
+ </li></ul></dd>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ </dl>
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ </dd>
239
+
240
+
241
+ </div>
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+ <h3 class="subsection-title">Members</h3>
257
+
258
+ <dl>
259
+
260
+ <dt>
261
+ <h4 class="name" id="isMapKey"><span class="type-signature"></span>isMapKey<span class="type-signature"> :boolean</span></h4>
262
+
263
+
264
+ </dt>
265
+ <dd>
266
+
267
+ <div class="description">
268
+ <p>Element is a map key.</p>
269
+ </div>
270
+
271
+
272
+
273
+ <h5>Type:</h5>
274
+ <ul>
275
+ <li>
276
+
277
+ <span class="param-type">boolean</span>
278
+
279
+
280
+ </li>
281
+ </ul>
282
+
283
+
284
+
285
+ <dl class="details">
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+ <dt class="tag-source">Source:</dt>
306
+ <dd class="tag-source"><ul class="dummy"><li>
307
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3771">line 3771</a>
308
+ </li></ul></dd>
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+ </dl>
317
+
318
+
319
+
320
+
321
+
322
+ </dd>
323
+
324
+
325
+
326
+ <dt>
327
+ <h4 class="name" id="resolvedType"><span class="type-signature"></span>resolvedType<span class="type-signature"> :<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>|null</span></h4>
328
+
329
+
330
+ </dt>
331
+ <dd>
332
+
333
+ <div class="description">
334
+ <p>Element type reference to submessage or enum definition, if needed.</p>
335
+ </div>
336
+
337
+
338
+
339
+ <h5>Type:</h5>
340
+ <ul>
341
+ <li>
342
+
343
+ <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
344
+ |
345
+
346
+ <span class="param-type">null</span>
347
+
348
+
349
+ </li>
350
+ </ul>
351
+
352
+
353
+
354
+ <dl class="details">
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <dt class="tag-source">Source:</dt>
375
+ <dd class="tag-source"><ul class="dummy"><li>
376
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3765">line 3765</a>
377
+ </li></ul></dd>
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+ </dl>
386
+
387
+
388
+
389
+
390
+
391
+ </dd>
392
+
393
+
394
+
395
+ <dt>
396
+ <h4 class="name" id="syntax"><span class="type-signature"></span>syntax<span class="type-signature"> :string</span></h4>
397
+
398
+
399
+ </dt>
400
+ <dd>
401
+
402
+ <div class="description">
403
+ <p>Syntax level of defining message type, e.g., proto2 or proto3.</p>
404
+ </div>
405
+
406
+
407
+
408
+ <h5>Type:</h5>
409
+ <ul>
410
+ <li>
411
+
412
+ <span class="param-type">string</span>
413
+
414
+
415
+ </li>
416
+ </ul>
417
+
418
+
419
+
420
+ <dl class="details">
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+ <dt class="tag-source">Source:</dt>
441
+ <dd class="tag-source"><ul class="dummy"><li>
442
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3777">line 3777</a>
443
+ </li></ul></dd>
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+ </dl>
452
+
453
+
454
+
455
+
456
+
457
+ </dd>
458
+
459
+
460
+
461
+ <dt>
462
+ <h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :<a href="Object.html">Object</a></span></h4>
463
+
464
+
465
+ </dt>
466
+ <dd>
467
+
468
+ <div class="description">
469
+ <p>Element type, as a string (e.g., int32).</p>
470
+ </div>
471
+
472
+
473
+
474
+ <h5>Type:</h5>
475
+ <ul>
476
+ <li>
477
+
478
+ <span class="param-type"><a href="Object.html">Object</a></span>
479
+
480
+
481
+ </li>
482
+ </ul>
483
+
484
+
485
+
486
+ <dl class="details">
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+ <dt class="tag-source">Source:</dt>
507
+ <dd class="tag-source"><ul class="dummy"><li>
508
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3759">line 3759</a>
509
+ </li></ul></dd>
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+ </dl>
518
+
519
+
520
+
521
+
522
+
523
+ </dd>
524
+
525
+ </dl>
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+ </article>
534
+
535
+ </section>
536
+
537
+
538
+
539
+
540
+ </div>
541
+
542
+ <nav>
543
+ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Element.html">Element</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
544
+ </nav>
545
+
546
+ <br clear="both">
547
+
548
+ <footer>
549
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> on Mon Jun 01 2015 01:15:14 GMT+0200 (Mitteleuropäische Sommerzeit)
550
+ </footer>
551
+
552
+ <script> prettyPrint(); </script>
553
+ <script src="scripts/linenumber.js"> </script>
554
+ </body>
555
555
  </html>