Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
331cee50
Commit
331cee50
authored
Apr 01, 2016
by
Thomas Van Lenten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -position and -isAtEnd for use when manually parsing input streams.
parent
099ff1ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
GPBCodedInputStream.h
objectivec/GPBCodedInputStream.h
+9
-0
GPBCodedInputStream.m
objectivec/GPBCodedInputStream.m
+8
-0
No files found.
objectivec/GPBCodedInputStream.h
View file @
331cee50
...
@@ -109,6 +109,15 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -109,6 +109,15 @@ NS_ASSUME_NONNULL_BEGIN
/// or until an endgroup tag, whichever comes first.
/// or until an endgroup tag, whichever comes first.
-
(
void
)
skipMessage
;
-
(
void
)
skipMessage
;
/// 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
)
isAtEnd
;
/// The offset into the stream.
-
(
size_t
)
position
;
/// Verifies that the last call to @c -readTag returned the given tag value.
/// Verifies that the last call to @c -readTag returned the given tag value.
/// This is used to verify that a nested group ended with the correct end tag.
/// This is used to verify that a nested group ended with the correct end tag.
/// Throws @c NSParseErrorException if value does not match the last tag.
/// Throws @c NSParseErrorException if value does not match the last tag.
...
...
objectivec/GPBCodedInputStream.m
View file @
331cee50
...
@@ -359,6 +359,14 @@ void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state,
...
@@ -359,6 +359,14 @@ void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state,
}
}
}
}
-
(
BOOL
)
isAtEnd
{
return
GPBCodedInputStreamIsAtEnd
(
&
state_
);
}
-
(
size_t
)
position
{
return
state_
.
bufferPos
;
}
-
(
double
)
readDouble
{
-
(
double
)
readDouble
{
return
GPBCodedInputStreamReadDouble
(
&
state_
);
return
GPBCodedInputStreamReadDouble
(
&
state_
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment