Lines Matching full:field
38 * all the fundamental field types used in protocol buffers.
126 * Begins a new message by writing the field header and returning a bookmark
128 * @param {number} field
132 jspb.BinaryWriter.prototype.beginDelimited_ = function(field) { argument
133 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
250 * @param {number} field The field number of the sub-message.
252 jspb.BinaryWriter.prototype.beginSubMessage = function(field) { argument
253 this.bookmarks_.push(this.beginDelimited_(field));
268 * Encodes a (field number, wire type) tuple into a wire-format field header
270 * @param {number} field The field number.
271 * @param {number} wireType The wire-type of the field, as specified in the
276 function(field, wireType) { argument
277 goog.asserts.assert(field >= 1 && field == Math.floor(field));
278 var x = field * 8 + wireType;
284 * Writes a field of any valid scalar type to the binary stream.
286 * @param {number} field
289 jspb.BinaryWriter.prototype.writeAny = function(fieldType, field, value) { argument
293 this.writeDouble(field, /** @type {number} */(value));
296 this.writeFloat(field, /** @type {number} */(value));
299 this.writeInt64(field, /** @type {number} */(value));
302 this.writeUint64(field, /** @type {number} */(value));
305 this.writeInt32(field, /** @type {number} */(value));
308 this.writeFixed64(field, /** @type {number} */(value));
311 this.writeFixed32(field, /** @type {number} */(value));
314 this.writeBool(field, /** @type {boolean} */(value));
317 this.writeString(field, /** @type {string} */(value));
320 goog.asserts.fail('Group field type not supported in writeAny()');
323 goog.asserts.fail('Message field type not supported in writeAny()');
326 this.writeBytes(field, /** @type {?Uint8Array} */(value));
329 this.writeUint32(field, /** @type {number} */(value));
332 this.writeEnum(field, /** @type {number} */(value));
335 this.writeSfixed32(field, /** @type {number} */(value));
338 this.writeSfixed64(field, /** @type {number} */(value));
341 this.writeSint32(field, /** @type {number} */(value));
344 this.writeSint64(field, /** @type {number} */(value));
347 this.writeFixedHash64(field, /** @type {string} */(value));
350 this.writeVarintHash64(field, /** @type {string} */(value));
353 goog.asserts.fail('Invalid field type in writeAny()');
360 * Writes a varint field to the buffer without range checking.
361 * @param {number} field The field number.
365 jspb.BinaryWriter.prototype.writeUnsignedVarint32_ = function(field, value) { argument
367 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
373 * Writes a varint field to the buffer without range checking.
374 * @param {number} field The field number.
378 jspb.BinaryWriter.prototype.writeSignedVarint32_ = function(field, value) { argument
380 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
386 * Writes a varint field to the buffer without range checking.
387 * @param {number} field The field number.
391 jspb.BinaryWriter.prototype.writeUnsignedVarint64_ = function(field, value) { argument
393 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
399 * Writes a varint field to the buffer without range checking.
400 * @param {number} field The field number.
404 jspb.BinaryWriter.prototype.writeSignedVarint64_ = function(field, value) { argument
406 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
412 * Writes a zigzag varint field to the buffer without range checking.
413 * @param {number} field The field number.
417 jspb.BinaryWriter.prototype.writeZigzagVarint32_ = function(field, value) { argument
419 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
425 * Writes a zigzag varint field to the buffer without range checking.
426 * @param {number} field The field number.
430 jspb.BinaryWriter.prototype.writeZigzagVarint64_ = function(field, value) { argument
432 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
438 * Writes an int32 field to the buffer. Numbers outside the range [-2^31,2^31)
440 * @param {number} field The field number.
443 jspb.BinaryWriter.prototype.writeInt32 = function(field, value) { argument
447 this.writeSignedVarint32_(field, value);
452 * Writes an int32 field represented as a string to the buffer. Numbers outside
454 * @param {number} field The field number.
457 jspb.BinaryWriter.prototype.writeInt32String = function(field, value) { argument
462 this.writeSignedVarint32_(field, intValue);
467 * Writes an int64 field to the buffer. Numbers outside the range [-2^63,2^63)
469 * @param {number} field The field number.
472 jspb.BinaryWriter.prototype.writeInt64 = function(field, value) { argument
476 this.writeSignedVarint64_(field, value);
481 * Writes a int64 field (with value as a string) to the buffer.
482 * @param {number} field The field number.
485 jspb.BinaryWriter.prototype.writeInt64String = function(field, value) { argument
488 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
494 * Writes a uint32 field to the buffer. Numbers outside the range [0,2^32)
496 * @param {number} field The field number.
499 jspb.BinaryWriter.prototype.writeUint32 = function(field, value) { argument
503 this.writeUnsignedVarint32_(field, value);
508 * Writes a uint32 field represented as a string to the buffer. Numbers outside
510 * @param {number} field The field number.
513 jspb.BinaryWriter.prototype.writeUint32String = function(field, value) { argument
518 this.writeUnsignedVarint32_(field, intValue);
523 * Writes a uint64 field to the buffer. Numbers outside the range [0,2^64)
525 * @param {number} field The field number.
528 jspb.BinaryWriter.prototype.writeUint64 = function(field, value) { argument
532 this.writeUnsignedVarint64_(field, value);
537 * Writes a uint64 field (with value as a string) to the buffer.
538 * @param {number} field The field number.
541 jspb.BinaryWriter.prototype.writeUint64String = function(field, value) { argument
544 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
550 * Writes a sint32 field to the buffer. Numbers outside the range [-2^31,2^31)
552 * @param {number} field The field number.
555 jspb.BinaryWriter.prototype.writeSint32 = function(field, value) { argument
559 this.writeZigzagVarint32_(field, value);
564 * Writes a sint64 field to the buffer. Numbers outside the range [-2^63,2^63)
566 * @param {number} field The field number.
569 jspb.BinaryWriter.prototype.writeSint64 = function(field, value) { argument
573 this.writeZigzagVarint64_(field, value);
578 * Writes a fixed32 field to the buffer. Numbers outside the range [0,2^32)
580 * @param {number} field The field number.
583 jspb.BinaryWriter.prototype.writeFixed32 = function(field, value) { argument
587 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.FIXED32);
593 * Writes a fixed64 field to the buffer. Numbers outside the range [0,2^64)
595 * @param {number} field The field number.
598 jspb.BinaryWriter.prototype.writeFixed64 = function(field, value) { argument
602 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.FIXED64);
608 * Writes a sfixed32 field to the buffer. Numbers outside the range
610 * @param {number} field The field number.
613 jspb.BinaryWriter.prototype.writeSfixed32 = function(field, value) { argument
617 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.FIXED32);
623 * Writes a sfixed64 field to the buffer. Numbers outside the range
625 * @param {number} field The field number.
628 jspb.BinaryWriter.prototype.writeSfixed64 = function(field, value) { argument
632 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.FIXED64);
638 * Writes a single-precision floating point field to the buffer. Numbers
640 * @param {number} field The field number.
643 jspb.BinaryWriter.prototype.writeFloat = function(field, value) { argument
645 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.FIXED32);
651 * Writes a double-precision floating point field to the buffer. As this is the
653 * @param {number} field The field number.
656 jspb.BinaryWriter.prototype.writeDouble = function(field, value) { argument
658 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.FIXED64);
664 * Writes a boolean field to the buffer.
665 * @param {number} field The field number.
668 jspb.BinaryWriter.prototype.writeBool = function(field, value) { argument
671 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
677 * Writes an enum field to the buffer.
678 * @param {number} field The field number.
681 jspb.BinaryWriter.prototype.writeEnum = function(field, value) { argument
685 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
691 * Writes a string field to the buffer.
692 * @param {number} field The field number.
695 jspb.BinaryWriter.prototype.writeString = function(field, value) { argument
697 var bookmark = this.beginDelimited_(field);
704 * Writes an arbitrary byte field to the buffer. Note - to match the behavior
706 * @param {number} field The field number.
709 jspb.BinaryWriter.prototype.writeBytes = function(field, value) { argument
712 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
721 * @param {number} field The field number.
727 field, value, writerCallback) { argument
729 var bookmark = this.beginDelimited_(field);
739 * @param {number} field The field number.
746 field, value, writerCallback) { argument
748 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.START_GROUP);
750 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.END_GROUP);
755 * Writes a 64-bit hash string field (8 characters @ 8 bits of data each) to
757 * @param {number} field The field number.
760 jspb.BinaryWriter.prototype.writeFixedHash64 = function(field, value) { argument
763 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.FIXED64);
769 * Writes a 64-bit hash string field (8 characters @ 8 bits of data each) to
771 * @param {number} field The field number.
774 jspb.BinaryWriter.prototype.writeVarintHash64 = function(field, value) { argument
777 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.VARINT);
783 * Writes an array of numbers to the buffer as a repeated varint field.
784 * @param {number} field The field number.
789 function(field, value) { argument
792 this.writeUnsignedVarint32_(field, value[i]);
798 * Writes an array of numbers to the buffer as a repeated varint field.
799 * @param {number} field The field number.
804 function(field, value) { argument
807 this.writeSignedVarint32_(field, value[i]);
813 * Writes an array of numbers to the buffer as a repeated varint field.
814 * @param {number} field The field number.
819 function(field, value) { argument
822 this.writeUnsignedVarint64_(field, value[i]);
828 * Writes an array of numbers to the buffer as a repeated varint field.
829 * @param {number} field The field number.
834 function(field, value) { argument
837 this.writeSignedVarint64_(field, value[i]);
843 * Writes an array of numbers to the buffer as a repeated zigzag field.
844 * @param {number} field The field number.
848 jspb.BinaryWriter.prototype.writeRepeatedZigzag32_ = function(field, value) { argument
851 this.writeZigzagVarint32_(field, value[i]);
857 * Writes an array of numbers to the buffer as a repeated zigzag field.
858 * @param {number} field The field number.
862 jspb.BinaryWriter.prototype.writeRepeatedZigzag_ = function(field, value) { argument
865 this.writeZigzagVarint64_(field, value[i]);
871 * Writes an array of numbers to the buffer as a repeated 32-bit int field.
872 * @param {number} field The field number.
881 * 32-bit int field.
882 * @param {number} field The field number.
886 function(field, value) { argument
889 this.writeInt32String(field, value[i]);
895 * Writes an array of numbers to the buffer as a repeated 64-bit int field.
896 * @param {number} field The field number.
905 * 64-bit int field.
906 * @param {number} field The field number.
910 function(field, value) { argument
913 this.writeInt64String(field, value[i]);
920 * field.
921 * @param {number} field The field number.
930 * unsigned 32-bit int field.
931 * @param {number} field The field number.
935 function(field, value) { argument
938 this.writeUint32String(field, value[i]);
945 * field.
946 * @param {number} field The field number.
955 * unsigned 64-bit int field.
956 * @param {number} field The field number.
960 function(field, value) { argument
963 this.writeUint64String(field, value[i]);
969 * Writes an array numbers to the buffer as a repeated signed 32-bit int field.
970 * @param {number} field The field number.
978 * Writes an array numbers to the buffer as a repeated signed 64-bit int field.
979 * @param {number} field The field number.
987 * Writes an array of numbers to the buffer as a repeated fixed32 field. This
989 * @param {number} field The field number.
992 jspb.BinaryWriter.prototype.writeRepeatedFixed32 = function(field, value) { argument
995 this.writeFixed32(field, value[i]);
1001 * Writes an array of numbers to the buffer as a repeated fixed64 field. This
1003 * @param {number} field The field number.
1006 jspb.BinaryWriter.prototype.writeRepeatedFixed64 = function(field, value) { argument
1009 this.writeFixed64(field, value[i]);
1015 * Writes an array of numbers to the buffer as a repeated sfixed32 field.
1016 * @param {number} field The field number.
1019 jspb.BinaryWriter.prototype.writeRepeatedSfixed32 = function(field, value) { argument
1022 this.writeSfixed32(field, value[i]);
1028 * Writes an array of numbers to the buffer as a repeated sfixed64 field.
1029 * @param {number} field The field number.
1032 jspb.BinaryWriter.prototype.writeRepeatedSfixed64 = function(field, value) { argument
1035 this.writeSfixed64(field, value[i]);
1041 * Writes an array of numbers to the buffer as a repeated float field.
1042 * @param {number} field The field number.
1045 jspb.BinaryWriter.prototype.writeRepeatedFloat = function(field, value) { argument
1048 this.writeFloat(field, value[i]);
1054 * Writes an array of numbers to the buffer as a repeated double field.
1055 * @param {number} field The field number.
1058 jspb.BinaryWriter.prototype.writeRepeatedDouble = function(field, value) { argument
1061 this.writeDouble(field, value[i]);
1067 * Writes an array of booleans to the buffer as a repeated bool field.
1068 * @param {number} field The field number.
1071 jspb.BinaryWriter.prototype.writeRepeatedBool = function(field, value) { argument
1074 this.writeBool(field, value[i]);
1080 * Writes an array of enums to the buffer as a repeated enum field.
1081 * @param {number} field The field number.
1084 jspb.BinaryWriter.prototype.writeRepeatedEnum = function(field, value) { argument
1087 this.writeEnum(field, value[i]);
1093 * Writes an array of strings to the buffer as a repeated string field.
1094 * @param {number} field The field number.
1097 jspb.BinaryWriter.prototype.writeRepeatedString = function(field, value) { argument
1100 this.writeString(field, value[i]);
1107 * @param {number} field The field number.
1111 jspb.BinaryWriter.prototype.writeRepeatedBytes = function(field, value) { argument
1114 this.writeBytes(field, value[i]);
1122 * @param {number} field The field number.
1129 field, value, writerCallback) { argument
1132 var bookmark = this.beginDelimited_(field);
1142 * @param {number} field The field number.
1149 field, value, writerCallback) { argument
1152 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.START_GROUP);
1154 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.END_GROUP);
1160 * Writes a 64-bit hash string field (8 characters @ 8 bits of data each) to
1162 * @param {number} field The field number.
1166 function(field, value) { argument
1169 this.writeFixedHash64(field, value[i]);
1175 * Writes a repeated 64-bit hash string field (8 characters @ 8 bits of data
1177 * @param {number} field The field number.
1181 function(field, value) { argument
1184 this.writeVarintHash64(field, value[i]);
1190 * Writes an array of numbers to the buffer as a packed varint field.
1191 * @param {number} field The field number.
1196 field, value) { argument
1198 var bookmark = this.beginDelimited_(field);
1207 * Writes an array of numbers to the buffer as a packed varint field.
1208 * @param {number} field The field number.
1213 field, value) { argument
1215 var bookmark = this.beginDelimited_(field);
1224 * Writes an array of numbers to the buffer as a packed varint field.
1225 * @param {number} field The field number.
1230 field, value) { argument
1232 var bookmark = this.beginDelimited_(field);
1241 * Writes an array of numbers to the buffer as a packed varint field.
1242 * @param {number} field The field number.
1247 field, value) { argument
1249 var bookmark = this.beginDelimited_(field);
1258 * Writes an array of numbers to the buffer as a packed zigzag field.
1259 * @param {number} field The field number.
1263 jspb.BinaryWriter.prototype.writePackedZigzag32_ = function(field, value) { argument
1265 var bookmark = this.beginDelimited_(field);
1274 * Writes an array of numbers to the buffer as a packed zigzag field.
1275 * @param {number} field The field number.
1279 jspb.BinaryWriter.prototype.writePackedZigzag64_ = function(field, value) { argument
1281 var bookmark = this.beginDelimited_(field);
1290 * Writes an array of numbers to the buffer as a packed 32-bit int field.
1291 * @param {number} field The field number.
1300 * 32-bit int field.
1301 * @param {number} field
1304 jspb.BinaryWriter.prototype.writePackedInt32String = function(field, value) { argument
1306 var bookmark = this.beginDelimited_(field);
1315 * Writes an array of numbers to the buffer as a packed 64-bit int field.
1316 * @param {number} field The field number.
1325 * 64-bit int field.
1326 * @param {number} field
1330 function(field, value) { argument
1332 var bookmark = this.beginDelimited_(field);
1342 * Writes an array numbers to the buffer as a packed unsigned 32-bit int field.
1343 * @param {number} field The field number.
1352 * unsigned 32-bit int field.
1353 * @param {number} field
1357 function(field, value) { argument
1359 var bookmark = this.beginDelimited_(field);
1368 * Writes an array numbers to the buffer as a packed unsigned 64-bit int field.
1369 * @param {number} field The field number.
1378 * unsigned 64-bit int field.
1379 * @param {number} field
1383 function(field, value) { argument
1385 var bookmark = this.beginDelimited_(field);
1395 * Writes an array numbers to the buffer as a packed signed 32-bit int field.
1396 * @param {number} field The field number.
1404 * Writes an array numbers to the buffer as a packed signed 64-bit int field.
1405 * @param {number} field The field number.
1413 * Writes an array of numbers to the buffer as a packed fixed32 field.
1414 * @param {number} field The field number.
1417 jspb.BinaryWriter.prototype.writePackedFixed32 = function(field, value) { argument
1419 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1428 * Writes an array of numbers to the buffer as a packed fixed64 field.
1429 * @param {number} field The field number.
1432 jspb.BinaryWriter.prototype.writePackedFixed64 = function(field, value) { argument
1434 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1443 * Writes an array of numbers to the buffer as a packed sfixed32 field.
1444 * @param {number} field The field number.
1447 jspb.BinaryWriter.prototype.writePackedSfixed32 = function(field, value) { argument
1449 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1458 * Writes an array of numbers to the buffer as a packed sfixed64 field.
1459 * @param {number} field The field number.
1462 jspb.BinaryWriter.prototype.writePackedSfixed64 = function(field, value) { argument
1464 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1473 * Writes an array of numbers to the buffer as a packed float field.
1474 * @param {number} field The field number.
1477 jspb.BinaryWriter.prototype.writePackedFloat = function(field, value) { argument
1479 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1488 * Writes an array of numbers to the buffer as a packed double field.
1489 * @param {number} field The field number.
1492 jspb.BinaryWriter.prototype.writePackedDouble = function(field, value) { argument
1494 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1503 * Writes an array of booleans to the buffer as a packed bool field.
1504 * @param {number} field The field number.
1507 jspb.BinaryWriter.prototype.writePackedBool = function(field, value) { argument
1509 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1518 * Writes an array of enums to the buffer as a packed enum field.
1519 * @param {number} field The field number.
1522 jspb.BinaryWriter.prototype.writePackedEnum = function(field, value) { argument
1524 var bookmark = this.beginDelimited_(field);
1533 * Writes a 64-bit hash string field (8 characters @ 8 bits of data each) to
1535 * @param {number} field The field number.
1538 jspb.BinaryWriter.prototype.writePackedFixedHash64 = function(field, value) { argument
1540 this.writeFieldHeader_(field, jspb.BinaryConstants.WireType.DELIMITED);
1549 * Writes a 64-bit hash string field (8 characters @ 8 bits of data each) to
1551 * @param {number} field The field number.
1554 jspb.BinaryWriter.prototype.writePackedVarintHash64 = function(field, value) { argument
1556 var bookmark = this.beginDelimited_(field);