webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
#import <GPBCodedInputStream.h>
Instance Methods | |
(instancetype) | - initWithData: |
Initializes a stream wrapping some data. More... | |
(int32_t) | - readTag |
(double) | - readDouble |
Read and return a double. More... | |
(float) | - readFloat |
Read and return a float. More... | |
(uint64_t) | - readUInt64 |
Read and return a uint64. More... | |
(uint32_t) | - readUInt32 |
Read and return a uint32. More... | |
(int64_t) | - readInt64 |
Read and return an int64. More... | |
(int32_t) | - readInt32 |
Read and return an int32. More... | |
(uint64_t) | - readFixed64 |
Read and return a fixed64. More... | |
(uint32_t) | - readFixed32 |
Read and return a fixed32. More... | |
(int32_t) | - readEnum |
Read and return an enum (int). More... | |
(int32_t) | - readSFixed32 |
Read and return a sfixed32. More... | |
(int64_t) | - readSFixed64 |
Read and return a sfixed64. More... | |
(int32_t) | - readSInt32 |
Read and return a sint32. More... | |
(int64_t) | - readSInt64 |
Read and return a sint64. More... | |
(BOOL) | - readBool |
Read and return a boolean. More... | |
(NSString *) | - readString |
Read and return a string. More... | |
(NSData *) | - readBytes |
Read and return length delimited data. More... | |
(void) | - readMessage:extensionRegistry: |
(BOOL) | - skipField: |
(void) | - skipMessage |
(BOOL) | - isAtEnd |
(size_t) | - position |
The offset into the stream. More... | |
(void) | - checkLastTagWas: |
(void) | - readGroup:message:extensionRegistry: [implementation] |
(void) | - readUnknownGroup:message: [implementation] |
(void) | - readMapEntry:extensionRegistry:field:parentMessage: [implementation] |
Class Methods | |
(instancetype) | + streamWithData: |
Creates a new stream wrapping some data. More... | |
Protected Attributes | |
package struct GPBCodedInputStreamState | state_ |
NSData * | buffer_ |
Reads and decodes protocol message fields.
The common uses of protocol buffers shouldn't need to use this class. GPBMessage's
provide a +parseFromData
:error: and +parseFromData
:extensionRegistry:error: method that will decode a message for you.
Verifies that the last call to -readTag
returned the given tag value. This is used to verify that a nested group ended with the correct end tag. Throws NSParseErrorException
if value does not match the last tag.
expected | The tag that was expected. |
- (instancetype) initWithData: | (NSData *) | data |
Initializes a stream wrapping some data.
- (BOOL) isAtEnd |
Check to see if the logical end of the stream has been reached.
This can return NO when there is no more data, but the current parsing expected more data.
- (BOOL) readBool |
Read and return a boolean.
- (NSData *) readBytes |
Read and return length delimited data.
- (double) readDouble |
Read and return a double.
- (int32_t) readEnum |
Read and return an enum (int).
- (uint32_t) readFixed32 |
Read and return a fixed32.
- (uint64_t) readFixed64 |
Read and return a fixed64.
- (float) readFloat |
Read and return a float.
|
implementation |
- (int32_t) readInt32 |
Read and return an int32.
- (int64_t) readInt64 |
Read and return an int64.
|
implementation |
- (void) readMessage: | (GPBMessage *) | message | |
extensionRegistry: | (nullable GPBExtensionRegistry *) | extensionRegistry | |
Read an embedded message field value from the stream.
message | The message to set fields on as they are read. |
extensionRegistry | An optional extension registry to use to lookup extensions for . |
- (int32_t) readSFixed32 |
Read and return a sfixed32.
- (int64_t) readSFixed64 |
Read and return a sfixed64.
- (int32_t) readSInt32 |
Read and return a sint32.
- (int64_t) readSInt64 |
Read and return a sint64.
- (NSString *) readString |
Read and return a string.
- (int32_t) readTag |
Attempt to read a field tag, returning zero if we have reached EOF. Protocol message parsers use this to read tags, since a protocol message may legally end wherever a tag occurs, and zero is not a valid tag number.
- (uint32_t) readUInt32 |
Read and return a uint32.
- (uint64_t) readUInt64 |
Read and return a uint64.
|
implementation |
Reads and discards a single field, given its tag value.
tag | The tag number of the field to skip. |
- (void) skipMessage |
Reads and discards an entire message. This will read either until EOF or until an endgroup tag, whichever comes first.
+ (instancetype) streamWithData: | (NSData *) | data |
Creates a new stream wrapping some data.
|
protected |
|
protected |