class ParseContext
Defined at line 446 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
ParseContext holds all data that is global to the entire parse. Most
importantly it contains the input stream, but also recursion depth and also
stores the end group tag, in case a parser ended on a endgroup, to verify
matching start/end group tags.
Public Members
static Spawn kSpawn
Public Methods
template <typename... T>
void ParseContext (int depth, bool aliasing, const char ** start, T &&... args)
Defined at line 454 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
template <typename... T>
void ParseContext (Spawn , const ParseContext & ctx, const char ** start, T &&... args)
Creates a new context from a given "ctx" to inherit a few attributes to
emulate continued parsing. For example, recursion depth or descriptor pools
must be passed down to a new "spawned" context to maintain the same parse
context. Note that the spawned context always disables aliasing (different
input).
Defined at line 468 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
void ParseContext (ParseContext && )
Move constructor and assignment operator are not supported because "ptr"
for parsing may have pointed to an inlined buffer (patch_buffer_) which can
be invalid afterwards.
Defined at line 479 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
ParseContext & operator= (ParseContext && )
Defined at line 480 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
ParseContext & operator= (const ParseContext & )
Defined at line 481 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
void TrackCorrectEnding ()
Defined at line 483 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
bool Done (const char ** ptr)
Done should only be called when the parsing pointer is pointing to the
beginning of field data - that is, at a tag. Or if it is NULL.
Defined at line 487 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
const char * ParseMessage (MessageLite * msg, const char * ptr)
int depth ()
Defined at line 489 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
Data & data ()
Defined at line 491 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
const Data & data ()
Defined at line 492 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
template <typename Parser = TcParser>
const char * ParseMessage (MessageLite * msg, const TcParseTableBase * tc_table, const char * ptr)
Use a template to avoid the strong dep into TcParser. All callers will have
the dep.
Defined at line 512 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
template <typename Parser = TcParser>
const char * ParseGroup (MessageLite * msg, const TcParseTableBase * tc_table, const char * ptr, uint32_t start_tag)
Defined at line 519 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
const char * ParseGroup (MessageLite * msg, const char * ptr, uint32_t tag)
Defined at line 527 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
template <typename Func>
const char * ParseLengthDelimitedInlined (const char * , const Func & func)
Read the length prefix, push the new limit, call the func(ptr), and then
pop the limit. Useful for situations that don't have an actual message.
Defined at line 1092 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h
template <typename Func>
const char * ParseGroupInlined (const char * ptr, uint32_t start_tag, const Func & func)
Push the recursion depth, call the func(ptr), and then pop depth. Useful
for situations that don't have an actual message.
Defined at line 1106 of file ../../third_party/protobuf/src/google/protobuf/parse_context.h