33 #include <type_traits>
47 return Raw<InternalMetadataWithArenaLite>(msg, arena_offset)
48 ->mutable_unknown_fields();
51 struct UnknownFieldHandlerLite {
54 static constexpr
bool IsLite() {
return true; }
56 static bool Skip(MessageLite* msg,
const ParseTable&
table,
57 io::CodedInputStream*
input,
int tag) {
59 io::StringOutputStream unknown_fields_string(
60 MutableUnknownFields(msg,
table.arena_offset));
61 io::CodedOutputStream unknown_fields_stream(&unknown_fields_string,
false);
64 &unknown_fields_stream);
67 static void Varint(MessageLite* msg,
const ParseTable&
table,
int tag,
71 io::StringOutputStream unknown_fields_string(
72 MutableUnknownFields(msg,
table.arena_offset));
73 io::CodedOutputStream unknown_fields_stream(&unknown_fields_string,
false);
74 unknown_fields_stream.WriteVarint32(tag);
75 unknown_fields_stream.WriteVarint32(
value);
78 static bool ParseExtension(MessageLite* msg,
const ParseTable&
table,
79 io::CodedInputStream*
input,
int tag) {
81 if (extensions ==
NULL) {
85 const MessageLite* prototype =
table.default_instance();
88 io::StringOutputStream unknown_fields_string(
89 MutableUnknownFields(msg,
table.arena_offset));
90 io::CodedOutputStream unknown_fields_stream(&unknown_fields_string,
false);
91 return extensions->ParseField(tag,
input, prototype,
92 &unknown_fields_stream);