webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Instance Methods | Class Methods | List of all members
GPBCodedOutputStream Class Reference

#import <GPBCodedOutputStream.h>

Inheritance diagram for GPBCodedOutputStream:
NSObject

Instance Methods

(instancetype) - initWithData:
 
(instancetype) - initWithOutputStream:
 Initializes a stream to write into the given NSOutputStream. More...
 
(void- flush
 Flush any buffered data out. More...
 
(void- writeRawByte:
 Write the raw byte out. More...
 
(void- writeTag:format:
 
(void- writeRawLittleEndian32:
 Write a 32bit value out in little endian format. More...
 
(void- writeRawLittleEndian64:
 Write a 64bit value out in little endian format. More...
 
(void- writeRawVarint32:
 Write a 32bit value out in varint format. More...
 
(void- writeRawVarint64:
 Write a 64bit value out in varint format. More...
 
(void- writeRawVarintSizeTAs32:
 
(void- writeRawData:
 Writes the contents of an NSData out. More...
 
(void- writeRawPtr:offset:length:
 
(void- writeDouble:value:
 Write a double for the given field number. More...
 
(void- writeDoubleArray:values:tag:
 Write a packed array of double for the given field number. More...
 
(void- writeDoubleNoTag:
 Write a double without any tag. More...
 
(void- writeFloat:value:
 Write a float for the given field number. More...
 
(void- writeFloatArray:values:tag:
 Write a packed array of float for the given field number. More...
 
(void- writeFloatNoTag:
 Write a float without any tag. More...
 
(void- writeUInt64:value:
 Write a uint64_t for the given field number. More...
 
(void- writeUInt64Array:values:tag:
 Write a packed array of uint64_t for the given field number. More...
 
(void- writeUInt64NoTag:
 Write a uint64_t without any tag. More...
 
(void- writeInt64:value:
 Write a int64_t for the given field number. More...
 
(void- writeInt64Array:values:tag:
 Write a packed array of int64_t for the given field number. More...
 
(void- writeInt64NoTag:
 Write a int64_t without any tag. More...
 
(void- writeInt32:value:
 Write a int32_t for the given field number. More...
 
(void- writeInt32Array:values:tag:
 Write a packed array of int32_t for the given field number. More...
 
(void- writeInt32NoTag:
 Write a int32_t without any tag. More...
 
(void- writeUInt32:value:
 Write a uint32_t for the given field number. More...
 
(void- writeUInt32Array:values:tag:
 Write a packed array of uint32_t for the given field number. More...
 
(void- writeUInt32NoTag:
 Write a uint32_t without any tag. More...
 
(void- writeFixed64:value:
 Write a uint64_t for the given field number. More...
 
(void- writeFixed64Array:values:tag:
 Write a packed array of uint64_t for the given field number. More...
 
(void- writeFixed64NoTag:
 Write a uint64_t without any tag. More...
 
(void- writeFixed32:value:
 Write a uint32_t for the given field number. More...
 
(void- writeFixed32Array:values:tag:
 Write a packed array of uint32_t for the given field number. More...
 
(void- writeFixed32NoTag:
 Write a uint32_t without any tag. More...
 
(void- writeSInt32:value:
 Write a int32_t for the given field number. More...
 
(void- writeSInt32Array:values:tag:
 Write a packed array of int32_t for the given field number. More...
 
(void- writeSInt32NoTag:
 Write a int32_t without any tag. More...
 
(void- writeSInt64:value:
 Write a int64_t for the given field number. More...
 
(void- writeSInt64Array:values:tag:
 Write a packed array of int64_t for the given field number. More...
 
(void- writeSInt64NoTag:
 Write a int64_t without any tag. More...
 
(void- writeSFixed64:value:
 Write a int64_t for the given field number. More...
 
(void- writeSFixed64Array:values:tag:
 Write a packed array of int64_t for the given field number. More...
 
(void- writeSFixed64NoTag:
 Write a int64_t without any tag. More...
 
(void- writeSFixed32:value:
 Write a int32_t for the given field number. More...
 
(void- writeSFixed32Array:values:tag:
 Write a packed array of int32_t for the given field number. More...
 
(void- writeSFixed32NoTag:
 Write a int32_t without any tag. More...
 
(void- writeBool:value:
 Write a BOOL for the given field number. More...
 
(void- writeBoolArray:values:tag:
 Write a packed array of BOOL for the given field number. More...
 
(void- writeBoolNoTag:
 Write a BOOL without any tag. More...
 
(void- writeEnum:value:
 Write a int32_t for the given field number. More...
 
(void- writeEnumArray:values:tag:
 Write a packed array of int32_t for the given field number. More...
 
(void- writeEnumNoTag:
 Write a int32_t without any tag. More...
 
(void- writeString:value:
 Write a NSString for the given field number. More...
 
(void- writeStringArray:values:
 Write an array of NSString for the given field number. More...
 
(void- writeStringNoTag:
 Write a NSString without any tag. More...
 
(void- writeMessage:value:
 Write a GPBMessage for the given field number. More...
 
(void- writeMessageArray:values:
 Write an array of GPBMessage for the given field number. More...
 
(void- writeMessageNoTag:
 Write a GPBMessage without any tag. More...
 
(void- writeBytes:value:
 Write a NSData for the given field number. More...
 
(void- writeBytesArray:values:
 Write an array of NSData for the given field number. More...
 
(void- writeBytesNoTag:
 Write a NSData without any tag. More...
 
(void- writeGroup:value:
 Write a GPBMessage for the given field number. More...
 
(void- writeGroupArray:values:
 Write an array of GPBMessage for the given field number. More...
 
(void- writeGroupNoTag:value:
 Write a GPBMessage without any tag (but does write the endGroup tag). More...
 
(void- writeUnknownGroup:value:
 Write a GPBUnknownFieldSet for the given field number. More...
 
(void- writeUnknownGroupArray:values:
 Write an array of GPBUnknownFieldSet for the given field number. More...
 
(void- writeUnknownGroupNoTag:value:
 Write a GPBUnknownFieldSet without any tag (but does write the endGroup tag). More...
 
(void- writeMessageSetExtension:value:
 
(void- writeRawMessageSetExtension:value:
 

Class Methods

(instancetype) + streamWithData:
 
(instancetype) + streamWithOutputStream:
 Creates a stream to write into the given NSOutputStream. More...
 

Detailed Description

Writes out protocol message fields.

The common uses of protocol buffers shouldn't need to use this class. GPBMessage's provide a -data method that will serialize the message for you.

Note
Subclassing of GPBCodedOutputStream is NOT supported.

Method Documentation

◆ flush()

- (void) flush

Flush any buffered data out.

◆ initWithData:()

- (instancetype) initWithData: (NSMutableData *)  data

Initializes a stream to fill in the given data. Data must be sized to fit or an error will be raised when out of space.

◆ initWithOutputStream:()

- (instancetype) initWithOutputStream: (NSOutputStream *)  output

Initializes a stream to write into the given NSOutputStream.

◆ streamWithData:()

+ (instancetype) streamWithData: (NSMutableData *)  data

Creates a stream to fill in the given data. Data must be sized to fit or an error will be raised when out of space.

◆ streamWithOutputStream:()

+ (instancetype) streamWithOutputStream: (NSOutputStream *)  output

Creates a stream to write into the given NSOutputStream.

◆ writeBool:value:()

- (void) writeBool: (int32_t fieldNumber
value: (BOOL value 

Write a BOOL for the given field number.

◆ writeBoolArray:values:tag:()

- (void) writeBoolArray: (int32_t fieldNumber
values: (GPBBoolArray *)  values
tag: (uint32_t tag 

Write a packed array of BOOL for the given field number.

◆ writeBoolNoTag:()

- (void) writeBoolNoTag: (BOOL value

Write a BOOL without any tag.

◆ writeBytes:value:()

- (void) writeBytes: (int32_t fieldNumber
value: (NSData *)  value 

Write a NSData for the given field number.

◆ writeBytesArray:values:()

- (void) writeBytesArray: (int32_t fieldNumber
values: (NSArray< NSData * > *)  values 

Write an array of NSData for the given field number.

◆ writeBytesNoTag:()

- (void) writeBytesNoTag: (NSData *)  value

Write a NSData without any tag.

◆ writeDouble:value:()

- (void) writeDouble: (int32_t fieldNumber
value: (double)  value 

Write a double for the given field number.

◆ writeDoubleArray:values:tag:()

- (void) writeDoubleArray: (int32_t fieldNumber
values: (GPBDoubleArray *)  values
tag: (uint32_t tag 

Write a packed array of double for the given field number.

◆ writeDoubleNoTag:()

- (void) writeDoubleNoTag: (double)  value

Write a double without any tag.

◆ writeEnum:value:()

- (void) writeEnum: (int32_t fieldNumber
value: (int32_t value 

Write a int32_t for the given field number.

◆ writeEnumArray:values:tag:()

- (void) writeEnumArray: (int32_t fieldNumber
values: (GPBEnumArray *)  values
tag: (uint32_t tag 

Write a packed array of int32_t for the given field number.

◆ writeEnumNoTag:()

- (void) writeEnumNoTag: (int32_t value

Write a int32_t without any tag.

◆ writeFixed32:value:()

- (void) writeFixed32: (int32_t fieldNumber
value: (uint32_t value 

Write a uint32_t for the given field number.

◆ writeFixed32Array:values:tag:()

- (void) writeFixed32Array: (int32_t fieldNumber
values: (GPBUInt32Array *)  values
tag: (uint32_t tag 

Write a packed array of uint32_t for the given field number.

◆ writeFixed32NoTag:()

- (void) writeFixed32NoTag: (uint32_t value

Write a uint32_t without any tag.

◆ writeFixed64:value:()

- (void) writeFixed64: (int32_t fieldNumber
value: (uint64_t value 

Write a uint64_t for the given field number.

◆ writeFixed64Array:values:tag:()

- (void) writeFixed64Array: (int32_t fieldNumber
values: (GPBUInt64Array *)  values
tag: (uint32_t tag 

Write a packed array of uint64_t for the given field number.

◆ writeFixed64NoTag:()

- (void) writeFixed64NoTag: (uint64_t value

Write a uint64_t without any tag.

◆ writeFloat:value:()

- (void) writeFloat: (int32_t fieldNumber
value: (float)  value 

Write a float for the given field number.

◆ writeFloatArray:values:tag:()

- (void) writeFloatArray: (int32_t fieldNumber
values: (GPBFloatArray *)  values
tag: (uint32_t tag 

Write a packed array of float for the given field number.

◆ writeFloatNoTag:()

- (void) writeFloatNoTag: (float)  value

Write a float without any tag.

◆ writeGroup:value:()

- (void) writeGroup: (int32_t fieldNumber
value: (GPBMessage *)  value 

Write a GPBMessage for the given field number.

◆ writeGroupArray:values:()

- (void) writeGroupArray: (int32_t fieldNumber
values: (NSArray< GPBMessage * > *)  values 

Write an array of GPBMessage for the given field number.

◆ writeGroupNoTag:value:()

- (void) writeGroupNoTag: (int32_t fieldNumber
value: (GPBMessage *)  value 

Write a GPBMessage without any tag (but does write the endGroup tag).

◆ writeInt32:value:()

- (void) writeInt32: (int32_t fieldNumber
value: (int32_t value 

Write a int32_t for the given field number.

◆ writeInt32Array:values:tag:()

- (void) writeInt32Array: (int32_t fieldNumber
values: (GPBInt32Array *)  values
tag: (uint32_t tag 

Write a packed array of int32_t for the given field number.

◆ writeInt32NoTag:()

- (void) writeInt32NoTag: (int32_t value

Write a int32_t without any tag.

◆ writeInt64:value:()

- (void) writeInt64: (int32_t fieldNumber
value: (int64_t value 

Write a int64_t for the given field number.

◆ writeInt64Array:values:tag:()

- (void) writeInt64Array: (int32_t fieldNumber
values: (GPBInt64Array *)  values
tag: (uint32_t tag 

Write a packed array of int64_t for the given field number.

◆ writeInt64NoTag:()

- (void) writeInt64NoTag: (int64_t value

Write a int64_t without any tag.

◆ writeMessage:value:()

- (void) writeMessage: (int32_t fieldNumber
value: (GPBMessage *)  value 

Write a GPBMessage for the given field number.

◆ writeMessageArray:values:()

- (void) writeMessageArray: (int32_t fieldNumber
values: (NSArray< GPBMessage * > *)  values 

Write an array of GPBMessage for the given field number.

◆ writeMessageNoTag:()

- (void) writeMessageNoTag: (GPBMessage *)  value

Write a GPBMessage without any tag.

◆ writeMessageSetExtension:value:()

- (void) writeMessageSetExtension: (int32_t fieldNumber
value: (GPBMessage *)  value 

Write a MessageSet extension field to the stream. For historical reasons, the wire format differs from normal fields.

◆ writeRawByte:()

- (void) writeRawByte: (uint8_t value

Write the raw byte out.

◆ writeRawData:()

- (void) writeRawData: (NSData *)  data

Writes the contents of an NSData out.

◆ writeRawLittleEndian32:()

- (void) writeRawLittleEndian32: (int32_t value

Write a 32bit value out in little endian format.

◆ writeRawLittleEndian64:()

- (void) writeRawLittleEndian64: (int64_t value

Write a 64bit value out in little endian format.

◆ writeRawMessageSetExtension:value:()

- (void) writeRawMessageSetExtension: (int32_t fieldNumber
value: (NSData *)  value 

Write an unparsed MessageSet extension field to the stream. For historical reasons, the wire format differs from normal fields.

◆ writeRawPtr:offset:length:()

- (void) writeRawPtr: (const void *)  data
offset: (size_t offset
length: (size_t length 

Writes out the given data.

Parameters
dataThe data blob to write out.
offsetThe offset into the blob to start writing out.
lengthThe number of bytes from the blob to write out.

◆ writeRawVarint32:()

- (void) writeRawVarint32: (int32_t value

Write a 32bit value out in varint format.

◆ writeRawVarint64:()

- (void) writeRawVarint64: (int64_t value

Write a 64bit value out in varint format.

◆ writeRawVarintSizeTAs32:()

- (void) writeRawVarintSizeTAs32: (size_t value

Write a size_t out as a 32bit varint value.

Note
This will truncate 64 bit values to 32.

◆ writeSFixed32:value:()

- (void) writeSFixed32: (int32_t fieldNumber
value: (int32_t value 

Write a int32_t for the given field number.

◆ writeSFixed32Array:values:tag:()

- (void) writeSFixed32Array: (int32_t fieldNumber
values: (GPBInt32Array *)  values
tag: (uint32_t tag 

Write a packed array of int32_t for the given field number.

◆ writeSFixed32NoTag:()

- (void) writeSFixed32NoTag: (int32_t value

Write a int32_t without any tag.

◆ writeSFixed64:value:()

- (void) writeSFixed64: (int32_t fieldNumber
value: (int64_t value 

Write a int64_t for the given field number.

◆ writeSFixed64Array:values:tag:()

- (void) writeSFixed64Array: (int32_t fieldNumber
values: (GPBInt64Array *)  values
tag: (uint32_t tag 

Write a packed array of int64_t for the given field number.

◆ writeSFixed64NoTag:()

- (void) writeSFixed64NoTag: (int64_t value

Write a int64_t without any tag.

◆ writeSInt32:value:()

- (void) writeSInt32: (int32_t fieldNumber
value: (int32_t value 

Write a int32_t for the given field number.

◆ writeSInt32Array:values:tag:()

- (void) writeSInt32Array: (int32_t fieldNumber
values: (GPBInt32Array *)  values
tag: (uint32_t tag 

Write a packed array of int32_t for the given field number.

◆ writeSInt32NoTag:()

- (void) writeSInt32NoTag: (int32_t value

Write a int32_t without any tag.

◆ writeSInt64:value:()

- (void) writeSInt64: (int32_t fieldNumber
value: (int64_t value 

Write a int64_t for the given field number.

◆ writeSInt64Array:values:tag:()

- (void) writeSInt64Array: (int32_t fieldNumber
values: (GPBInt64Array *)  values
tag: (uint32_t tag 

Write a packed array of int64_t for the given field number.

◆ writeSInt64NoTag:()

- (void) writeSInt64NoTag: (int64_t value

Write a int64_t without any tag.

◆ writeString:value:()

- (void) writeString: (int32_t fieldNumber
value: (NSString *)  value 

Write a NSString for the given field number.

◆ writeStringArray:values:()

- (void) writeStringArray: (int32_t fieldNumber
values: (NSArray< NSString * > *)  values 

Write an array of NSString for the given field number.

◆ writeStringNoTag:()

- (void) writeStringNoTag: (NSString *)  value

Write a NSString without any tag.

◆ writeTag:format:()

- (void) writeTag: (uint32_t fieldNumber
format: (GPBWireFormat format 

Write the tag for the given field number and wire format.

Parameters
fieldNumberThe field number.
formatThe wire format the data for the field will be in.

◆ writeUInt32:value:()

- (void) writeUInt32: (int32_t fieldNumber
value: (uint32_t value 

Write a uint32_t for the given field number.

◆ writeUInt32Array:values:tag:()

- (void) writeUInt32Array: (int32_t fieldNumber
values: (GPBUInt32Array *)  values
tag: (uint32_t tag 

Write a packed array of uint32_t for the given field number.

◆ writeUInt32NoTag:()

- (void) writeUInt32NoTag: (uint32_t value

Write a uint32_t without any tag.

◆ writeUInt64:value:()

- (void) writeUInt64: (int32_t fieldNumber
value: (uint64_t value 

Write a uint64_t for the given field number.

◆ writeUInt64Array:values:tag:()

- (void) writeUInt64Array: (int32_t fieldNumber
values: (GPBUInt64Array *)  values
tag: (uint32_t tag 

Write a packed array of uint64_t for the given field number.

◆ writeUInt64NoTag:()

- (void) writeUInt64NoTag: (uint64_t value

Write a uint64_t without any tag.

◆ writeUnknownGroup:value:()

- (void) writeUnknownGroup: (int32_t fieldNumber
value: (GPBUnknownFieldSet *)  value 

Write a GPBUnknownFieldSet for the given field number.

◆ writeUnknownGroupArray:values:()

- (void) writeUnknownGroupArray: (int32_t fieldNumber
values: (NSArray< GPBUnknownFieldSet * > *)  values 

Write an array of GPBUnknownFieldSet for the given field number.

◆ writeUnknownGroupNoTag:value:()

- (void) writeUnknownGroupNoTag: (int32_t fieldNumber
value: (GPBUnknownFieldSet *)  value 

Write a GPBUnknownFieldSet without any tag (but does write the endGroup tag).


The documentation for this class was generated from the following files: