diff --git a/Makefile.am b/Makefile.am index 6dce2436fc..6784dd0106 100644 --- a/Makefile.am +++ b/Makefile.am @@ -371,6 +371,7 @@ java_EXTRA_DIST= java/core/src/test/proto/com/google/protobuf/outer_class_name_test.proto \ java/core/src/test/proto/com/google/protobuf/outer_class_name_test2.proto \ java/core/src/test/proto/com/google/protobuf/outer_class_name_test3.proto \ + java/core/src/test/proto/com/google/protobuf/proto2_unknown_enum_values.proto \ java/core/src/test/proto/com/google/protobuf/test_bad_identifiers.proto \ java/core/src/test/proto/com/google/protobuf/test_check_utf8.proto \ java/core/src/test/proto/com/google/protobuf/test_check_utf8_size.proto \ diff --git a/conformance/text_format_conformance_suite.cc b/conformance/text_format_conformance_suite.cc index 4483ffb374..17af09e3e8 100644 --- a/conformance/text_format_conformance_suite.cc +++ b/conformance/text_format_conformance_suite.cc @@ -221,11 +221,12 @@ void TextFormatConformanceTestSuite::RunSuiteImpl() { "optional_float: 4294967296"); RunValidTextFormatTest("FloatFieldLargerThanInt64", REQUIRED, "optional_float: 9223372036854775808"); - - ExpectParseFailure("FloatFieldTooLarge", REQUIRED, - "optional_int32: 3.4028235e+39"); - ExpectParseFailure("FloatFieldTooSmall", REQUIRED, - "optional_int32: 1.17549e-39"); + RunValidTextFormatTest("FloatFieldTooLarge", REQUIRED, + "optional_float: 3.4028235e+39"); + RunValidTextFormatTest("FloatFieldTooSmall", REQUIRED, + "optional_float: 1.17549e-39"); + RunValidTextFormatTest("FloatFieldLargerThanUint64", REQUIRED, + "optional_float: 18446744073709551616"); // Group fields RunValidTextFormatTestProto2("GroupFieldNoColon", REQUIRED, diff --git a/conformance/text_format_failure_list_python.txt b/conformance/text_format_failure_list_python.txt new file mode 100644 index 0000000000..9a8709dcb1 --- /dev/null +++ b/conformance/text_format_failure_list_python.txt @@ -0,0 +1,3 @@ +# This is the list of text format conformance tests that are known to fail right +# now. +# TODO: These should be fixed. diff --git a/java/core/generate-test-sources-build.xml b/java/core/generate-test-sources-build.xml index 1d11f13144..6016353471 100644 --- a/java/core/generate-test-sources-build.xml +++ b/java/core/generate-test-sources-build.xml @@ -30,7 +30,8 @@ - + + diff --git a/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java b/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java index 975cb90e00..53771de86d 100644 --- a/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java +++ b/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java @@ -32,6 +32,7 @@ package com.google.protobuf; import static com.google.protobuf.WireFormat.FIXED32_SIZE; import static com.google.protobuf.WireFormat.FIXED64_SIZE; +import static com.google.protobuf.WireFormat.MAX_VARINT32_SIZE; import static com.google.protobuf.WireFormat.MAX_VARINT_SIZE; import static java.lang.Math.max; @@ -1263,7 +1264,7 @@ public abstract class CodedOutputStream extends ByteOutput { @Override public final void writeUInt32NoTag(int value) throws IOException { - if (HAS_UNSAFE_ARRAY_OPERATIONS && spaceLeft() >= MAX_VARINT_SIZE) { + if (HAS_UNSAFE_ARRAY_OPERATIONS && spaceLeft() >= MAX_VARINT32_SIZE) { while (true) { if ((value & ~0x7F) == 0) { UnsafeUtil.putByte(buffer, position++, (byte) value); @@ -2447,7 +2448,7 @@ public abstract class CodedOutputStream extends ByteOutput { @Override public void writeUInt32NoTag(int value) throws IOException { - flushIfNotAvailable(MAX_VARINT_SIZE); + flushIfNotAvailable(MAX_VARINT32_SIZE); bufferUInt32NoTag(value); } @@ -2750,7 +2751,7 @@ public abstract class CodedOutputStream extends ByteOutput { @Override public void writeUInt32NoTag(int value) throws IOException { - flushIfNotAvailable(MAX_VARINT_SIZE); + flushIfNotAvailable(MAX_VARINT32_SIZE); bufferUInt32NoTag(value); } diff --git a/java/core/src/main/java/com/google/protobuf/Descriptors.java b/java/core/src/main/java/com/google/protobuf/Descriptors.java index 8b7e1cc64b..fc51a8438f 100644 --- a/java/core/src/main/java/com/google/protobuf/Descriptors.java +++ b/java/core/src/main/java/com/google/protobuf/Descriptors.java @@ -314,14 +314,7 @@ public final class Descriptors { return result; } - /** - * This method is to be called by generated code only. It is equivalent to {@code buildFrom} - * except that the {@code FileDescriptorProto} is encoded in protocol buffer wire format. - */ - public static void internalBuildGeneratedFileFrom( - final String[] descriptorDataParts, - final FileDescriptor[] dependencies, - final InternalDescriptorAssigner descriptorAssigner) { + private static byte[] latin1Cat(final String[] strings) { // Hack: We can't embed a raw byte array inside generated Java code // (at least, not efficiently), but we can embed Strings. So, the // protocol compiler embeds the FileDescriptorProto as a giant @@ -330,16 +323,45 @@ public final class Descriptors { // characters, each one representing a byte of the FileDescriptorProto's // serialized form. So, if we convert it to bytes in ISO-8859-1, we // should get the original bytes that we want. - - // descriptorData may contain multiple strings in order to get around the - // Java 64k string literal limit. + // Literal strings are limited to 64k, so it may be split into multiple strings. + if (strings.length == 1) { + return strings[0].getBytes(Internal.ISO_8859_1); + } StringBuilder descriptorData = new StringBuilder(); - for (String part : descriptorDataParts) { + for (String part : strings) { descriptorData.append(part); } + return descriptorData.toString().getBytes(Internal.ISO_8859_1); + } - final byte[] descriptorBytes; - descriptorBytes = descriptorData.toString().getBytes(Internal.ISO_8859_1); + private static FileDescriptor[] findDescriptors( + final Class descriptorOuterClass, + final String[] dependencyClassNames, + final String[] dependencyFileNames) { + List descriptors = new ArrayList(); + for (int i = 0; i < dependencyClassNames.length; i++) { + try { + Class clazz = descriptorOuterClass.getClassLoader().loadClass(dependencyClassNames[i]); + descriptors.add((FileDescriptor) clazz.getField("descriptor").get(null)); + } catch (Exception e) { + // We allow unknown dependencies by default. If a dependency cannot + // be found we only generate a warning. + logger.warning("Descriptors for \"" + dependencyFileNames[i] + "\" can not be found."); + } + } + return descriptors.toArray(new FileDescriptor[0]); + } + + /** + * This method is for backward compatibility with generated code which passed an + * InternalDescriptorAssigner. + */ + @Deprecated + public static void internalBuildGeneratedFileFrom( + final String[] descriptorDataParts, + final FileDescriptor[] dependencies, + final InternalDescriptorAssigner descriptorAssigner) { + final byte[] descriptorBytes = latin1Cat(descriptorDataParts); FileDescriptorProto proto; try { @@ -375,29 +397,61 @@ public final class Descriptors { } /** - * This method is to be called by generated code only. It uses Java reflection to load the - * dependencies' descriptors. + * This method is to be called by generated code only. It is equivalent to {@code buildFrom} + * except that the {@code FileDescriptorProto} is encoded in protocol buffer wire format. */ + public static FileDescriptor internalBuildGeneratedFileFrom( + final String[] descriptorDataParts, + final FileDescriptor[] dependencies) { + final byte[] descriptorBytes = latin1Cat(descriptorDataParts); + + FileDescriptorProto proto; + try { + proto = FileDescriptorProto.parseFrom(descriptorBytes); + } catch (InvalidProtocolBufferException e) { + throw new IllegalArgumentException( + "Failed to parse protocol buffer descriptor for generated code.", e); + } + + try { + // When building descriptors for generated code, we allow unknown + // dependencies by default. + return buildFrom(proto, dependencies, true); + } catch (DescriptorValidationException e) { + throw new IllegalArgumentException( + "Invalid embedded descriptor for \"" + proto.getName() + "\".", e); + } + } + + /** + * This method is for backward compatibility with generated code which passed an + * InternalDescriptorAssigner. + */ + @Deprecated public static void internalBuildGeneratedFileFrom( final String[] descriptorDataParts, final Class descriptorOuterClass, - final String[] dependencies, + final String[] dependencyClassNames, final String[] dependencyFileNames, final InternalDescriptorAssigner descriptorAssigner) { - List descriptors = new ArrayList(); - for (int i = 0; i < dependencies.length; i++) { - try { - Class clazz = descriptorOuterClass.getClassLoader().loadClass(dependencies[i]); - descriptors.add((FileDescriptor) clazz.getField("descriptor").get(null)); - } catch (Exception e) { - // We allow unknown dependencies by default. If a dependency cannot - // be found we only generate a warning. - logger.warning("Descriptors for \"" + dependencyFileNames[i] + "\" can not be found."); - } - } - FileDescriptor[] descriptorArray = new FileDescriptor[descriptors.size()]; - descriptors.toArray(descriptorArray); - internalBuildGeneratedFileFrom(descriptorDataParts, descriptorArray, descriptorAssigner); + FileDescriptor[] dependencies = findDescriptors( + descriptorOuterClass, dependencyClassNames, dependencyFileNames); + internalBuildGeneratedFileFrom( + descriptorDataParts, dependencies, descriptorAssigner); + } + + /** + * This method is to be called by generated code only. It uses Java reflection to load the + * dependencies' descriptors. + */ + public static FileDescriptor internalBuildGeneratedFileFrom( + final String[] descriptorDataParts, + final Class descriptorOuterClass, + final String[] dependencyClassNames, + final String[] dependencyFileNames) { + FileDescriptor[] dependencies = findDescriptors( + descriptorOuterClass, dependencyClassNames, dependencyFileNames); + return internalBuildGeneratedFileFrom(descriptorDataParts, dependencies); } /** @@ -427,7 +481,10 @@ public final class Descriptors { * extensions which might be used in the descriptor -- that is, extensions of the various * "Options" messages defined in descriptor.proto. The callback may also return null to indicate * that no extensions are used in the descriptor. + * + * This interface is deprecated. Use the return value of internalBuildGeneratedFrom() instead. */ + @Deprecated public interface InternalDescriptorAssigner { ExtensionRegistry assignDescriptors(FileDescriptor root); } diff --git a/java/core/src/main/java/com/google/protobuf/MessageReflection.java b/java/core/src/main/java/com/google/protobuf/MessageReflection.java index cbcf938164..6741e1cb9c 100644 --- a/java/core/src/main/java/com/google/protobuf/MessageReflection.java +++ b/java/core/src/main/java/com/google/protobuf/MessageReflection.java @@ -804,12 +804,15 @@ class MessageReflection { field, field.getEnumType().findValueByNumberCreatingIfUnknown(rawValue)); } else { final Object value = field.getEnumType().findValueByNumber(rawValue); + // If the number isn't recognized as a valid value for this enum, + // add it to the unknown fields. if (value == null) { - // If the number isn't recognized as a valid value for this - // enum, drop it (don't even add it to unknownFields). - return true; + if (unknownFields != null) { + unknownFields.mergeVarintField(fieldNumber, rawValue); + } + } else { + target.addRepeatedField(field, value); } - target.addRepeatedField(field, value); } } } else { @@ -841,7 +844,7 @@ class MessageReflection { } else { value = field.getEnumType().findValueByNumber(rawValue); // If the number isn't recognized as a valid value for this enum, - // drop it. + // add it to the unknown fields. if (value == null) { if (unknownFields != null) { unknownFields.mergeVarintField(fieldNumber, rawValue); diff --git a/java/core/src/main/java/com/google/protobuf/RopeByteString.java b/java/core/src/main/java/com/google/protobuf/RopeByteString.java index 140cbe45af..c3bec7b1a1 100644 --- a/java/core/src/main/java/com/google/protobuf/RopeByteString.java +++ b/java/core/src/main/java/com/google/protobuf/RopeByteString.java @@ -77,36 +77,58 @@ final class RopeByteString extends ByteString { * in deeper binary trees. * *

For 32-bit integers, this array has length 46. + * + *

The correctness of this constant array is validated in tests. */ - private static final int[] minLengthByDepth; - - static { - // Dynamically generate the list of Fibonacci numbers the first time this - // class is accessed. - List numbers = new ArrayList(); - - // we skip the first Fibonacci number (1). So instead of: 1 1 2 3 5 8 ... - // we have: 1 2 3 5 8 ... - int f1 = 1; - int f2 = 1; - - // get all the values until we roll over. - while (f2 > 0) { - numbers.add(f2); - int temp = f1 + f2; - f1 = f2; - f2 = temp; - } - - // we include this here so that we can index this array to [x + 1] in the - // loops below. - numbers.add(Integer.MAX_VALUE); - minLengthByDepth = new int[numbers.size()]; - for (int i = 0; i < minLengthByDepth.length; i++) { - // unbox all the values - minLengthByDepth[i] = numbers.get(i); - } - } + static final int[] minLengthByDepth = { + 1, + 1, + 2, + 3, + 5, + 8, + 13, + 21, + 34, + 55, + 89, + 144, + 233, + 377, + 610, + 987, + 1597, + 2584, + 4181, + 6765, + 10946, + 17711, + 28657, + 46368, + 75025, + 121393, + 196418, + 317811, + 514229, + 832040, + 1346269, + 2178309, + 3524578, + 5702887, + 9227465, + 14930352, + 24157817, + 39088169, + 63245986, + 102334155, + 165580141, + 267914296, + 433494437, + 701408733, + 1134903170, + 1836311903, + Integer.MAX_VALUE + }; private final int totalLength; private final ByteString left; @@ -686,11 +708,19 @@ final class RopeByteString extends ByteString { *

This iterator is used to implement {@link RopeByteString#equalsFragments(ByteString)}. */ private static final class PieceIterator implements Iterator { - private final ArrayDeque breadCrumbs = new ArrayDeque<>(); + private final ArrayDeque breadCrumbs; private LeafByteString next; private PieceIterator(ByteString root) { - next = getLeafByLeft(root); + if (root instanceof RopeByteString) { + RopeByteString rbs = (RopeByteString) root; + breadCrumbs = new ArrayDeque<>(rbs.getTreeDepth()); + breadCrumbs.push(rbs); + next = getLeafByLeft(rbs.left); + } else { + breadCrumbs = null; + next = (LeafByteString) root; + } } private LeafByteString getLeafByLeft(ByteString root) { @@ -707,7 +737,7 @@ final class RopeByteString extends ByteString { while (true) { // Almost always, we go through this loop exactly once. However, if // we discover an empty string in the rope, we toss it and try again. - if (breadCrumbs.isEmpty()) { + if (breadCrumbs == null || breadCrumbs.isEmpty()) { return null; } else { LeafByteString result = getLeafByLeft(breadCrumbs.pop().right); diff --git a/java/core/src/main/java/com/google/protobuf/UnsafeUtil.java b/java/core/src/main/java/com/google/protobuf/UnsafeUtil.java index ddd358564b..74c2012749 100644 --- a/java/core/src/main/java/com/google/protobuf/UnsafeUtil.java +++ b/java/core/src/main/java/com/google/protobuf/UnsafeUtil.java @@ -48,7 +48,7 @@ final class UnsafeUtil { supportsUnsafeByteBufferOperations(); private static final boolean HAS_UNSAFE_ARRAY_OPERATIONS = supportsUnsafeArrayOperations(); - private static final long BYTE_ARRAY_BASE_OFFSET = arrayBaseOffset(byte[].class); + static final long BYTE_ARRAY_BASE_OFFSET = arrayBaseOffset(byte[].class); // Micro-optimization: we can assume a scale of 1 and skip the multiply // private static final long BYTE_ARRAY_INDEX_SCALE = 1; @@ -72,6 +72,13 @@ final class UnsafeUtil { private static final long BUFFER_ADDRESS_OFFSET = fieldOffset(bufferAddressField()); + private static final int STRIDE = 8; + private static final int STRIDE_ALIGNMENT_MASK = STRIDE - 1; + private static final int BYTE_ARRAY_ALIGNMENT = + (int) (BYTE_ARRAY_BASE_OFFSET & STRIDE_ALIGNMENT_MASK); + + static final boolean IS_BIG_ENDIAN = ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN; + private UnsafeUtil() {} static boolean hasUnsafeArrayOperations() { @@ -382,6 +389,80 @@ final class UnsafeUtil { return field != null && field.getType() == long.class ? field : null; } + /** + * Returns the index of the first byte where left and right differ, in the range [0, 8]. If {@code + * left == right}, the result will be 8, otherwise less than 8. + * + *

This counts from the *first* byte, which may be the most or least significant byte depending + * on the system endianness. + */ + private static int firstDifferingByteIndexNativeEndian(long left, long right) { + int n = + IS_BIG_ENDIAN + ? Long.numberOfLeadingZeros(left ^ right) + : Long.numberOfTrailingZeros(left ^ right); + return n >> 3; + } + + /** + * Returns the lowest {@code index} such that {@code 0 <= index < length} and {@code left[leftOff + * + index] != right[rightOff + index]}. If no such value exists -- if {@code left} and {@code + * right} match up to {@code length} bytes from their respective offsets -- returns -1. + * + *

{@code leftOff + length} must be less than or equal to {@code left.length}, and the same for + * {@code right}. + */ + static int mismatch(byte[] left, int leftOff, byte[] right, int rightOff, int length) { + if (leftOff < 0 + || rightOff < 0 + || length < 0 + || leftOff + length > left.length + || rightOff + length > right.length) { + throw new IndexOutOfBoundsException(); + } + + int index = 0; + if (HAS_UNSAFE_ARRAY_OPERATIONS) { + int leftAlignment = (BYTE_ARRAY_ALIGNMENT + leftOff) & STRIDE_ALIGNMENT_MASK; + + // Most CPUs handle getting chunks of bytes better on addresses that are a multiple of 4 + // or 8. + // We walk one byte at a time until the left address, at least, is a multiple of 8. + // If the right address is, too, so much the better. + for (; + index < length && (leftAlignment & STRIDE_ALIGNMENT_MASK) != 0; + index++, leftAlignment++) { + if (left[leftOff + index] != right[rightOff + index]) { + return index; + } + } + + // Stride! Grab eight bytes at a time from left and right and check them for equality. + + int strideLength = ((length - index) & ~STRIDE_ALIGNMENT_MASK) + index; + // strideLength is the point where we want to stop striding: it differs from index by + // a multiple of STRIDE, and it's the largest such number <= length. + + for (; index < strideLength; index += STRIDE) { + long leftLongWord = getLong(left, BYTE_ARRAY_BASE_OFFSET + leftOff + index); + long rightLongWord = getLong(right, BYTE_ARRAY_BASE_OFFSET + rightOff + index); + if (leftLongWord != rightLongWord) { + // one of these eight bytes differ! use a helper to find out which one + return index + firstDifferingByteIndexNativeEndian(leftLongWord, rightLongWord); + } + } + } + + // If we were able to stride, there are at most STRIDE - 1 bytes left to compare. + // If we weren't, then this loop covers the whole thing. + for (; index < length; index++) { + if (left[leftOff + index] != right[rightOff + index]) { + return index; + } + } + return -1; + } + /** * Returns the offset of the provided field, or {@code -1} if {@code sun.misc.Unsafe} is not * available. diff --git a/java/core/src/test/java/com/google/protobuf/RopeByteStringTest.java b/java/core/src/test/java/com/google/protobuf/RopeByteStringTest.java index 59e8ede1db..9299267212 100644 --- a/java/core/src/test/java/com/google/protobuf/RopeByteStringTest.java +++ b/java/core/src/test/java/com/google/protobuf/RopeByteStringTest.java @@ -62,6 +62,21 @@ public class RopeByteStringTest extends LiteralByteStringTest { expectedHashCode = -1214197238; } + public void testMinLengthByDepth() { + // minLengthByDepth should match the Fibonacci sequence + int a = 1; + int b = 1; + int i; + for (i = 0; a > 0; i++) { + assertEquals(a, RopeByteString.minLengthByDepth[i]); + int c = a + b; + a = b; + b = c; + } + assertEquals(Integer.MAX_VALUE, RopeByteString.minLengthByDepth[i]); + assertEquals(i + 1, RopeByteString.minLengthByDepth.length); + } + @Override public void testGetTreeDepth() { assertEquals( diff --git a/java/core/src/test/java/com/google/protobuf/ServiceTest.java b/java/core/src/test/java/com/google/protobuf/ServiceTest.java index d9a6d7ce5c..1592433c2f 100644 --- a/java/core/src/test/java/com/google/protobuf/ServiceTest.java +++ b/java/core/src/test/java/com/google/protobuf/ServiceTest.java @@ -32,7 +32,6 @@ package com.google.protobuf; import com.google.protobuf.Descriptors.FileDescriptor; import com.google.protobuf.Descriptors.MethodDescriptor; -import google.protobuf.no_generic_services_test.UnittestNoGenericServices; import protobuf_unittest.MessageWithNoOuter; import protobuf_unittest.ServiceWithNoOuter; import protobuf_unittest.UnittestProto.BarRequest; @@ -41,6 +40,7 @@ import protobuf_unittest.UnittestProto.FooRequest; import protobuf_unittest.UnittestProto.FooResponse; import protobuf_unittest.UnittestProto.TestAllTypes; import protobuf_unittest.UnittestProto.TestService; +import protobuf_unittest.no_generic_services_test.UnittestNoGenericServices; import java.util.HashSet; import java.util.Set; import junit.framework.TestCase; @@ -227,7 +227,7 @@ public class ServiceTest extends TestCase { // Build a list of the class names nested in UnittestNoGenericServices. String outerName = - "google.protobuf.no_generic_services_test.UnittestNoGenericServices"; + "protobuf_unittest.no_generic_services_test.UnittestNoGenericServices"; Class outerClass = Class.forName(outerName); Set innerClassNames = new HashSet(); diff --git a/java/core/src/test/java/com/google/protobuf/UnknownEnumValueTest.java b/java/core/src/test/java/com/google/protobuf/UnknownEnumValueTest.java index cc18547bb3..ae4e086ee1 100644 --- a/java/core/src/test/java/com/google/protobuf/UnknownEnumValueTest.java +++ b/java/core/src/test/java/com/google/protobuf/UnknownEnumValueTest.java @@ -35,6 +35,10 @@ import com.google.protobuf.Descriptors.EnumDescriptor; import com.google.protobuf.Descriptors.EnumValueDescriptor; import com.google.protobuf.Descriptors.FieldDescriptor; import com.google.protobuf.FieldPresenceTestProto.TestAllTypes; +import com.google.protobuf.Proto2UnknownEnumValuesTestProto.Proto2EnumMessage; +import com.google.protobuf.Proto2UnknownEnumValuesTestProto.Proto2EnumMessageWithEnumSubset; +import com.google.protobuf.Proto2UnknownEnumValuesTestProto.Proto2TestEnum; +import com.google.protobuf.Proto2UnknownEnumValuesTestProto.Proto2TestEnumSubset; import com.google.protobuf.TextFormat.ParseException; import junit.framework.TestCase; @@ -42,6 +46,7 @@ import junit.framework.TestCase; * Unit tests for protos that keep unknown enum values rather than discard them as unknown fields. */ public class UnknownEnumValueTest extends TestCase { + public void testUnknownEnumValues() throws Exception { TestAllTypes.Builder builder = TestAllTypes.newBuilder(); builder.setOptionalNestedEnumValue(4321); @@ -245,4 +250,61 @@ public class UnknownEnumValueTest extends TestCase { // expected. } } + + public void testUnknownEnumValuesInProto2() throws Exception { + Proto2EnumMessage.Builder sourceMessage = Proto2EnumMessage.newBuilder(); + sourceMessage + .addRepeatedPackedEnum(Proto2TestEnum.ZERO) + .addRepeatedPackedEnum(Proto2TestEnum.TWO) // Unknown in parsed proto + .addRepeatedPackedEnum(Proto2TestEnum.ONE); + + Proto2EnumMessageWithEnumSubset destMessage = + Proto2EnumMessageWithEnumSubset.parseFrom(sourceMessage.build().toByteArray()); + + // Known enum values should be preserved. + assertEquals(2, destMessage.getRepeatedPackedEnumCount()); + assertEquals(Proto2TestEnumSubset.TESTENUM_SUBSET_ZERO, destMessage.getRepeatedPackedEnum(0)); + assertEquals(Proto2TestEnumSubset.TESTENUM_SUBSET_ONE, destMessage.getRepeatedPackedEnum(1)); + + // Unknown enum values should be found in UnknownFieldSet. + UnknownFieldSet unknown = destMessage.getUnknownFields(); + assertEquals( + Proto2TestEnum.TWO_VALUE, + unknown + .getField(Proto2EnumMessageWithEnumSubset.REPEATED_PACKED_ENUM_FIELD_NUMBER) + .getVarintList() + .get(0) + .longValue()); + } + + public void testUnknownEnumValuesInProto2WithDynamicMessage() throws Exception { + Descriptor descriptor = Proto2EnumMessageWithEnumSubset.getDescriptor(); + FieldDescriptor repeatedPackedField = descriptor.findFieldByName("repeated_packed_enum"); + + Proto2EnumMessage.Builder sourceMessage = Proto2EnumMessage.newBuilder(); + sourceMessage + .addRepeatedPackedEnum(Proto2TestEnum.ZERO) + .addRepeatedPackedEnum(Proto2TestEnum.TWO) // Unknown in parsed proto + .addRepeatedPackedEnum(Proto2TestEnum.ONE); + + DynamicMessage message = + DynamicMessage.parseFrom( + Proto2EnumMessageWithEnumSubset.getDescriptor(), sourceMessage.build().toByteArray()); + + // Known enum values should be preserved. + assertEquals(2, message.getRepeatedFieldCount(repeatedPackedField)); + EnumValueDescriptor enumValue0 = + (EnumValueDescriptor) message.getRepeatedField(repeatedPackedField, 0); + EnumValueDescriptor enumValue1 = + (EnumValueDescriptor) message.getRepeatedField(repeatedPackedField, 1); + + assertEquals(Proto2TestEnumSubset.TESTENUM_SUBSET_ZERO_VALUE, enumValue0.getNumber()); + assertEquals(Proto2TestEnumSubset.TESTENUM_SUBSET_ONE_VALUE, enumValue1.getNumber()); + + // Unknown enum values should be found in UnknownFieldSet. + UnknownFieldSet unknown = message.getUnknownFields(); + assertEquals( + Proto2TestEnum.TWO_VALUE, + unknown.getField(repeatedPackedField.getNumber()).getVarintList().get(0).longValue()); + } } diff --git a/conformance/binary_json_conformance_main.cc b/java/core/src/test/proto/com/google/protobuf/proto2_unknown_enum_values.proto similarity index 67% rename from conformance/binary_json_conformance_main.cc rename to java/core/src/test/proto/com/google/protobuf/proto2_unknown_enum_values.proto index 3e8df7343f..5d470ac0e3 100644 --- a/conformance/binary_json_conformance_main.cc +++ b/java/core/src/test/proto/com/google/protobuf/proto2_unknown_enum_values.proto @@ -28,10 +28,33 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "binary_json_conformance_suite.h" -#include "conformance_test.h" +syntax = "proto2"; -int main(int argc, char *argv[]) { - google::protobuf::BinaryAndJsonConformanceSuite suite; - return google::protobuf::ForkPipeRunner::Run(argc, argv, &suite); +package proto2_unknown_enum_values; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "Proto2UnknownEnumValuesTestProto"; + +enum Proto2TestEnum { + ZERO = 0; + ONE = 1; + TWO = 2; +} + +message Proto2EnumMessage { + repeated Proto2TestEnum repeated_packed_enum = 1 [packed = true]; +} + +// An enum containing a subset of the values of Proto2TestEnum, to test +// parsing unknown packed enum values +enum Proto2TestEnumSubset { + TESTENUM_SUBSET_ZERO = 0; + TESTENUM_SUBSET_ONE = 1; + // No enum value with number 2. +} + +// Test messages for packed enum, with identical field number as +// Proto2Message, to test parsing unknown packed enums. +message Proto2EnumMessageWithEnumSubset { + repeated Proto2TestEnumSubset repeated_packed_enum = 1 [packed = true]; } diff --git a/js/compatibility_tests/v3.1.0/message_test.js b/js/compatibility_tests/v3.1.0/message_test.js index c1023784fa..d5c73742b6 100644 --- a/js/compatibility_tests/v3.1.0/message_test.js +++ b/js/compatibility_tests/v3.1.0/message_test.js @@ -102,14 +102,14 @@ describe('Message test suite', function() { }); it('testComplexConversion', function() { - var data1 = ['a',,, [, 11], [[, 22], [, 33]],, ['s1', 's2'],, 1]; - var data2 = ['a',,, [, 11], [[, 22], [, 33]],, ['s1', 's2'],, 1]; + var data1 = ['a',,, [, 11], [[, 22], [, 33]],, ['s1', 's2'],, true]; + var data2 = ['a',,, [, 11], [[, 22], [, 33]],, ['s1', 's2'],, true]; var foo = new proto.jspb.test.Complex(data1); var bar = new proto.jspb.test.Complex(data2); var result = foo.toObject(); assertObjectEquals({ aString: 'a', - anOutOfOrderBool: 1, + anOutOfOrderBool: true, aNestedMessage: { anInt: 11 }, @@ -121,7 +121,7 @@ describe('Message test suite', function() { result = foo.toObject(true /* opt_includeInstance */); assertObjectEquals({ aString: 'a', - anOutOfOrderBool: 1, + anOutOfOrderBool: true, aNestedMessage: { anInt: 11, $jspbMessageInstance: foo.getANestedMessage() diff --git a/js/message.js b/js/message.js index eb546784a0..7adcc25d1a 100644 --- a/js/message.js +++ b/js/message.js @@ -268,12 +268,12 @@ jspb.Message.prototype.messageId_; /** - * Repeated float or double fields which have been converted to include only - * numbers and not strings holding "NaN", "Infinity" and "-Infinity". + * Repeated fields that have been converted to their proper type. This is used + * for numbers stored as strings (typically "NaN", "Infinity" and "-Infinity") + * and for booleans stored as numbers (0 or 1). * @private {!Object|undefined} */ -jspb.Message.prototype.convertedFloatingPointFields_; - +jspb.Message.prototype.convertedPrimitiveFields_; /** * Repeated fields numbers. @@ -368,7 +368,7 @@ jspb.Message.initialize = function( msg.arrayIndexOffset_ = messageId === 0 ? -1 : 0; msg.array = data; jspb.Message.initPivotAndExtensionObject_(msg, suggestedPivot); - msg.convertedFloatingPointFields_ = {}; + msg.convertedPrimitiveFields_ = {}; if (!jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS) { // TODO(jakubvrana): This is same for all instances, move to prototype. @@ -718,6 +718,20 @@ jspb.Message.getOptionalFloatingPointField = function(msg, fieldNumber) { }; +/** + * Gets the value of an optional boolean field. + * @param {!jspb.Message} msg A jspb proto. + * @param {number} fieldNumber The field number. + * @return {?boolean|undefined} The field's value. + * @protected + */ +jspb.Message.getBooleanField = function(msg, fieldNumber) { + var value = jspb.Message.getField(msg, fieldNumber); + // TODO(b/122673075): always return null when the value is null-ish. + return value == null ? (value) : !!value; +}; + + /** * Gets the value of a repeated float or double field. * @param {!jspb.Message} msg A jspb proto. @@ -727,20 +741,42 @@ jspb.Message.getOptionalFloatingPointField = function(msg, fieldNumber) { */ jspb.Message.getRepeatedFloatingPointField = function(msg, fieldNumber) { var values = jspb.Message.getRepeatedField(msg, fieldNumber); - if (!msg.convertedFloatingPointFields_) { - msg.convertedFloatingPointFields_ = {}; + if (!msg.convertedPrimitiveFields_) { + msg.convertedPrimitiveFields_ = {}; } - if (!msg.convertedFloatingPointFields_[fieldNumber]) { + if (!msg.convertedPrimitiveFields_[fieldNumber]) { for (var i = 0; i < values.length; i++) { // Converts "NaN", "Infinity" and "-Infinity" to their corresponding // numbers. values[i] = +values[i]; } - msg.convertedFloatingPointFields_[fieldNumber] = true; + msg.convertedPrimitiveFields_[fieldNumber] = true; } return /** @type {!Array} */ (values); }; +/** + * Gets the value of a repeated boolean field. + * @param {!jspb.Message} msg A jspb proto. + * @param {number} fieldNumber The field number. + * @return {!Array} The field's value. + * @protected + */ +jspb.Message.getRepeatedBooleanField = function(msg, fieldNumber) { + var values = jspb.Message.getRepeatedField(msg, fieldNumber); + if (!msg.convertedPrimitiveFields_) { + msg.convertedPrimitiveFields_ = {}; + } + if (!msg.convertedPrimitiveFields_[fieldNumber]) { + for (var i = 0; i < values.length; i++) { + // Converts 0 and 1 to their corresponding booleans. + values[i] = !!values[i]; + } + msg.convertedPrimitiveFields_[fieldNumber] = true; + } + return /** @type {!Array} */ (values); +}; + /** * Coerce a 'bytes' field to a base 64 string. @@ -849,6 +885,49 @@ jspb.Message.getFieldWithDefault = function(msg, fieldNumber, defaultValue) { }; +/** + * Gets the value of a boolean field, with proto3 (non-nullable primitives) + * semantics. Returns `defaultValue` if the field is not otherwise set. + * @template T + * @param {!jspb.Message} msg A jspb proto. + * @param {number} fieldNumber The field number. + * @param {boolean} defaultValue The default value. + * @return {boolean} The field's value. + * @protected + */ +jspb.Message.getBooleanFieldWithDefault = function( + msg, fieldNumber, defaultValue) { + var value = jspb.Message.getBooleanField(msg, fieldNumber); + if (value == null) { + return defaultValue; + } else { + return value; + } +}; + + +/** + * Gets the value of a floating point field, with proto3 (non-nullable + * primitives) semantics. Returns `defaultValue` if the field is not otherwise + * set. + * @template T + * @param {!jspb.Message} msg A jspb proto. + * @param {number} fieldNumber The field number. + * @param {number} defaultValue The default value. + * @return {number} The field's value. + * @protected + */ +jspb.Message.getFloatingPointFieldWithDefault = function( + msg, fieldNumber, defaultValue) { + var value = jspb.Message.getOptionalFloatingPointField(msg, fieldNumber); + if (value == null) { + return defaultValue; + } else { + return value; + } +}; + + /** * Alias for getFieldWithDefault used by older generated code. * @template T diff --git a/js/message_test.js b/js/message_test.js index 7d2cdbae80..a9fc64a98f 100644 --- a/js/message_test.js +++ b/js/message_test.js @@ -86,6 +86,7 @@ goog.require('proto.jspb.exttest.floatingMsgField'); goog.require('proto.jspb.exttest.floatingMsgFieldTwo'); // CommonJS-LoadFromFile: test_pb proto.jspb.test +goog.require('proto.jspb.test.BooleanFields'); goog.require('proto.jspb.test.CloneExtension'); goog.require('proto.jspb.test.Complex'); goog.require('proto.jspb.test.DefaultValues'); @@ -157,10 +158,11 @@ describe('Message test suite', function() { assertObjectEquals( { aString: 'a', - anOutOfOrderBool: 1, + anOutOfOrderBool: true, aNestedMessage: {anInt: 11}, aRepeatedMessageList: [{anInt: 22}, {anInt: 33}], - aRepeatedStringList: ['s1', 's2'] + aRepeatedStringList: ['s1', 's2'], + aFloatingPointField: undefined, }, result); @@ -169,7 +171,7 @@ describe('Message test suite', function() { assertObjectEquals( { aString: 'a', - anOutOfOrderBool: 1, + anOutOfOrderBool: true, aNestedMessage: {anInt: 11, $jspbMessageInstance: foo.getANestedMessage()}, aRepeatedMessageList: [ @@ -177,6 +179,7 @@ describe('Message test suite', function() { {anInt: 33, $jspbMessageInstance: foo.getARepeatedMessageList()[1]} ], aRepeatedStringList: ['s1', 's2'], + aFloatingPointField: undefined, $jspbMessageInstance: foo }, result); @@ -200,7 +203,8 @@ describe('Message test suite', function() { aNestedMessage: {anInt: undefined}, // Note: JsPb converts undefined repeated fields to empty arrays. aRepeatedMessageList: [], - aRepeatedStringList: [] + aRepeatedStringList: [], + aFloatingPointField: undefined, }, result); @@ -869,6 +873,53 @@ describe('Message test suite', function() { assertNan(message.getDefaultDoubleField()); }); + it('testFloatingPointsAreConvertedFromStringInput', function() { + var assertInf = function(x) { + assertTrue( + 'Expected ' + x + ' (' + goog.typeOf(x) + ') to be Infinity.', + x === Infinity); + }; + var message = new proto.jspb.test.FloatingPointFields([ + Infinity, 'Infinity', ['Infinity', Infinity], 'Infinity', 'Infinity', + 'Infinity', ['Infinity', Infinity], 'Infinity' + ]); + assertInf(message.getOptionalFloatField()); + assertInf(message.getRequiredFloatField()); + assertInf(message.getRepeatedFloatFieldList()[0]); + assertInf(message.getRepeatedFloatFieldList()[1]); + assertInf(message.getDefaultFloatField()); + assertInf(message.getOptionalDoubleField()); + assertInf(message.getRequiredDoubleField()); + assertInf(message.getRepeatedDoubleFieldList()[0]); + assertInf(message.getRepeatedDoubleFieldList()[1]); + assertInf(message.getDefaultDoubleField()); + }); + + it('testBooleansAreConvertedFromNumberInput', function() { + var assertBooleanFieldTrue = function(x) { + assertTrue( + 'Expected ' + x + ' (' + goog.typeOf(x) + ') to be True.', + x === true); + }; + var message = new proto.jspb.test.BooleanFields([1, 1, [true, 1]]); + assertBooleanFieldTrue(message.getOptionalBooleanField()); + assertBooleanFieldTrue(message.getRequiredBooleanField()); + assertBooleanFieldTrue(message.getRepeatedBooleanFieldList()[0]); + assertBooleanFieldTrue(message.getRepeatedBooleanFieldList()[1]); + assertBooleanFieldTrue(message.getDefaultBooleanField()); + + var assertBooleanFieldFalse = function(x) { + assertTrue( + 'Expected ' + x + ' (' + goog.typeOf(x) + ') to be False.', + x === false); + }; + message = new proto.jspb.test.BooleanFields([0, 0, [0, 0]]); + assertBooleanFieldFalse(message.getOptionalBooleanField()); + assertBooleanFieldFalse(message.getRequiredBooleanField()); + assertBooleanFieldFalse(message.getRepeatedBooleanFieldList()[0]); + assertBooleanFieldFalse(message.getRepeatedBooleanFieldList()[1]); + }); + it('testExtensionReverseOrder', function() { var message2 = new proto.jspb.exttest.reverse.TestExtensionReverseOrderMessage2; diff --git a/js/test.proto b/js/test.proto index 1c0d255f80..7c2a4699a2 100644 --- a/js/test.proto +++ b/js/test.proto @@ -93,10 +93,11 @@ message Complex { required int32 an_int = 2; } required string a_string = 1; - required bool an_out_of_order_bool = 9; + optional bool an_out_of_order_bool = 9; optional Nested a_nested_message = 4; repeated Nested a_repeated_message = 5; repeated string a_repeated_string = 7; + optional double a_floating_point_field = 10; } message OuterMessage { @@ -163,6 +164,13 @@ message FloatingPointFields { optional double default_double_field = 8 [default = 2.0]; } +message BooleanFields { + optional bool optional_boolean_field = 1; + required bool required_boolean_field = 2; + repeated bool repeated_boolean_field = 3; + optional bool default_boolean_field = 4 [default = true]; +} + message TestClone { optional string str = 1; optional Simple1 simple1 = 3; diff --git a/python/google/protobuf/internal/enum_type_wrapper.py b/python/google/protobuf/internal/enum_type_wrapper.py index cc9e95daa0..b4d30e2c94 100644 --- a/python/google/protobuf/internal/enum_type_wrapper.py +++ b/python/google/protobuf/internal/enum_type_wrapper.py @@ -89,7 +89,7 @@ class EnumTypeWrapper(object): for value_descriptor in self._enum_type.values] def __getattr__(self, name): - """Returns the value coresponding to the given enum name.""" + """Returns the value corresponding to the given enum name.""" if name in self._enum_type.values_by_name: return self._enum_type.values_by_name[name].number raise AttributeError diff --git a/python/google/protobuf/internal/json_format_test.py b/python/google/protobuf/internal/json_format_test.py index 2695635808..f4271b9dfd 100644 --- a/python/google/protobuf/internal/json_format_test.py +++ b/python/google/protobuf/internal/json_format_test.py @@ -794,6 +794,13 @@ class JsonFormatTest(JsonFormatBase): json_format.Parse(text, parsed_message) self.assertTrue(math.isnan(parsed_message.float_value)) + def testParseDoubleToFloat(self): + message = json_format_proto3_pb2.TestMessage() + text = ('{"repeatedFloatValue": [3.4028235e+39, 1.4028235e-39]\n}') + json_format.Parse(text, message) + self.assertEqual(message.repeated_float_value[0], float('inf')) + self.assertAlmostEqual(message.repeated_float_value[1], 1.4028235e-39) + def testParseEmptyText(self): self.CheckError('', r'Failed to load JSON: (Expecting value)|(No JSON).') diff --git a/python/google/protobuf/internal/message_test.py b/python/google/protobuf/internal/message_test.py index cff31407ab..c3bb066f50 100755 --- a/python/google/protobuf/internal/message_test.py +++ b/python/google/protobuf/internal/message_test.py @@ -346,6 +346,27 @@ class MessageTest(BaseTestCase): message.ParseFromString(message.SerializeToString()) self.assertTrue(message.optional_float == -kMostNegExponentOneSigBit) + # Max 4 bytes float value + max_float = float.fromhex('0x1.fffffep+127') + message.optional_float = max_float + self.assertAlmostEqual(message.optional_float, max_float) + serialized_data = message.SerializeToString() + message.ParseFromString(serialized_data) + self.assertAlmostEqual(message.optional_float, max_float) + + # Test set double to float field. + message.optional_float = 3.4028235e+39 + self.assertEqual(message.optional_float, float('inf')) + serialized_data = message.SerializeToString() + message.ParseFromString(serialized_data) + self.assertEqual(message.optional_float, float('inf')) + + message.optional_float = -3.4028235e+39 + self.assertEqual(message.optional_float, float('-inf')) + + message.optional_float = 1.4028235e-39 + self.assertAlmostEqual(message.optional_float, 1.4028235e-39) + def testExtremeDoubleValues(self, message_module): message = message_module.TestAllTypes() diff --git a/python/google/protobuf/internal/text_format_test.py b/python/google/protobuf/internal/text_format_test.py index 16a3f534e9..15f3a19fbd 100755 --- a/python/google/protobuf/internal/text_format_test.py +++ b/python/google/protobuf/internal/text_format_test.py @@ -497,6 +497,14 @@ class TextFormatParserTests(TextFormatBase): text_format.Parse(text, msg2) self.assertEqual(msg2.optional_string, u'cafĂ©') + def testParseDoubleToFloat(self, message_module): + message = message_module.TestAllTypes() + text = ('repeated_float: 3.4028235e+39\n' + 'repeated_float: 1.4028235e-39\n') + text_format.Parse(text, message) + self.assertEqual(message.repeated_float[0], float('inf')) + self.assertAlmostEqual(message.repeated_float[1], 1.4028235e-39) + def testParseExotic(self, message_module): message = message_module.TestAllTypes() text = ('repeated_int64: -9223372036854775808\n' diff --git a/python/google/protobuf/internal/type_checkers.py b/python/google/protobuf/internal/type_checkers.py index df8306aa92..ac1fbbf8e1 100755 --- a/python/google/protobuf/internal/type_checkers.py +++ b/python/google/protobuf/internal/type_checkers.py @@ -230,6 +230,41 @@ class Uint64ValueChecker(IntValueChecker): _TYPE = long +# The max 4 bytes float is about 3.4028234663852886e+38 +_FLOAT_MAX = float.fromhex('0x1.fffffep+127') +_FLOAT_MIN = -_FLOAT_MAX +_INF = float('inf') +_NEG_INF = float('-inf') + + +class FloatValueChecker(object): + + """Checker used for float fields. Performs type-check and range check. + + Values exceeding a 32-bit float will be converted to inf/-inf. + """ + + def CheckValue(self, proposed_value): + """Check and convert proposed_value to float.""" + if not isinstance(proposed_value, numbers.Real): + message = ('%.1024r has type %s, but expected one of: numbers.Real' % + (proposed_value, type(proposed_value))) + raise TypeError(message) + converted_value = float(proposed_value) + # This inf rounding matches the C++ proto SafeDoubleToFloat logic. + if converted_value > _FLOAT_MAX: + return _INF + if converted_value < _FLOAT_MIN: + return _NEG_INF + + return converted_value + # TODO(jieluo): convert to 4 bytes float (c style float) at setters: + # return struct.unpack('f', struct.pack('f', converted_value)) + + def DefaultValue(self): + return 0.0 + + # Type-checkers for all scalar CPPTYPEs. _VALUE_CHECKERS = { _FieldDescriptor.CPPTYPE_INT32: Int32ValueChecker(), @@ -238,8 +273,7 @@ _VALUE_CHECKERS = { _FieldDescriptor.CPPTYPE_UINT64: Uint64ValueChecker(), _FieldDescriptor.CPPTYPE_DOUBLE: TypeCheckerWithDefault( 0.0, float, numbers.Real), - _FieldDescriptor.CPPTYPE_FLOAT: TypeCheckerWithDefault( - 0.0, float, numbers.Real), + _FieldDescriptor.CPPTYPE_FLOAT: FloatValueChecker(), _FieldDescriptor.CPPTYPE_BOOL: TypeCheckerWithDefault( False, bool, numbers.Integral), _FieldDescriptor.CPPTYPE_STRING: TypeCheckerWithDefault(b'', bytes), diff --git a/python/google/protobuf/pyext/descriptor_database.h b/python/google/protobuf/pyext/descriptor_database.h index 30aa1b73ed..daf25e0ba6 100644 --- a/python/google/protobuf/pyext/descriptor_database.h +++ b/python/google/protobuf/pyext/descriptor_database.h @@ -48,18 +48,18 @@ class PyDescriptorDatabase : public DescriptorDatabase { // with a copy of FileDescriptorProto. // Find a file by file name. - bool FindFileByName(const std::string& filename, + bool FindFileByName(const string& filename, FileDescriptorProto* output); // Find the file that declares the given fully-qualified symbol name. - bool FindFileContainingSymbol(const std::string& symbol_name, + bool FindFileContainingSymbol(const string& symbol_name, FileDescriptorProto* output); // Find the file which defines an extension extending the given message type // with the given field number. // Containing_type must be a fully-qualified type name. // Python objects are not required to implement this method. - bool FindFileContainingExtension(const std::string& containing_type, + bool FindFileContainingExtension(const string& containing_type, int field_number, FileDescriptorProto* output); @@ -67,7 +67,7 @@ class PyDescriptorDatabase : public DescriptorDatabase { // containing_type, and appends them to output in an undefined // order. // Python objects are not required to implement this method. - bool FindAllExtensionNumbers(const std::string& containing_type, + bool FindAllExtensionNumbers(const string& containing_type, std::vector* output); private: diff --git a/python/google/protobuf/pyext/descriptor_pool.h b/python/google/protobuf/pyext/descriptor_pool.h index 8e7b4d6b98..8289daeaa7 100644 --- a/python/google/protobuf/pyext/descriptor_pool.h +++ b/python/google/protobuf/pyext/descriptor_pool.h @@ -89,7 +89,7 @@ namespace cdescriptor_pool { // Looks up a message by name. // Returns a message Descriptor, or NULL if not found. const Descriptor* FindMessageTypeByName(PyDescriptorPool* self, - const std::string& name); + const string& name); // The functions below are also exposed as methods of the DescriptorPool type. diff --git a/python/google/protobuf/pyext/message.cc b/python/google/protobuf/pyext/message.cc index f458fed540..b4dba6e918 100644 --- a/python/google/protobuf/pyext/message.cc +++ b/python/google/protobuf/pyext/message.cc @@ -47,6 +47,7 @@ #endif #include #include +#include #include #include #include @@ -756,7 +757,7 @@ bool CheckAndGetFloat(PyObject* arg, float* value) { if (!CheckAndGetDouble(arg, &double_value)) { return false; } - *value = static_cast(double_value); + *value = io::SafeDoubleToFloat(double_value); return true; } diff --git a/python/google/protobuf/pyext/message.h b/python/google/protobuf/pyext/message.h index c112a88fea..1b0effae73 100644 --- a/python/google/protobuf/pyext/message.h +++ b/python/google/protobuf/pyext/message.h @@ -332,7 +332,7 @@ bool CheckAndSetString( bool append, int index); PyObject* ToStringObject(const FieldDescriptor* descriptor, - const std::string& value); + const string& value); // Check if the passed field descriptor belongs to the given message. // If not, return false and set a Python exception (a KeyError) @@ -346,14 +346,12 @@ Message* PyMessage_GetMutableMessagePointer(PyObject* msg); bool InitProto2MessageModule(PyObject *m); -#if LANG_CXX11 // These are referenced by repeated_scalar_container, and must // be explicitly instantiated. extern template bool CheckAndGetInteger(PyObject*, int32*); extern template bool CheckAndGetInteger(PyObject*, int64*); extern template bool CheckAndGetInteger(PyObject*, uint32*); extern template bool CheckAndGetInteger(PyObject*, uint64*); -#endif } // namespace python } // namespace protobuf diff --git a/python/google/protobuf/pyext/proto2_api_test.proto b/python/google/protobuf/pyext/proto2_api_test.proto index 18aecfb7d6..1fd78e8402 100644 --- a/python/google/protobuf/pyext/proto2_api_test.proto +++ b/python/google/protobuf/pyext/proto2_api_test.proto @@ -30,10 +30,10 @@ syntax = "proto2"; -import "google/protobuf/internal/cpp/proto1_api_test.proto"; - package google.protobuf.python.internal; +import "google/protobuf/internal/cpp/proto1_api_test.proto"; + message TestNestedProto1APIMessage { optional int32 a = 1; optional TestMessage.NestedMessage b = 2; diff --git a/src/google/protobuf/any.cc b/src/google/protobuf/any.cc index 9d6d5cdaec..4b3cce622c 100644 --- a/src/google/protobuf/any.cc +++ b/src/google/protobuf/any.cc @@ -35,6 +35,8 @@ #include #include +#include + namespace google { namespace protobuf { namespace internal { @@ -44,12 +46,12 @@ void AnyMetadata::PackFrom(const Message& message) { } void AnyMetadata::PackFrom(const Message& message, - const string& type_url_prefix) { + const std::string& type_url_prefix) { type_url_->SetNoArena( - &::google::protobuf::internal::GetEmptyString(), + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString(), GetTypeUrl(message.GetDescriptor()->full_name(), type_url_prefix)); message.SerializeToString(value_->MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited())); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())); } bool AnyMetadata::UnpackTo(Message* message) const { diff --git a/src/google/protobuf/any.h b/src/google/protobuf/any.h index f5428c8ac3..d7d43966e4 100644 --- a/src/google/protobuf/any.h +++ b/src/google/protobuf/any.h @@ -52,7 +52,7 @@ extern const char kTypeGoogleApisComPrefix[]; // "type.googleapis.com/". extern const char kTypeGoogleProdComPrefix[]; // "type.googleprod.com/". std::string GetTypeUrl(StringPiece message_name, - StringPiece type_url_prefix); + StringPiece type_url_prefix); // Helper class used to implement google::protobuf::Any. class PROTOBUF_EXPORT AnyMetadata { diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index 8bd80e1fb9..fac9ebaaff 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,54 +16,52 @@ // @@protoc_insertion_point(includes) #include -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class AnyDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Any_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsAny_google_2fprotobuf_2fany_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Any_default_instance_; - new (ptr) ::google::protobuf::Any(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Any_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Any(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Any::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Any::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAny_google_2fprotobuf_2fany_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAny_google_2fprotobuf_2fany_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2fany_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_Any_google_2fprotobuf_2fany_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Any_google_2fprotobuf_2fany_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fany_2eproto[1]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fany_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fany_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fany_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Any, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Any, type_url_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Any, value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, type_url_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Any, value_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::protobuf::Any)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Any)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_Any_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Any_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fany_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fany_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fany_2eproto, "google/protobuf/any.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fany_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fany_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto, file_level_service_descriptors_google_2fprotobuf_2fany_2eproto, @@ -77,50 +75,49 @@ const char descriptor_table_protodef_google_2fprotobuf_2fany_2eproto[] = "\003GPB\252\002\036Google.Protobuf.WellKnownTypesb\006p" "roto3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto = { false, InitDefaults_google_2fprotobuf_2fany_2eproto, descriptor_table_protodef_google_2fprotobuf_2fany_2eproto, "google/protobuf/any.proto", &assign_descriptors_table_google_2fprotobuf_2fany_2eproto, 205, }; void AddDescriptors_google_2fprotobuf_2fany_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fany_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fany_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fany_2eproto = []() { AddDescriptors_google_2fprotobuf_2fany_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN // =================================================================== void Any::InitAsDefaultInstance() { } -void Any::PackFrom(const ::google::protobuf::Message& message) { +void Any::PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) { _any_metadata_.PackFrom(message); } -void Any::PackFrom(const ::google::protobuf::Message& message, - const ::std::string& type_url_prefix) { +void Any::PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message, + const std::string& type_url_prefix) { _any_metadata_.PackFrom(message, type_url_prefix); } -bool Any::UnpackTo(::google::protobuf::Message* message) const { +bool Any::UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const { return _any_metadata_.UnpackTo(message); } bool Any::GetAnyFieldDescriptors( - const ::google::protobuf::Message& message, - const ::google::protobuf::FieldDescriptor** type_url_field, - const ::google::protobuf::FieldDescriptor** value_field) { - return ::google::protobuf::internal::GetAnyFieldDescriptors( + const ::PROTOBUF_NAMESPACE_ID::Message& message, + const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field, + const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field) { + return ::PROTOBUF_NAMESPACE_ID::internal::GetAnyFieldDescriptors( message, type_url_field, value_field); } bool Any::ParseAnyTypeUrl(const string& type_url, - string* full_type_name) { - return ::google::protobuf::internal::ParseAnyTypeUrl(type_url, + std::string* full_type_name) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseAnyTypeUrl(type_url, full_type_name); } @@ -134,31 +131,31 @@ const int Any::kValueFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Any::Any() - : ::google::protobuf::Message(), _internal_metadata_(nullptr), _any_metadata_(&type_url_, &value_) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _any_metadata_(&type_url_, &value_) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Any) } Any::Any(const Any& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _any_metadata_(&type_url_, &value_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.type_url().size() > 0) { - type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_); + type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_url_); } - value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.value().size() > 0) { - value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); + value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_); } // @@protoc_insertion_point(copy_constructor:google.protobuf.Any) } void Any::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_Any_google_2fprotobuf_2fany_2eproto.base); - type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } Any::~Any() { @@ -167,48 +164,49 @@ Any::~Any() { } void Any::SharedDtor() { - type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Any::SetCachedSize(int size) const { _cached_size_.Set(size); } const Any& Any::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Any_google_2fprotobuf_2fany_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Any_google_2fprotobuf_2fany_2eproto.base); return *internal_default_instance(); } void Any::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Any) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Any::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Any::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // string type_url = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_type_url(), ptr, ctx, "google.protobuf.Any.type_url"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_type_url(), ptr, ctx, "google.protobuf.Any.type_url"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // bytes value = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParser(mutable_value(), ptr, ctx); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_value(), ptr, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -229,23 +227,23 @@ const char* Any::_InternalParse(const char* ptr, ::google::protobuf::internal::P } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Any::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Any) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string type_url = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_type_url())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), static_cast(this->type_url().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Any.type_url")); } else { goto handle_unusual; @@ -255,8 +253,8 @@ bool Any::MergePartialFromCodedStream( // bytes value = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( input, this->mutable_value())); } else { goto handle_unusual; @@ -269,7 +267,7 @@ bool Any::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -286,60 +284,60 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Any::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Any) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string type_url = 1; if (this->type_url().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), static_cast(this->type_url().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->type_url(), output); } // bytes value = 2; if (this->value().size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( 2, this->value(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Any) } -::google::protobuf::uint8* Any::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Any::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string type_url = 1; if (this->type_url().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->type_url().data(), static_cast(this->type_url().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->type_url(), target); } // bytes value = 2; if (this->value().size() > 0) { target = - ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( 2, this->value(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Any) @@ -352,41 +350,41 @@ size_t Any::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string type_url = 1; if (this->type_url().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->type_url()); } // bytes value = 2; if (this->value().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::BytesSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( this->value()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Any::MergeFrom(const ::google::protobuf::Message& from) { +void Any::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Any) GOOGLE_DCHECK_NE(&from, this); const Any* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Any) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Any) MergeFrom(*source); @@ -397,20 +395,20 @@ void Any::MergeFrom(const Any& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.type_url().size() > 0) { - type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_); + type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_url_); } if (from.value().size() > 0) { - value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); + value_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_); } } -void Any::CopyFrom(const ::google::protobuf::Message& from) { +void Any::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Any) if (&from == this) return; Clear(); @@ -435,28 +433,25 @@ void Any::Swap(Any* other) { void Any::InternalSwap(Any* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - type_url_.Swap(&other->type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_url_.Swap(&other->type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + value_.Swap(&other->value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata Any::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fany_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Any::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fany_2eproto); return ::file_level_metadata_google_2fprotobuf_2fany_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::Any* Arena::CreateMaybeMessage< ::google::protobuf::Any >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::Any >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Any >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Any >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 95c7f03061..de8ceeb023 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/any.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto #include #include @@ -35,51 +35,53 @@ // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2fany_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class Any; class AnyDefaultTypeInternal; PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::Any* Arena::CreateMaybeMessage<::google::protobuf::Any>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN // =================================================================== class PROTOBUF_EXPORT Any final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ { public: Any(); virtual ~Any(); Any(const Any& from); - - inline Any& operator=(const Any& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Any(Any&& from) noexcept : Any() { *this = ::std::move(from); } + inline Any& operator=(const Any& from) { + CopyFrom(from); + return *this; + } inline Any& operator=(Any&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -88,8 +90,8 @@ class PROTOBUF_EXPORT Any final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Any& default_instance(); @@ -104,19 +106,19 @@ class PROTOBUF_EXPORT Any final : // implements Any ----------------------------------------------- - void PackFrom(const ::google::protobuf::Message& message); - void PackFrom(const ::google::protobuf::Message& message, - const ::std::string& type_url_prefix); - bool UnpackTo(::google::protobuf::Message* message) const; + void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message); + void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message, + const std::string& type_url_prefix); + bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const; static bool GetAnyFieldDescriptors( - const ::google::protobuf::Message& message, - const ::google::protobuf::FieldDescriptor** type_url_field, - const ::google::protobuf::FieldDescriptor** value_field); + const ::PROTOBUF_NAMESPACE_ID::Message& message, + const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field, + const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field); template bool Is() const { return _any_metadata_.Is(); } static bool ParseAnyTypeUrl(const string& type_url, - string* full_type_name); + std::string* full_type_name); void Swap(Any* other); friend void swap(Any& a, Any& b) { a.Swap(&b); @@ -128,11 +130,11 @@ class PROTOBUF_EXPORT Any final : return CreateMaybeMessage(nullptr); } - Any* New(::google::protobuf::Arena* arena) const final { + Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Any& from); void MergeFrom(const Any& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -140,15 +142,15 @@ class PROTOBUF_EXPORT Any final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -156,12 +158,12 @@ class PROTOBUF_EXPORT Any final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Any* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Any"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -169,7 +171,7 @@ class PROTOBUF_EXPORT Any final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -178,40 +180,36 @@ class PROTOBUF_EXPORT Any final : // string type_url = 1; void clear_type_url(); static const int kTypeUrlFieldNumber = 1; - const ::std::string& type_url() const; - void set_type_url(const ::std::string& value); - #if LANG_CXX11 - void set_type_url(::std::string&& value); - #endif + const std::string& type_url() const; + void set_type_url(const std::string& value); + void set_type_url(std::string&& value); void set_type_url(const char* value); void set_type_url(const char* value, size_t size); - ::std::string* mutable_type_url(); - ::std::string* release_type_url(); - void set_allocated_type_url(::std::string* type_url); + std::string* mutable_type_url(); + std::string* release_type_url(); + void set_allocated_type_url(std::string* type_url); // bytes value = 2; void clear_value(); static const int kValueFieldNumber = 2; - const ::std::string& value() const; - void set_value(const ::std::string& value); - #if LANG_CXX11 - void set_value(::std::string&& value); - #endif + const std::string& value() const; + void set_value(const std::string& value); + void set_value(std::string&& value); void set_value(const char* value); void set_value(const void* value, size_t size); - ::std::string* mutable_value(); - ::std::string* release_value(); - void set_allocated_value(::std::string* value); + std::string* mutable_value(); + std::string* release_value(); + void set_allocated_value(std::string* value); // @@protoc_insertion_point(class_scope:google.protobuf.Any) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr type_url_; - ::google::protobuf::internal::ArenaStringPtr value_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::AnyMetadata _any_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_; friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto; }; // =================================================================== @@ -227,107 +225,103 @@ class PROTOBUF_EXPORT Any final : // string type_url = 1; inline void Any::clear_type_url() { - type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Any::type_url() const { +inline const std::string& Any::type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url) return type_url_.GetNoArena(); } -inline void Any::set_type_url(const ::std::string& value) { +inline void Any::set_type_url(const std::string& value) { - type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) } -#if LANG_CXX11 -inline void Any::set_type_url(::std::string&& value) { +inline void Any::set_type_url(std::string&& value) { type_url_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url) } -#endif inline void Any::set_type_url(const char* value) { GOOGLE_DCHECK(value != nullptr); - type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url) } inline void Any::set_type_url(const char* value, size_t size) { - type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url) } -inline ::std::string* Any::mutable_type_url() { +inline std::string* Any::mutable_type_url() { // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url) - return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return type_url_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Any::release_type_url() { +inline std::string* Any::release_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url) - return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return type_url_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Any::set_allocated_type_url(::std::string* type_url) { +inline void Any::set_allocated_type_url(std::string* type_url) { if (type_url != nullptr) { } else { } - type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url); + type_url_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url) } // bytes value = 2; inline void Any::clear_value() { - value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Any::value() const { +inline const std::string& Any::value() const { // @@protoc_insertion_point(field_get:google.protobuf.Any.value) return value_.GetNoArena(); } -inline void Any::set_value(const ::std::string& value) { +inline void Any::set_value(const std::string& value) { - value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Any.value) } -#if LANG_CXX11 -inline void Any::set_value(::std::string&& value) { +inline void Any::set_value(std::string&& value) { value_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value) } -#endif inline void Any::set_value(const char* value) { GOOGLE_DCHECK(value != nullptr); - value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value) } inline void Any::set_value(const void* value, size_t size) { - value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value) } -inline ::std::string* Any::mutable_value() { +inline std::string* Any::mutable_value() { // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value) - return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return value_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Any::release_value() { +inline std::string* Any::release_value() { // @@protoc_insertion_point(field_release:google.protobuf.Any.value) - return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return value_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Any::set_allocated_value(::std::string* value) { +inline void Any::set_allocated_value(std::string* value) { if (value != nullptr) { } else { } - value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + value_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value) } @@ -337,10 +331,9 @@ inline void Any::set_allocated_value(::std::string* value) { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto diff --git a/src/google/protobuf/any_lite.cc b/src/google/protobuf/any_lite.cc index 9356514126..7403ed3fda 100644 --- a/src/google/protobuf/any_lite.cc +++ b/src/google/protobuf/any_lite.cc @@ -40,8 +40,8 @@ namespace google { namespace protobuf { namespace internal { -string GetTypeUrl(StringPiece message_name, - StringPiece type_url_prefix) { +std::string GetTypeUrl(StringPiece message_name, + StringPiece type_url_prefix) { if (!type_url_prefix.empty() && type_url_prefix[type_url_prefix.size() - 1] == '/') { return StrCat(type_url_prefix, message_name); @@ -101,10 +101,10 @@ bool AnyMetadata::InternalIs(StringPiece type_name) const { HasSuffixString(type_url, type_name); } -bool ParseAnyTypeUrl(const string& type_url, string* url_prefix, - string* full_type_name) { +bool ParseAnyTypeUrl(const std::string& type_url, std::string* url_prefix, + std::string* full_type_name) { size_t pos = type_url.find_last_of("/"); - if (pos == string::npos || pos + 1 == type_url.size()) { + if (pos == std::string::npos || pos + 1 == type_url.size()) { return false; } if (url_prefix) { @@ -114,7 +114,7 @@ bool ParseAnyTypeUrl(const string& type_url, string* url_prefix, return true; } -bool ParseAnyTypeUrl(const string& type_url, string* full_type_name) { +bool ParseAnyTypeUrl(const std::string& type_url, std::string* full_type_name) { return ParseAnyTypeUrl(type_url, nullptr, full_type_name); } diff --git a/src/google/protobuf/any_test.cc b/src/google/protobuf/any_test.cc index 378981ce12..72bd5e0d19 100644 --- a/src/google/protobuf/any_test.cc +++ b/src/google/protobuf/any_test.cc @@ -44,7 +44,7 @@ TEST(AnyTest, TestPackAndUnpack) { protobuf_unittest::TestAny message; message.mutable_any_value()->PackFrom(submessage); - string data = message.SerializeAsString(); + std::string data = message.SerializeAsString(); ASSERT_TRUE(message.ParseFromString(data)); EXPECT_TRUE(message.has_any_value()); @@ -73,7 +73,7 @@ TEST(AnyTest, TestPackAndUnpackAny) { protobuf_unittest::TestAny message; message.mutable_any_value()->PackFrom(any); - string data = message.SerializeAsString(); + std::string data = message.SerializeAsString(); ASSERT_TRUE(message.ParseFromString(data)); EXPECT_TRUE(message.has_any_value()); diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 8fe730129c..5a8bb22d26 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,39 +16,37 @@ // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fapi_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto; -namespace google { -namespace protobuf { +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fapi_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fapi_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto; +PROTOBUF_NAMESPACE_OPEN class ApiDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Api_default_instance_; class MethodDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Method_default_instance_; class MixinDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Mixin_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsApi_google_2fprotobuf_2fapi_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Api_default_instance_; - new (ptr) ::google::protobuf::Api(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Api_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Api(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Api::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Api::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<4> scc_info_Api_google_2fprotobuf_2fapi_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsApi_google_2fprotobuf_2fapi_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_Api_google_2fprotobuf_2fapi_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsApi_google_2fprotobuf_2fapi_2eproto}, { &scc_info_Method_google_2fprotobuf_2fapi_2eproto.base, &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base, &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base, @@ -58,87 +56,87 @@ static void InitDefaultsMethod_google_2fprotobuf_2fapi_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Method_default_instance_; - new (ptr) ::google::protobuf::Method(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Method_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Method(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Method::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Method::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethod_google_2fprotobuf_2fapi_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Method_google_2fprotobuf_2fapi_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethod_google_2fprotobuf_2fapi_2eproto}, { &scc_info_Option_google_2fprotobuf_2ftype_2eproto.base,}}; static void InitDefaultsMixin_google_2fprotobuf_2fapi_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Mixin_default_instance_; - new (ptr) ::google::protobuf::Mixin(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Mixin(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Mixin::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Mixin::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixin_google_2fprotobuf_2fapi_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Mixin_google_2fprotobuf_2fapi_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMixin_google_2fprotobuf_2fapi_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2fapi_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fapi_2eproto[3]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fapi_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, methods_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, options_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, version_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, source_context_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, mixins_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Api, syntax_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, methods_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, version_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, source_context_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, mixins_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Api, syntax_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, request_type_url_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, request_streaming_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, response_type_url_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, response_streaming_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, options_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Method, syntax_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_type_url_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, request_streaming_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, response_type_url_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, response_streaming_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Method, syntax_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Mixin, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Mixin, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Mixin, root_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Mixin, root_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::protobuf::Api)}, - { 12, -1, sizeof(::google::protobuf::Method)}, - { 24, -1, sizeof(::google::protobuf::Mixin)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Api)}, + { 12, -1, sizeof(PROTOBUF_NAMESPACE_ID::Method)}, + { 24, -1, sizeof(PROTOBUF_NAMESPACE_ID::Mixin)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_Api_default_instance_), - reinterpret_cast(&::google::protobuf::_Method_default_instance_), - reinterpret_cast(&::google::protobuf::_Mixin_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Api_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Method_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Mixin_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fapi_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fapi_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fapi_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fapi_2eproto, 3, file_level_enum_descriptors_google_2fprotobuf_2fapi_2eproto, file_level_service_descriptors_google_2fprotobuf_2fapi_2eproto, @@ -165,38 +163,37 @@ const char descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto[] = "nproto/protobuf/api;api\242\002\003GPB\252\002\036Google.P" "rotobuf.WellKnownTypesb\006proto3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fapi_2eproto = { false, InitDefaults_google_2fprotobuf_2fapi_2eproto, descriptor_table_protodef_google_2fprotobuf_2fapi_2eproto, "google/protobuf/api.proto", &assign_descriptors_table_google_2fprotobuf_2fapi_2eproto, 750, }; void AddDescriptors_google_2fprotobuf_2fapi_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[2] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[2] = { ::AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, ::AddDescriptors_google_2fprotobuf_2ftype_2eproto, }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fapi_2eproto, deps, 2); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fapi_2eproto, deps, 2); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fapi_2eproto = []() { AddDescriptors_google_2fprotobuf_2fapi_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN // =================================================================== void Api::InitAsDefaultInstance() { - ::google::protobuf::_Api_default_instance_._instance.get_mutable()->source_context_ = const_cast< ::google::protobuf::SourceContext*>( - ::google::protobuf::SourceContext::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_Api_default_instance_._instance.get_mutable()->source_context_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceContext*>( + PROTOBUF_NAMESPACE_ID::SourceContext::internal_default_instance()); } class Api::HasBitSetters { public: - static const ::google::protobuf::SourceContext& source_context(const Api* msg); + static const PROTOBUF_NAMESPACE_ID::SourceContext& source_context(const Api* msg); }; -const ::google::protobuf::SourceContext& +const PROTOBUF_NAMESPACE_ID::SourceContext& Api::HasBitSetters::source_context(const Api* msg) { return *msg->source_context_; } @@ -220,27 +217,27 @@ const int Api::kSyntaxFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Api::Api() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Api) } Api::Api(const Api& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), methods_(from.methods_), options_(from.options_), mixins_(from.mixins_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } - version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.version().size() > 0) { - version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_); + version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.version_); } if (from.has_source_context()) { - source_context_ = new ::google::protobuf::SourceContext(*from.source_context_); + source_context_ = new PROTOBUF_NAMESPACE_ID::SourceContext(*from.source_context_); } else { source_context_ = nullptr; } @@ -249,10 +246,10 @@ Api::Api(const Api& from) } void Api::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&source_context_, 0, static_cast( reinterpret_cast(&syntax_) - reinterpret_cast(&source_context_)) + sizeof(syntax_)); @@ -264,8 +261,8 @@ Api::~Api() { } void Api::SharedDtor() { - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete source_context_; } @@ -273,22 +270,22 @@ void Api::SetCachedSize(int size) const { _cached_size_.Set(size); } const Api& Api::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Api_google_2fprotobuf_2fapi_2eproto.base); return *internal_default_instance(); } void Api::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Api) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; methods_.Clear(); options_.Clear(); mixins_.Clear(); - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && source_context_ != nullptr) { delete source_context_; } @@ -298,69 +295,70 @@ void Api::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Api::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Api::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Api.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Api.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.Method methods = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; do { ptr = ctx->ParseMessage(add_methods(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 18 && (ptr += 1)); break; } // repeated .google.protobuf.Option options = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; do { ptr = ctx->ParseMessage(add_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 26 && (ptr += 1)); break; } // string version = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_version(), ptr, ctx, "google.protobuf.Api.version"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_version(), ptr, ctx, "google.protobuf.Api.version"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // .google.protobuf.SourceContext source_context = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 42) goto handle_unusual; ptr = ctx->ParseMessage(mutable_source_context(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.Mixin mixins = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; do { ptr = ctx->ParseMessage(add_mixins(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 50 && (ptr += 1)); break; } // .google.protobuf.Syntax syntax = 7; case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 56) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - set_syntax(static_cast<::google::protobuf::Syntax>(val)); + set_syntax(static_cast(val)); break; } default: { @@ -380,23 +378,23 @@ const char* Api::_InternalParse(const char* ptr, ::google::protobuf::internal::P } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Api::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Api) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Api.name")); } else { goto handle_unusual; @@ -406,8 +404,8 @@ bool Api::MergePartialFromCodedStream( // repeated .google.protobuf.Method methods = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_methods())); } else { goto handle_unusual; @@ -417,8 +415,8 @@ bool Api::MergePartialFromCodedStream( // repeated .google.protobuf.Option options = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_options())); } else { goto handle_unusual; @@ -428,12 +426,12 @@ bool Api::MergePartialFromCodedStream( // string version = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_version())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->version().data(), static_cast(this->version().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Api.version")); } else { goto handle_unusual; @@ -443,8 +441,8 @@ bool Api::MergePartialFromCodedStream( // .google.protobuf.SourceContext source_context = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_source_context())); } else { goto handle_unusual; @@ -454,8 +452,8 @@ bool Api::MergePartialFromCodedStream( // repeated .google.protobuf.Mixin mixins = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_mixins())); } else { goto handle_unusual; @@ -465,12 +463,12 @@ bool Api::MergePartialFromCodedStream( // .google.protobuf.Syntax syntax = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_syntax(static_cast< ::google::protobuf::Syntax >(value)); + set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value)); } else { goto handle_unusual; } @@ -482,7 +480,7 @@ bool Api::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -499,25 +497,25 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Api::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Api) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // repeated .google.protobuf.Method methods = 2; for (unsigned int i = 0, n = static_cast(this->methods_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->methods(static_cast(i)), output); @@ -526,7 +524,7 @@ void Api::SerializeWithCachedSizes( // repeated .google.protobuf.Option options = 3; for (unsigned int i = 0, n = static_cast(this->options_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->options(static_cast(i)), output); @@ -534,24 +532,24 @@ void Api::SerializeWithCachedSizes( // string version = 4; if (this->version().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->version().data(), static_cast(this->version().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->version(), output); } // .google.protobuf.SourceContext source_context = 5; if (this->has_source_context()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 5, HasBitSetters::source_context(this), output); } // repeated .google.protobuf.Mixin mixins = 6; for (unsigned int i = 0, n = static_cast(this->mixins_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 6, this->mixins(static_cast(i)), output); @@ -559,38 +557,38 @@ void Api::SerializeWithCachedSizes( // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 7, this->syntax(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Api) } -::google::protobuf::uint8* Api::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Api::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Api) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // repeated .google.protobuf.Method methods = 2; for (unsigned int i = 0, n = static_cast(this->methods_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->methods(static_cast(i)), target); } @@ -598,25 +596,25 @@ void Api::SerializeWithCachedSizes( // repeated .google.protobuf.Option options = 3; for (unsigned int i = 0, n = static_cast(this->options_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, this->options(static_cast(i)), target); } // string version = 4; if (this->version().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->version().data(), static_cast(this->version().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Api.version"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 4, this->version(), target); } // .google.protobuf.SourceContext source_context = 5; if (this->has_source_context()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 5, HasBitSetters::source_context(this), target); } @@ -624,19 +622,19 @@ void Api::SerializeWithCachedSizes( // repeated .google.protobuf.Mixin mixins = 6; for (unsigned int i = 0, n = static_cast(this->mixins_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 6, this->mixins(static_cast(i)), target); } // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 7, this->syntax(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Api) @@ -649,10 +647,10 @@ size_t Api::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -662,7 +660,7 @@ size_t Api::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->methods(static_cast(i))); } } @@ -673,7 +671,7 @@ size_t Api::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->options(static_cast(i))); } } @@ -684,7 +682,7 @@ size_t Api::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->mixins(static_cast(i))); } } @@ -692,44 +690,44 @@ size_t Api::ByteSizeLong() const { // string name = 1; if (this->name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // string version = 4; if (this->version().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->version()); } // .google.protobuf.SourceContext source_context = 5; if (this->has_source_context()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *source_context_); } // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Api::MergeFrom(const ::google::protobuf::Message& from) { +void Api::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Api) GOOGLE_DCHECK_NE(&from, this); const Api* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Api) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Api) MergeFrom(*source); @@ -740,7 +738,7 @@ void Api::MergeFrom(const Api& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Api) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; methods_.MergeFrom(from.methods_); @@ -748,21 +746,21 @@ void Api::MergeFrom(const Api& from) { mixins_.MergeFrom(from.mixins_); if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.version().size() > 0) { - version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_); + version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.version_); } if (from.has_source_context()) { - mutable_source_context()->::google::protobuf::SourceContext::MergeFrom(from.source_context()); + mutable_source_context()->PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom(from.source_context()); } if (from.syntax() != 0) { set_syntax(from.syntax()); } } -void Api::CopyFrom(const ::google::protobuf::Message& from) { +void Api::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Api) if (&from == this) return; Clear(); @@ -790,16 +788,16 @@ void Api::InternalSwap(Api* other) { CastToBase(&methods_)->InternalSwap(CastToBase(&other->methods_)); CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); CastToBase(&mixins_)->InternalSwap(CastToBase(&other->mixins_)); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - version_.Swap(&other->version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + version_.Swap(&other->version_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(source_context_, other->source_context_); swap(syntax_, other->syntax_); } -::google::protobuf::Metadata Api::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Api::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages]; } @@ -826,26 +824,26 @@ const int Method::kSyntaxFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Method::Method() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Method) } Method::Method(const Method& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), options_(from.options_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } - request_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.request_type_url().size() > 0) { - request_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_type_url_); + request_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.request_type_url_); } - response_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.response_type_url().size() > 0) { - response_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_type_url_); + response_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.response_type_url_); } ::memcpy(&request_streaming_, &from.request_streaming_, static_cast(reinterpret_cast(&syntax_) - @@ -854,11 +852,11 @@ Method::Method(const Method& from) } void Method::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - request_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - response_type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + request_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + response_type_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&request_streaming_, 0, static_cast( reinterpret_cast(&syntax_) - reinterpret_cast(&request_streaming_)) + sizeof(syntax_)); @@ -870,30 +868,30 @@ Method::~Method() { } void Method::SharedDtor() { - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - request_type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - response_type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + request_type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + response_type_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Method::SetCachedSize(int size) const { _cached_size_.Set(size); } const Method& Method::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Method_google_2fprotobuf_2fapi_2eproto.base); return *internal_default_instance(); } void Method::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Method) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; options_.Clear(); - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - request_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - response_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + request_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + response_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&request_streaming_, 0, static_cast( reinterpret_cast(&syntax_) - reinterpret_cast(&request_streaming_)) + sizeof(syntax_)); @@ -901,63 +899,64 @@ void Method::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Method::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Method::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Method.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Method.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // string request_type_url = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_request_type_url(), ptr, ctx, "google.protobuf.Method.request_type_url"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_request_type_url(), ptr, ctx, "google.protobuf.Method.request_type_url"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // bool request_streaming = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - set_request_streaming(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 24) goto handle_unusual; + set_request_streaming(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // string response_type_url = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_response_type_url(), ptr, ctx, "google.protobuf.Method.response_type_url"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_response_type_url(), ptr, ctx, "google.protobuf.Method.response_type_url"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // bool response_streaming = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; - set_response_streaming(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 40) goto handle_unusual; + set_response_streaming(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.Option options = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; do { ptr = ctx->ParseMessage(add_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 50 && (ptr += 1)); break; } // .google.protobuf.Syntax syntax = 7; case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 56) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - set_syntax(static_cast<::google::protobuf::Syntax>(val)); + set_syntax(static_cast(val)); break; } default: { @@ -977,23 +976,23 @@ const char* Method::_InternalParse(const char* ptr, ::google::protobuf::internal } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Method::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Method) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Method.name")); } else { goto handle_unusual; @@ -1003,12 +1002,12 @@ bool Method::MergePartialFromCodedStream( // string request_type_url = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_request_type_url())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->request_type_url().data(), static_cast(this->request_type_url().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Method.request_type_url")); } else { goto handle_unusual; @@ -1018,10 +1017,10 @@ bool Method::MergePartialFromCodedStream( // bool request_streaming = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &request_streaming_))); } else { goto handle_unusual; @@ -1031,12 +1030,12 @@ bool Method::MergePartialFromCodedStream( // string response_type_url = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_response_type_url())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->response_type_url().data(), static_cast(this->response_type_url().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Method.response_type_url")); } else { goto handle_unusual; @@ -1046,10 +1045,10 @@ bool Method::MergePartialFromCodedStream( // bool response_streaming = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &response_streaming_))); } else { goto handle_unusual; @@ -1059,8 +1058,8 @@ bool Method::MergePartialFromCodedStream( // repeated .google.protobuf.Option options = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_options())); } else { goto handle_unusual; @@ -1070,12 +1069,12 @@ bool Method::MergePartialFromCodedStream( // .google.protobuf.Syntax syntax = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_syntax(static_cast< ::google::protobuf::Syntax >(value)); + set_syntax(static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(value)); } else { goto handle_unusual; } @@ -1087,7 +1086,7 @@ bool Method::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1104,55 +1103,55 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Method::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Method) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // string request_type_url = 2; if (this->request_type_url().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->request_type_url().data(), static_cast(this->request_type_url().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->request_type_url(), output); } // bool request_streaming = 3; if (this->request_streaming() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->request_streaming(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->request_streaming(), output); } // string response_type_url = 4; if (this->response_type_url().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->response_type_url().data(), static_cast(this->response_type_url().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->response_type_url(), output); } // bool response_streaming = 5; if (this->response_streaming() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->response_streaming(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(5, this->response_streaming(), output); } // repeated .google.protobuf.Option options = 6; for (unsigned int i = 0, n = static_cast(this->options_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 6, this->options(static_cast(i)), output); @@ -1160,82 +1159,82 @@ void Method::SerializeWithCachedSizes( // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 7, this->syntax(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Method) } -::google::protobuf::uint8* Method::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Method::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Method) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // string request_type_url = 2; if (this->request_type_url().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->request_type_url().data(), static_cast(this->request_type_url().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.request_type_url"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->request_type_url(), target); } // bool request_streaming = 3; if (this->request_streaming() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->request_streaming(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->request_streaming(), target); } // string response_type_url = 4; if (this->response_type_url().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->response_type_url().data(), static_cast(this->response_type_url().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Method.response_type_url"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 4, this->response_type_url(), target); } // bool response_streaming = 5; if (this->response_streaming() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->response_streaming(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->response_streaming(), target); } // repeated .google.protobuf.Option options = 6; for (unsigned int i = 0, n = static_cast(this->options_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 6, this->options(static_cast(i)), target); } // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 7, this->syntax(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Method) @@ -1248,10 +1247,10 @@ size_t Method::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1261,7 +1260,7 @@ size_t Method::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->options(static_cast(i))); } } @@ -1269,21 +1268,21 @@ size_t Method::ByteSizeLong() const { // string name = 1; if (this->name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // string request_type_url = 2; if (this->request_type_url().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->request_type_url()); } // string response_type_url = 4; if (this->response_type_url().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->response_type_url()); } @@ -1300,23 +1299,23 @@ size_t Method::ByteSizeLong() const { // .google.protobuf.Syntax syntax = 7; if (this->syntax() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->syntax()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->syntax()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Method::MergeFrom(const ::google::protobuf::Message& from) { +void Method::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Method) GOOGLE_DCHECK_NE(&from, this); const Method* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Method) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Method) MergeFrom(*source); @@ -1327,21 +1326,21 @@ void Method::MergeFrom(const Method& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Method) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; options_.MergeFrom(from.options_); if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.request_type_url().size() > 0) { - request_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_type_url_); + request_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.request_type_url_); } if (from.response_type_url().size() > 0) { - response_type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.response_type_url_); + response_type_url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.response_type_url_); } if (from.request_streaming() != 0) { set_request_streaming(from.request_streaming()); @@ -1354,7 +1353,7 @@ void Method::MergeFrom(const Method& from) { } } -void Method::CopyFrom(const ::google::protobuf::Message& from) { +void Method::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Method) if (&from == this) return; Clear(); @@ -1380,19 +1379,19 @@ void Method::InternalSwap(Method* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); CastToBase(&options_)->InternalSwap(CastToBase(&other->options_)); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - request_type_url_.Swap(&other->request_type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + request_type_url_.Swap(&other->request_type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - response_type_url_.Swap(&other->response_type_url_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + response_type_url_.Swap(&other->response_type_url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(request_streaming_, other->request_streaming_); swap(response_streaming_, other->response_streaming_); swap(syntax_, other->syntax_); } -::google::protobuf::Metadata Method::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Method::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages]; } @@ -1411,30 +1410,30 @@ const int Mixin::kRootFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Mixin::Mixin() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Mixin) } Mixin::Mixin(const Mixin& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } - root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.root().size() > 0) { - root_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.root_); + root_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.root_); } // @@protoc_insertion_point(copy_constructor:google.protobuf.Mixin) } void Mixin::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - root_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + root_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } Mixin::~Mixin() { @@ -1443,48 +1442,49 @@ Mixin::~Mixin() { } void Mixin::SharedDtor() { - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - root_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + root_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Mixin::SetCachedSize(int size) const { _cached_size_.Set(size); } const Mixin& Mixin::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Mixin_google_2fprotobuf_2fapi_2eproto.base); return *internal_default_instance(); } void Mixin::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Mixin) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - root_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + root_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Mixin::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Mixin::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Mixin.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "google.protobuf.Mixin.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // string root = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_root(), ptr, ctx, "google.protobuf.Mixin.root"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_root(), ptr, ctx, "google.protobuf.Mixin.root"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -1505,23 +1505,23 @@ const char* Mixin::_InternalParse(const char* ptr, ::google::protobuf::internal: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Mixin::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Mixin) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Mixin.name")); } else { goto handle_unusual; @@ -1531,12 +1531,12 @@ bool Mixin::MergePartialFromCodedStream( // string root = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_root())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->root().data(), static_cast(this->root().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Mixin.root")); } else { goto handle_unusual; @@ -1549,7 +1549,7 @@ bool Mixin::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1566,68 +1566,68 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Mixin::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Mixin) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // string root = 2; if (this->root().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->root().data(), static_cast(this->root().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->root(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Mixin) } -::google::protobuf::uint8* Mixin::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Mixin::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Mixin) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // string root = 2; if (this->root().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->root().data(), static_cast(this->root().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Mixin.root"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->root(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Mixin) @@ -1640,41 +1640,41 @@ size_t Mixin::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // string root = 2; if (this->root().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->root()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Mixin::MergeFrom(const ::google::protobuf::Message& from) { +void Mixin::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Mixin) GOOGLE_DCHECK_NE(&from, this); const Mixin* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Mixin) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Mixin) MergeFrom(*source); @@ -1685,20 +1685,20 @@ void Mixin::MergeFrom(const Mixin& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Mixin) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.root().size() > 0) { - root_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.root_); + root_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.root_); } } -void Mixin::CopyFrom(const ::google::protobuf::Message& from) { +void Mixin::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Mixin) if (&from == this) return; Clear(); @@ -1723,34 +1723,31 @@ void Mixin::Swap(Mixin* other) { void Mixin::InternalSwap(Mixin* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - root_.Swap(&other->root_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + root_.Swap(&other->root_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata Mixin::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Mixin::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fapi_2eproto); return ::file_level_metadata_google_2fprotobuf_2fapi_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::Api* Arena::CreateMaybeMessage< ::google::protobuf::Api >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::Api >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Api >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Api >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::Method* Arena::CreateMaybeMessage< ::google::protobuf::Method >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::Method >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Method >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Method >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::Mixin* Arena::CreateMaybeMessage< ::google::protobuf::Mixin >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::Mixin >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Mixin >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::Mixin >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index 3b74e19bcd..4e4f921f01 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/api.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fapi_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fapi_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fapi_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fapi_2eproto #include #include @@ -31,34 +31,31 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google #include #include // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fapi_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fapi_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[3] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2fapi_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class Api; class ApiDefaultTypeInternal; PROTOBUF_EXPORT extern ApiDefaultTypeInternal _Api_default_instance_; @@ -68,34 +65,32 @@ PROTOBUF_EXPORT extern MethodDefaultTypeInternal _Method_default_instance_; class Mixin; class MixinDefaultTypeInternal; PROTOBUF_EXPORT extern MixinDefaultTypeInternal _Mixin_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::Api* Arena::CreateMaybeMessage<::google::protobuf::Api>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::Method* Arena::CreateMaybeMessage<::google::protobuf::Method>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::Mixin* Arena::CreateMaybeMessage<::google::protobuf::Mixin>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Api* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Method* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Mixin* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN // =================================================================== class PROTOBUF_EXPORT Api final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ { public: Api(); virtual ~Api(); Api(const Api& from); - - inline Api& operator=(const Api& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Api(Api&& from) noexcept : Api() { *this = ::std::move(from); } + inline Api& operator=(const Api& from) { + CopyFrom(from); + return *this; + } inline Api& operator=(Api&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -104,8 +99,8 @@ class PROTOBUF_EXPORT Api final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Api& default_instance(); @@ -129,11 +124,11 @@ class PROTOBUF_EXPORT Api final : return CreateMaybeMessage(nullptr); } - Api* New(::google::protobuf::Arena* arena) const final { + Api* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Api& from); void MergeFrom(const Api& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -141,15 +136,15 @@ class PROTOBUF_EXPORT Api final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -157,12 +152,12 @@ class PROTOBUF_EXPORT Api final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Api* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Api"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -170,7 +165,7 @@ class PROTOBUF_EXPORT Api final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -180,116 +175,110 @@ class PROTOBUF_EXPORT Api final : int methods_size() const; void clear_methods(); static const int kMethodsFieldNumber = 2; - ::google::protobuf::Method* mutable_methods(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* + PROTOBUF_NAMESPACE_ID::Method* mutable_methods(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >* mutable_methods(); - const ::google::protobuf::Method& methods(int index) const; - ::google::protobuf::Method* add_methods(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& + const PROTOBUF_NAMESPACE_ID::Method& methods(int index) const; + PROTOBUF_NAMESPACE_ID::Method* add_methods(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >& methods() const; // repeated .google.protobuf.Option options = 3; int options_size() const; void clear_options(); static const int kOptionsFieldNumber = 3; - ::google::protobuf::Option* mutable_options(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* + PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); - const ::google::protobuf::Option& options(int index) const; - ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* add_options(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& options() const; // repeated .google.protobuf.Mixin mixins = 6; int mixins_size() const; void clear_mixins(); static const int kMixinsFieldNumber = 6; - ::google::protobuf::Mixin* mutable_mixins(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* + PROTOBUF_NAMESPACE_ID::Mixin* mutable_mixins(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >* mutable_mixins(); - const ::google::protobuf::Mixin& mixins(int index) const; - ::google::protobuf::Mixin* add_mixins(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& + const PROTOBUF_NAMESPACE_ID::Mixin& mixins(int index) const; + PROTOBUF_NAMESPACE_ID::Mixin* add_mixins(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >& mixins() const; // string name = 1; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); // string version = 4; void clear_version(); static const int kVersionFieldNumber = 4; - const ::std::string& version() const; - void set_version(const ::std::string& value); - #if LANG_CXX11 - void set_version(::std::string&& value); - #endif + const std::string& version() const; + void set_version(const std::string& value); + void set_version(std::string&& value); void set_version(const char* value); void set_version(const char* value, size_t size); - ::std::string* mutable_version(); - ::std::string* release_version(); - void set_allocated_version(::std::string* version); + std::string* mutable_version(); + std::string* release_version(); + void set_allocated_version(std::string* version); // .google.protobuf.SourceContext source_context = 5; bool has_source_context() const; void clear_source_context(); static const int kSourceContextFieldNumber = 5; - const ::google::protobuf::SourceContext& source_context() const; - ::google::protobuf::SourceContext* release_source_context(); - ::google::protobuf::SourceContext* mutable_source_context(); - void set_allocated_source_context(::google::protobuf::SourceContext* source_context); + const PROTOBUF_NAMESPACE_ID::SourceContext& source_context() const; + PROTOBUF_NAMESPACE_ID::SourceContext* release_source_context(); + PROTOBUF_NAMESPACE_ID::SourceContext* mutable_source_context(); + void set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context); // .google.protobuf.Syntax syntax = 7; void clear_syntax(); static const int kSyntaxFieldNumber = 7; - ::google::protobuf::Syntax syntax() const; - void set_syntax(::google::protobuf::Syntax value); + PROTOBUF_NAMESPACE_ID::Syntax syntax() const; + void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); // @@protoc_insertion_point(class_scope:google.protobuf.Api) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method > methods_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin > mixins_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr version_; - ::google::protobuf::SourceContext* source_context_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method > methods_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin > mixins_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_; + PROTOBUF_NAMESPACE_ID::SourceContext* source_context_; int syntax_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT Method final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Method) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Method) */ { public: Method(); virtual ~Method(); Method(const Method& from); - - inline Method& operator=(const Method& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Method(Method&& from) noexcept : Method() { *this = ::std::move(from); } + inline Method& operator=(const Method& from) { + CopyFrom(from); + return *this; + } inline Method& operator=(Method&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -298,8 +287,8 @@ class PROTOBUF_EXPORT Method final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Method& default_instance(); @@ -323,11 +312,11 @@ class PROTOBUF_EXPORT Method final : return CreateMaybeMessage(nullptr); } - Method* New(::google::protobuf::Arena* arena) const final { + Method* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Method& from); void MergeFrom(const Method& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -335,15 +324,15 @@ class PROTOBUF_EXPORT Method final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -351,12 +340,12 @@ class PROTOBUF_EXPORT Method final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Method* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Method"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -364,7 +353,7 @@ class PROTOBUF_EXPORT Method final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -374,55 +363,49 @@ class PROTOBUF_EXPORT Method final : int options_size() const; void clear_options(); static const int kOptionsFieldNumber = 6; - ::google::protobuf::Option* mutable_options(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* + PROTOBUF_NAMESPACE_ID::Option* mutable_options(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* mutable_options(); - const ::google::protobuf::Option& options(int index) const; - ::google::protobuf::Option* add_options(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& + const PROTOBUF_NAMESPACE_ID::Option& options(int index) const; + PROTOBUF_NAMESPACE_ID::Option* add_options(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& options() const; // string name = 1; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); // string request_type_url = 2; void clear_request_type_url(); static const int kRequestTypeUrlFieldNumber = 2; - const ::std::string& request_type_url() const; - void set_request_type_url(const ::std::string& value); - #if LANG_CXX11 - void set_request_type_url(::std::string&& value); - #endif + const std::string& request_type_url() const; + void set_request_type_url(const std::string& value); + void set_request_type_url(std::string&& value); void set_request_type_url(const char* value); void set_request_type_url(const char* value, size_t size); - ::std::string* mutable_request_type_url(); - ::std::string* release_request_type_url(); - void set_allocated_request_type_url(::std::string* request_type_url); + std::string* mutable_request_type_url(); + std::string* release_request_type_url(); + void set_allocated_request_type_url(std::string* request_type_url); // string response_type_url = 4; void clear_response_type_url(); static const int kResponseTypeUrlFieldNumber = 4; - const ::std::string& response_type_url() const; - void set_response_type_url(const ::std::string& value); - #if LANG_CXX11 - void set_response_type_url(::std::string&& value); - #endif + const std::string& response_type_url() const; + void set_response_type_url(const std::string& value); + void set_response_type_url(std::string&& value); void set_response_type_url(const char* value); void set_response_type_url(const char* value, size_t size); - ::std::string* mutable_response_type_url(); - ::std::string* release_response_type_url(); - void set_allocated_response_type_url(::std::string* response_type_url); + std::string* mutable_response_type_url(); + std::string* release_response_type_url(); + void set_allocated_response_type_url(std::string* response_type_url); // bool request_streaming = 3; void clear_request_streaming(); @@ -439,44 +422,42 @@ class PROTOBUF_EXPORT Method final : // .google.protobuf.Syntax syntax = 7; void clear_syntax(); static const int kSyntaxFieldNumber = 7; - ::google::protobuf::Syntax syntax() const; - void set_syntax(::google::protobuf::Syntax value); + PROTOBUF_NAMESPACE_ID::Syntax syntax() const; + void set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value); // @@protoc_insertion_point(class_scope:google.protobuf.Method) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option > options_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr request_type_url_; - ::google::protobuf::internal::ArenaStringPtr response_type_url_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option > options_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr request_type_url_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr response_type_url_; bool request_streaming_; bool response_streaming_; int syntax_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT Mixin final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ { public: Mixin(); virtual ~Mixin(); Mixin(const Mixin& from); - - inline Mixin& operator=(const Mixin& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Mixin(Mixin&& from) noexcept : Mixin() { *this = ::std::move(from); } + inline Mixin& operator=(const Mixin& from) { + CopyFrom(from); + return *this; + } inline Mixin& operator=(Mixin&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -485,8 +466,8 @@ class PROTOBUF_EXPORT Mixin final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Mixin& default_instance(); @@ -510,11 +491,11 @@ class PROTOBUF_EXPORT Mixin final : return CreateMaybeMessage(nullptr); } - Mixin* New(::google::protobuf::Arena* arena) const final { + Mixin* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Mixin& from); void MergeFrom(const Mixin& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -522,15 +503,15 @@ class PROTOBUF_EXPORT Mixin final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -538,12 +519,12 @@ class PROTOBUF_EXPORT Mixin final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Mixin* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Mixin"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -551,7 +532,7 @@ class PROTOBUF_EXPORT Mixin final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -560,39 +541,35 @@ class PROTOBUF_EXPORT Mixin final : // string name = 1; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); // string root = 2; void clear_root(); static const int kRootFieldNumber = 2; - const ::std::string& root() const; - void set_root(const ::std::string& value); - #if LANG_CXX11 - void set_root(::std::string&& value); - #endif + const std::string& root() const; + void set_root(const std::string& value); + void set_root(std::string&& value); void set_root(const char* value); void set_root(const char* value, size_t size); - ::std::string* mutable_root(); - ::std::string* release_root(); - void set_allocated_root(::std::string* root); + std::string* mutable_root(); + std::string* release_root(); + void set_allocated_root(std::string* root); // @@protoc_insertion_point(class_scope:google.protobuf.Mixin) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr root_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr root_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fapi_2eproto; }; // =================================================================== @@ -608,54 +585,52 @@ class PROTOBUF_EXPORT Mixin final : // string name = 1; inline void Api::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Api::name() const { +inline const std::string& Api::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.name) return name_.GetNoArena(); } -inline void Api::set_name(const ::std::string& value) { +inline void Api::set_name(const std::string& value) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Api.name) } -#if LANG_CXX11 -inline void Api::set_name(::std::string&& value) { +inline void Api::set_name(std::string&& value) { name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.name) } -#endif inline void Api::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Api.name) } inline void Api::set_name(const char* value, size_t size) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.name) } -inline ::std::string* Api::mutable_name() { +inline std::string* Api::mutable_name() { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Api::release_name() { +inline std::string* Api::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Api.name) - return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Api::set_allocated_name(::std::string* name) { +inline void Api::set_allocated_name(std::string* name) { if (name != nullptr) { } else { } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.name) } @@ -666,24 +641,24 @@ inline int Api::methods_size() const { inline void Api::clear_methods() { methods_.Clear(); } -inline ::google::protobuf::Method* Api::mutable_methods(int index) { +inline PROTOBUF_NAMESPACE_ID::Method* Api::mutable_methods(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.methods) return methods_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >* Api::mutable_methods() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.methods) return &methods_; } -inline const ::google::protobuf::Method& Api::methods(int index) const { +inline const PROTOBUF_NAMESPACE_ID::Method& Api::methods(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.methods) return methods_.Get(index); } -inline ::google::protobuf::Method* Api::add_methods() { +inline PROTOBUF_NAMESPACE_ID::Method* Api::add_methods() { // @@protoc_insertion_point(field_add:google.protobuf.Api.methods) return methods_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Method >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Method >& Api::methods() const { // @@protoc_insertion_point(field_list:google.protobuf.Api.methods) return methods_; @@ -693,24 +668,24 @@ Api::methods() const { inline int Api::options_size() const { return options_.size(); } -inline ::google::protobuf::Option* Api::mutable_options(int index) { +inline PROTOBUF_NAMESPACE_ID::Option* Api::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.options) return options_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* Api::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.options) return &options_; } -inline const ::google::protobuf::Option& Api::options(int index) const { +inline const PROTOBUF_NAMESPACE_ID::Option& Api::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.options) return options_.Get(index); } -inline ::google::protobuf::Option* Api::add_options() { +inline PROTOBUF_NAMESPACE_ID::Option* Api::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Api.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& Api::options() const { // @@protoc_insertion_point(field_list:google.protobuf.Api.options) return options_; @@ -718,54 +693,52 @@ Api::options() const { // string version = 4; inline void Api::clear_version() { - version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Api::version() const { +inline const std::string& Api::version() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.version) return version_.GetNoArena(); } -inline void Api::set_version(const ::std::string& value) { +inline void Api::set_version(const std::string& value) { - version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Api.version) } -#if LANG_CXX11 -inline void Api::set_version(::std::string&& value) { +inline void Api::set_version(std::string&& value) { version_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.version) } -#endif inline void Api::set_version(const char* value) { GOOGLE_DCHECK(value != nullptr); - version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Api.version) } inline void Api::set_version(const char* value, size_t size) { - version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Api.version) } -inline ::std::string* Api::mutable_version() { +inline std::string* Api::mutable_version() { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.version) - return version_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return version_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Api::release_version() { +inline std::string* Api::release_version() { // @@protoc_insertion_point(field_release:google.protobuf.Api.version) - return version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return version_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Api::set_allocated_version(::std::string* version) { +inline void Api::set_allocated_version(std::string* version) { if (version != nullptr) { } else { } - version_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), version); + version_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), version); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Api.version) } @@ -773,37 +746,37 @@ inline void Api::set_allocated_version(::std::string* version) { inline bool Api::has_source_context() const { return this != internal_default_instance() && source_context_ != nullptr; } -inline const ::google::protobuf::SourceContext& Api::source_context() const { - const ::google::protobuf::SourceContext* p = source_context_; +inline const PROTOBUF_NAMESPACE_ID::SourceContext& Api::source_context() const { + const PROTOBUF_NAMESPACE_ID::SourceContext* p = source_context_; // @@protoc_insertion_point(field_get:google.protobuf.Api.source_context) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_SourceContext_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_); } -inline ::google::protobuf::SourceContext* Api::release_source_context() { +inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::release_source_context() { // @@protoc_insertion_point(field_release:google.protobuf.Api.source_context) - ::google::protobuf::SourceContext* temp = source_context_; + PROTOBUF_NAMESPACE_ID::SourceContext* temp = source_context_; source_context_ = nullptr; return temp; } -inline ::google::protobuf::SourceContext* Api::mutable_source_context() { +inline PROTOBUF_NAMESPACE_ID::SourceContext* Api::mutable_source_context() { if (source_context_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::SourceContext>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); source_context_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.Api.source_context) return source_context_; } -inline void Api::set_allocated_source_context(::google::protobuf::SourceContext* source_context) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void Api::set_allocated_source_context(PROTOBUF_NAMESPACE_ID::SourceContext* source_context) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(source_context_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_context_); } if (source_context) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - source_context = ::google::protobuf::internal::GetOwnedMessage( + source_context = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, source_context, submessage_arena); } @@ -821,24 +794,24 @@ inline int Api::mixins_size() const { inline void Api::clear_mixins() { mixins_.Clear(); } -inline ::google::protobuf::Mixin* Api::mutable_mixins(int index) { +inline PROTOBUF_NAMESPACE_ID::Mixin* Api::mutable_mixins(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Api.mixins) return mixins_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >* Api::mutable_mixins() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Api.mixins) return &mixins_; } -inline const ::google::protobuf::Mixin& Api::mixins(int index) const { +inline const PROTOBUF_NAMESPACE_ID::Mixin& Api::mixins(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Api.mixins) return mixins_.Get(index); } -inline ::google::protobuf::Mixin* Api::add_mixins() { +inline PROTOBUF_NAMESPACE_ID::Mixin* Api::add_mixins() { // @@protoc_insertion_point(field_add:google.protobuf.Api.mixins) return mixins_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Mixin >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Mixin >& Api::mixins() const { // @@protoc_insertion_point(field_list:google.protobuf.Api.mixins) return mixins_; @@ -848,11 +821,11 @@ Api::mixins() const { inline void Api::clear_syntax() { syntax_ = 0; } -inline ::google::protobuf::Syntax Api::syntax() const { +inline PROTOBUF_NAMESPACE_ID::Syntax Api::syntax() const { // @@protoc_insertion_point(field_get:google.protobuf.Api.syntax) - return static_cast< ::google::protobuf::Syntax >(syntax_); + return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_); } -inline void Api::set_syntax(::google::protobuf::Syntax value) { +inline void Api::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { syntax_ = value; // @@protoc_insertion_point(field_set:google.protobuf.Api.syntax) @@ -864,107 +837,103 @@ inline void Api::set_syntax(::google::protobuf::Syntax value) { // string name = 1; inline void Method::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Method::name() const { +inline const std::string& Method::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.name) return name_.GetNoArena(); } -inline void Method::set_name(const ::std::string& value) { +inline void Method::set_name(const std::string& value) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.name) } -#if LANG_CXX11 -inline void Method::set_name(::std::string&& value) { +inline void Method::set_name(std::string&& value) { name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.name) } -#endif inline void Method::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Method.name) } inline void Method::set_name(const char* value, size_t size) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.name) } -inline ::std::string* Method::mutable_name() { +inline std::string* Method::mutable_name() { // @@protoc_insertion_point(field_mutable:google.protobuf.Method.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Method::release_name() { +inline std::string* Method::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Method.name) - return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Method::set_allocated_name(::std::string* name) { +inline void Method::set_allocated_name(std::string* name) { if (name != nullptr) { } else { } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.name) } // string request_type_url = 2; inline void Method::clear_request_type_url() { - request_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + request_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Method::request_type_url() const { +inline const std::string& Method::request_type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.request_type_url) return request_type_url_.GetNoArena(); } -inline void Method::set_request_type_url(const ::std::string& value) { +inline void Method::set_request_type_url(const std::string& value) { - request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + request_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url) } -#if LANG_CXX11 -inline void Method::set_request_type_url(::std::string&& value) { +inline void Method::set_request_type_url(std::string&& value) { request_type_url_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.request_type_url) } -#endif inline void Method::set_request_type_url(const char* value) { GOOGLE_DCHECK(value != nullptr); - request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + request_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Method.request_type_url) } inline void Method::set_request_type_url(const char* value, size_t size) { - request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + request_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.request_type_url) } -inline ::std::string* Method::mutable_request_type_url() { +inline std::string* Method::mutable_request_type_url() { // @@protoc_insertion_point(field_mutable:google.protobuf.Method.request_type_url) - return request_type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return request_type_url_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Method::release_request_type_url() { +inline std::string* Method::release_request_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Method.request_type_url) - return request_type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return request_type_url_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Method::set_allocated_request_type_url(::std::string* request_type_url) { +inline void Method::set_allocated_request_type_url(std::string* request_type_url) { if (request_type_url != nullptr) { } else { } - request_type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_type_url); + request_type_url_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), request_type_url); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.request_type_url) } @@ -984,54 +953,52 @@ inline void Method::set_request_streaming(bool value) { // string response_type_url = 4; inline void Method::clear_response_type_url() { - response_type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + response_type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Method::response_type_url() const { +inline const std::string& Method::response_type_url() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.response_type_url) return response_type_url_.GetNoArena(); } -inline void Method::set_response_type_url(const ::std::string& value) { +inline void Method::set_response_type_url(const std::string& value) { - response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + response_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url) } -#if LANG_CXX11 -inline void Method::set_response_type_url(::std::string&& value) { +inline void Method::set_response_type_url(std::string&& value) { response_type_url_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.response_type_url) } -#endif inline void Method::set_response_type_url(const char* value) { GOOGLE_DCHECK(value != nullptr); - response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + response_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Method.response_type_url) } inline void Method::set_response_type_url(const char* value, size_t size) { - response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + response_type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Method.response_type_url) } -inline ::std::string* Method::mutable_response_type_url() { +inline std::string* Method::mutable_response_type_url() { // @@protoc_insertion_point(field_mutable:google.protobuf.Method.response_type_url) - return response_type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return response_type_url_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Method::release_response_type_url() { +inline std::string* Method::release_response_type_url() { // @@protoc_insertion_point(field_release:google.protobuf.Method.response_type_url) - return response_type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return response_type_url_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Method::set_allocated_response_type_url(::std::string* response_type_url) { +inline void Method::set_allocated_response_type_url(std::string* response_type_url) { if (response_type_url != nullptr) { } else { } - response_type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), response_type_url); + response_type_url_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), response_type_url); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Method.response_type_url) } @@ -1053,24 +1020,24 @@ inline void Method::set_response_streaming(bool value) { inline int Method::options_size() const { return options_.size(); } -inline ::google::protobuf::Option* Method::mutable_options(int index) { +inline PROTOBUF_NAMESPACE_ID::Option* Method::mutable_options(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.Method.options) return options_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >* Method::mutable_options() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.Method.options) return &options_; } -inline const ::google::protobuf::Option& Method::options(int index) const { +inline const PROTOBUF_NAMESPACE_ID::Option& Method::options(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.Method.options) return options_.Get(index); } -inline ::google::protobuf::Option* Method::add_options() { +inline PROTOBUF_NAMESPACE_ID::Option* Method::add_options() { // @@protoc_insertion_point(field_add:google.protobuf.Method.options) return options_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Option >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Option >& Method::options() const { // @@protoc_insertion_point(field_list:google.protobuf.Method.options) return options_; @@ -1080,11 +1047,11 @@ Method::options() const { inline void Method::clear_syntax() { syntax_ = 0; } -inline ::google::protobuf::Syntax Method::syntax() const { +inline PROTOBUF_NAMESPACE_ID::Syntax Method::syntax() const { // @@protoc_insertion_point(field_get:google.protobuf.Method.syntax) - return static_cast< ::google::protobuf::Syntax >(syntax_); + return static_cast< PROTOBUF_NAMESPACE_ID::Syntax >(syntax_); } -inline void Method::set_syntax(::google::protobuf::Syntax value) { +inline void Method::set_syntax(PROTOBUF_NAMESPACE_ID::Syntax value) { syntax_ = value; // @@protoc_insertion_point(field_set:google.protobuf.Method.syntax) @@ -1096,107 +1063,103 @@ inline void Method::set_syntax(::google::protobuf::Syntax value) { // string name = 1; inline void Mixin::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Mixin::name() const { +inline const std::string& Mixin::name() const { // @@protoc_insertion_point(field_get:google.protobuf.Mixin.name) return name_.GetNoArena(); } -inline void Mixin::set_name(const ::std::string& value) { +inline void Mixin::set_name(const std::string& value) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.name) } -#if LANG_CXX11 -inline void Mixin::set_name(::std::string&& value) { +inline void Mixin::set_name(std::string&& value) { name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.name) } -#endif inline void Mixin::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.name) } inline void Mixin::set_name(const char* value, size_t size) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.name) } -inline ::std::string* Mixin::mutable_name() { +inline std::string* Mixin::mutable_name() { // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Mixin::release_name() { +inline std::string* Mixin::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.Mixin.name) - return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Mixin::set_allocated_name(::std::string* name) { +inline void Mixin::set_allocated_name(std::string* name) { if (name != nullptr) { } else { } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.name) } // string root = 2; inline void Mixin::clear_root() { - root_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + root_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Mixin::root() const { +inline const std::string& Mixin::root() const { // @@protoc_insertion_point(field_get:google.protobuf.Mixin.root) return root_.GetNoArena(); } -inline void Mixin::set_root(const ::std::string& value) { +inline void Mixin::set_root(const std::string& value) { - root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + root_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.root) } -#if LANG_CXX11 -inline void Mixin::set_root(::std::string&& value) { +inline void Mixin::set_root(std::string&& value) { root_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.root) } -#endif inline void Mixin::set_root(const char* value) { GOOGLE_DCHECK(value != nullptr); - root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + root_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.Mixin.root) } inline void Mixin::set_root(const char* value, size_t size) { - root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + root_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Mixin.root) } -inline ::std::string* Mixin::mutable_root() { +inline std::string* Mixin::mutable_root() { // @@protoc_insertion_point(field_mutable:google.protobuf.Mixin.root) - return root_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return root_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Mixin::release_root() { +inline std::string* Mixin::release_root() { // @@protoc_insertion_point(field_release:google.protobuf.Mixin.root) - return root_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return root_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Mixin::set_allocated_root(::std::string* root) { +inline void Mixin::set_allocated_root(std::string* root) { if (root != nullptr) { } else { } - root_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), root); + root_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), root); // @@protoc_insertion_point(field_set_allocated:google.protobuf.Mixin.root) } @@ -1210,10 +1173,9 @@ inline void Mixin::set_allocated_root(::std::string* root) { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fapi_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fapi_2eproto diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index bd56239ec9..3a9feb5b34 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -35,6 +35,7 @@ #include #include +#include #ifdef max #undef max // Visual Studio defines this macro #endif @@ -244,10 +245,7 @@ struct ArenaOptions { // well as protobuf container types like RepeatedPtrField and Map. The protocol // is internal to protobuf and is not guaranteed to be stable. Non-proto types // should not rely on this protocol. -// -// Do NOT subclass Arena. This class will be marked as final when C++11 is -// enabled. -class PROTOBUF_EXPORT Arena { +class PROTOBUF_EXPORT Arena final { public: // Arena constructor taking custom options. See ArenaOptions below for // descriptions of the options available. @@ -442,7 +440,11 @@ class PROTOBUF_EXPORT Arena { sizeof(char)> is_arena_constructable; - template + template () + .GetArena())>::value, + int>::type = 0> static char HasGetArena(decltype(&U::GetArena)); template static double HasGetArena(...); @@ -480,6 +482,9 @@ class PROTOBUF_EXPORT Arena { }; private: + template + struct has_get_arena : InternalHelper::has_get_arena {}; + template PROTOBUF_ALWAYS_INLINE static T* CreateMessageInternal(Arena* arena, Args&&... args) { @@ -673,15 +678,15 @@ class PROTOBUF_EXPORT Arena { } template ::value && - InternalHelper::has_get_arena::value, + has_get_arena::value, int>::type = 0> PROTOBUF_ALWAYS_INLINE static Arena* GetArenaInternal(const T* value) { return value->GetArena(); } - template ::value && - !InternalHelper::has_get_arena::value, - int>::type = 0> + template ::value && + !has_get_arena::value, + int>::type = 0> PROTOBUF_ALWAYS_INLINE static Arena* GetArenaInternal(const T* value) { return nullptr; } diff --git a/src/google/protobuf/arena_unittest.cc b/src/google/protobuf/arena_unittest.cc index 9fdcda5d6b..a682a9c323 100644 --- a/src/google/protobuf/arena_unittest.cc +++ b/src/google/protobuf/arena_unittest.cc @@ -59,10 +59,11 @@ using proto2_arena_unittest::ArenaMessage; -using protobuf_unittest::TestAllTypes; using protobuf_unittest::TestAllExtensions; -using protobuf_unittest::TestOneof2; +using protobuf_unittest::TestAllTypes; using protobuf_unittest::TestEmptyMessage; +using protobuf_unittest::TestOneof2; +using protobuf_unittest_no_arena::TestNoArenaMessage; namespace google { namespace protobuf { @@ -112,14 +113,14 @@ class PleaseDontCopyMe { // A class that takes four different types as constructor arguments. class MustBeConstructedWithOneThroughFour { public: - MustBeConstructedWithOneThroughFour( - int one, const char* two, const string& three, - const PleaseDontCopyMe* four) + MustBeConstructedWithOneThroughFour(int one, const char* two, + const std::string& three, + const PleaseDontCopyMe* four) : one_(one), two_(two), three_(three), four_(four) {} int one_; const char* const two_; - string three_; + std::string three_; const PleaseDontCopyMe* four_; private: @@ -129,21 +130,29 @@ class MustBeConstructedWithOneThroughFour { // A class that takes eight different types as constructor arguments. class MustBeConstructedWithOneThroughEight { public: - MustBeConstructedWithOneThroughEight( - int one, const char* two, const string& three, - const PleaseDontCopyMe* four, int five, const char* six, - const string& seven, const string& eight) - : one_(one), two_(two), three_(three), four_(four), five_(five), - six_(six), seven_(seven), eight_(eight) {} + MustBeConstructedWithOneThroughEight(int one, const char* two, + const std::string& three, + const PleaseDontCopyMe* four, int five, + const char* six, + const std::string& seven, + const std::string& eight) + : one_(one), + two_(two), + three_(three), + four_(four), + five_(five), + six_(six), + seven_(seven), + eight_(eight) {} int one_; const char* const two_; - string three_; + std::string three_; const PleaseDontCopyMe* four_; int five_; const char* const six_; - string seven_; - string eight_; + std::string seven_; + std::string eight_; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MustBeConstructedWithOneThroughEight); @@ -152,16 +161,14 @@ class MustBeConstructedWithOneThroughEight { TEST(ArenaTest, ArenaConstructable) { EXPECT_TRUE(Arena::is_arena_constructable::type::value); EXPECT_TRUE(Arena::is_arena_constructable::type::value); - EXPECT_FALSE(Arena::is_arena_constructable< - protobuf_unittest_no_arena::TestNoArenaMessage>::type::value); + EXPECT_FALSE(Arena::is_arena_constructable::type::value); EXPECT_FALSE(Arena::is_arena_constructable::type::value); } TEST(ArenaTest, DestructorSkippable) { EXPECT_TRUE(Arena::is_destructor_skippable::type::value); EXPECT_TRUE(Arena::is_destructor_skippable::type::value); - EXPECT_FALSE(Arena::is_destructor_skippable< - protobuf_unittest_no_arena::TestNoArenaMessage>::type::value); + EXPECT_FALSE(Arena::is_destructor_skippable::type::value); EXPECT_FALSE(Arena::is_destructor_skippable::type::value); } @@ -171,12 +178,12 @@ TEST(ArenaTest, BasicCreate) { EXPECT_TRUE(Arena::Create(&arena) != NULL); EXPECT_TRUE(Arena::Create(&arena) != NULL); EXPECT_TRUE(Arena::Create(&arena) != NULL); - EXPECT_TRUE(Arena::Create(&arena) != NULL); + EXPECT_TRUE(Arena::Create(&arena) != NULL); arena.Own(new int32); arena.Own(new int64); arena.Own(new float); arena.Own(new double); - arena.Own(new string); + arena.Own(new std::string); arena.Own(NULL); Notifier notifier; SimpleDataType* data = Arena::Create(&arena); @@ -190,8 +197,8 @@ TEST(ArenaTest, BasicCreate) { TEST(ArenaTest, CreateAndConstCopy) { Arena arena; - const string s("foo"); - const string* s_copy = Arena::Create(&arena, s); + const std::string s("foo"); + const std::string* s_copy = Arena::Create(&arena, s); EXPECT_TRUE(s_copy != NULL); EXPECT_EQ("foo", s); EXPECT_EQ("foo", *s_copy); @@ -199,8 +206,8 @@ TEST(ArenaTest, CreateAndConstCopy) { TEST(ArenaTest, CreateAndNonConstCopy) { Arena arena; - string s("foo"); - const string* s_copy = Arena::Create(&arena, s); + std::string s("foo"); + const std::string* s_copy = Arena::Create(&arena, s); EXPECT_TRUE(s_copy != NULL); EXPECT_EQ("foo", s); EXPECT_EQ("foo", *s_copy); @@ -208,8 +215,8 @@ TEST(ArenaTest, CreateAndNonConstCopy) { TEST(ArenaTest, CreateAndMove) { Arena arena; - string s("foo"); - const string* s_move = Arena::Create(&arena, std::move(s)); + std::string s("foo"); + const std::string* s_move = Arena::Create(&arena, std::move(s)); EXPECT_TRUE(s_move != NULL); EXPECT_TRUE(s.empty()); // NOLINT EXPECT_EQ("foo", *s_move); @@ -217,7 +224,7 @@ TEST(ArenaTest, CreateAndMove) { TEST(ArenaTest, CreateWithFourConstructorArguments) { Arena arena; - const string three("3"); + const std::string three("3"); const PleaseDontCopyMe four(4); const MustBeConstructedWithOneThroughFour* new_object = Arena::Create( @@ -231,10 +238,10 @@ TEST(ArenaTest, CreateWithFourConstructorArguments) { TEST(ArenaTest, CreateWithEightConstructorArguments) { Arena arena; - const string three("3"); + const std::string three("3"); const PleaseDontCopyMe four(4); - const string seven("7"); - const string eight("8"); + const std::string seven("7"); + const std::string eight("8"); const MustBeConstructedWithOneThroughEight* new_object = Arena::Create( &arena, 1, "2", three, &four, 5, "6", seven, eight); @@ -251,14 +258,14 @@ TEST(ArenaTest, CreateWithEightConstructorArguments) { class PleaseMoveMe { public: - explicit PleaseMoveMe(const string& value) : value_(value) {} + explicit PleaseMoveMe(const std::string& value) : value_(value) {} PleaseMoveMe(PleaseMoveMe&&) = default; PleaseMoveMe(const PleaseMoveMe&) = delete; - const string& value() const { return value_; } + const std::string& value() const { return value_; } private: - string value_; + std::string value_; }; TEST(ArenaTest, CreateWithMoveArguments) { @@ -411,7 +418,7 @@ TEST(ArenaTest, ReflectionSwapFields) { reflection->SwapFields(arena1_message, arena2_message, fields); EXPECT_EQ(&arena1, arena1_message->GetArena()); EXPECT_EQ(&arena2, arena2_message->GetArena()); - string output; + std::string output; arena1_message->SerializeToString(&output); EXPECT_EQ(0, output.size()); TestUtil::ExpectAllFieldsSet(*arena2_message); @@ -461,7 +468,7 @@ TEST(ArenaTest, SetAllocatedMessage) { arena_message->set_allocated_optional_nested_message(nested); EXPECT_EQ(118, arena_message->optional_nested_message().bb()); - protobuf_unittest_no_arena::TestNoArenaMessage no_arena_message; + TestNoArenaMessage no_arena_message; EXPECT_FALSE(no_arena_message.has_arena_message()); no_arena_message.set_allocated_arena_message(NULL); EXPECT_FALSE(no_arena_message.has_arena_message()); @@ -485,7 +492,7 @@ TEST(ArenaTest, ReleaseMessage) { TEST(ArenaTest, SetAllocatedString) { Arena arena; TestAllTypes* arena_message = Arena::CreateMessage(&arena); - string* allocated_str = new string("hello"); + std::string* allocated_str = new std::string("hello"); arena_message->set_allocated_optional_string(allocated_str); EXPECT_EQ("hello", arena_message->optional_string()); } @@ -494,7 +501,7 @@ TEST(ArenaTest, ReleaseString) { Arena arena; TestAllTypes* arena_message = Arena::CreateMessage(&arena); arena_message->set_optional_string("hello"); - std::unique_ptr released_str( + std::unique_ptr released_str( arena_message->release_optional_string()); EXPECT_EQ("hello", *released_str); @@ -510,7 +517,7 @@ TEST(ArenaTest, SwapBetweenArenasWithAllFieldsSet) { TestAllTypes* arena2_message = Arena::CreateMessage(&arena2); TestUtil::SetAllFields(arena2_message); arena2_message->Swap(arena1_message); - string output; + std::string output; arena2_message->SerializeToString(&output); EXPECT_EQ(0, output.size()); } @@ -548,7 +555,7 @@ TEST(ArenaTest, SwapBetweenArenasUsingReflection) { TestUtil::SetAllFields(arena2_message); const Reflection* r = arena2_message->GetReflection(); r->Swap(arena1_message, arena2_message); - string output; + std::string output; arena2_message->SerializeToString(&output); EXPECT_EQ(0, output.size()); } @@ -571,7 +578,7 @@ TEST(ArenaTest, SwapBetweenArenaAndNonArenaUsingReflection) { TEST(ArenaTest, ReleaseFromArenaMessageMakesCopy) { TestAllTypes::NestedMessage* nested_msg = NULL; - string* nested_string = NULL; + std::string* nested_string = NULL; { Arena arena; TestAllTypes* arena_message = Arena::CreateMessage(&arena); @@ -763,7 +770,7 @@ TEST(ArenaTest, AddAllocatedToRepeatedField) { // Heap-arena case for strings (which are not arena-allocated). arena1_message->Clear(); for (int i = 0; i < 10; i++) { - string* s = new string("Test"); + std::string* s = new std::string("Test"); arena1_message->mutable_repeated_string()-> AddAllocated(s); // Should not copy. @@ -862,19 +869,21 @@ TEST(ArenaTest, ReleaseLastRepeatedField) { // no delete -- |released| is on the arena. } - // Test string case as well. ReleaseLast() in this case must copy the string, - // even though it was originally heap-allocated and its pointer was simply - // appended to the repeated field's internal vector, because the string was - // placed on the arena's destructor list and cannot be removed from that list - // (so the arena permanently owns the original instance). + // Test string case as well. ReleaseLast() in this case must copy the + // string, even though it was originally heap-allocated and its pointer + // was simply appended to the repeated field's internal vector, because the + // string was placed on the arena's destructor list and cannot be removed + // from that list (so the arena permanently owns the original instance). arena_message->Clear(); for (int i = 0; i < 10; i++) { - string* s = new string("Test"); + std::string* s = new std::string("Test"); arena_message->mutable_repeated_string()->AddAllocated(s); } for (int i = 0; i < 10; i++) { - const string* orig_element = &arena_message->repeated_string(10 - 1 - i); - string* released = arena_message->mutable_repeated_string()->ReleaseLast(); + const std::string* orig_element = + &arena_message->repeated_string(10 - 1 - i); + std::string* released = + arena_message->mutable_repeated_string()->ReleaseLast(); EXPECT_NE(released, orig_element); EXPECT_EQ("Test", *released); delete released; @@ -889,7 +898,7 @@ TEST(ArenaTest, UnsafeArenaReleaseAdd) { Arena arena; TestAllTypes* message1 = Arena::CreateMessage(&arena); TestAllTypes* message2 = Arena::CreateMessage(&arena); - string* arena_string = Arena::Create(&arena); + std::string* arena_string = Arena::Create(&arena); *arena_string = kContent; message1->unsafe_arena_set_allocated_optional_string(arena_string); @@ -902,7 +911,7 @@ TEST(ArenaTest, UnsafeArenaAddAllocated) { Arena arena; TestAllTypes* message = Arena::CreateMessage(&arena); for (int i = 0; i < 10; i++) { - string* arena_string = Arena::Create(&arena); + std::string* arena_string = Arena::Create(&arena); message->mutable_repeated_string()->UnsafeArenaAddAllocated(arena_string); EXPECT_EQ(arena_string, message->mutable_repeated_string(i)); } @@ -912,7 +921,7 @@ TEST(ArenaTest, UnsafeArenaRelease) { Arena arena; TestAllTypes* message = Arena::CreateMessage(&arena); - string* s = new string("test string"); + std::string* s = new std::string("test string"); message->unsafe_arena_set_allocated_optional_string(s); EXPECT_TRUE(message->has_optional_string()); EXPECT_EQ("test string", message->optional_string()); @@ -920,7 +929,7 @@ TEST(ArenaTest, UnsafeArenaRelease) { EXPECT_FALSE(message->has_optional_string()); delete s; - s = new string("test string"); + s = new std::string("test string"); message->unsafe_arena_set_allocated_oneof_string(s); EXPECT_TRUE(message->has_oneof_string()); EXPECT_EQ("test string", message->oneof_string()); @@ -934,9 +943,9 @@ TEST(ArenaTest, OneofMerge) { TestAllTypes* message0 = Arena::CreateMessage(&arena); TestAllTypes* message1 = Arena::CreateMessage(&arena); - message0->unsafe_arena_set_allocated_oneof_string(new string("x")); + message0->unsafe_arena_set_allocated_oneof_string(new std::string("x")); ASSERT_TRUE(message0->has_oneof_string()); - message1->unsafe_arena_set_allocated_oneof_string(new string("y")); + message1->unsafe_arena_set_allocated_oneof_string(new std::string("y")); ASSERT_TRUE(message1->has_oneof_string()); EXPECT_EQ("x", message0->oneof_string()); EXPECT_EQ("y", message1->oneof_string()); @@ -1005,8 +1014,8 @@ void TestSwapRepeatedField(Arena* arena1, Arena* arena2) { field1.Swap(&field2); EXPECT_EQ(5, field1.size()); EXPECT_EQ(10, field2.size()); - EXPECT_TRUE(string("field1") == field2.Get(0).optional_string()); - EXPECT_TRUE(string("field2") == field1.Get(0).optional_string()); + EXPECT_TRUE(std::string("field1") == field2.Get(0).optional_string()); + EXPECT_TRUE(std::string("field2") == field1.Get(0).optional_string()); // Ensure that fields retained their original order: for (int i = 0; i < field1.size(); i++) { EXPECT_EQ(i, field1.Get(i).optional_int32()); @@ -1044,8 +1053,8 @@ TEST(ArenaTest, ExtensionsOnArena) { Arena::CreateMessage(&arena); message_ext->SetExtension( protobuf_unittest::optional_int32_extension, 42); - message_ext->SetExtension( - protobuf_unittest::optional_string_extension, string("test")); + message_ext->SetExtension(protobuf_unittest::optional_string_extension, + std::string("test")); message_ext->MutableExtension( protobuf_unittest::optional_nested_message_extension)->set_bb(42); } @@ -1157,7 +1166,7 @@ TEST(ArenaTest, MutableMessageReflection) { void FillArenaAwareFields(TestAllTypes* message) { - string test_string = "hello world"; + std::string test_string = "hello world"; message->set_optional_int32(42); message->set_optional_string(test_string); message->set_optional_bytes(test_string); @@ -1213,7 +1222,7 @@ TEST(ArenaTest, MessageLiteOnArena) { TestAllTypes initial_message; FillArenaAwareFields(&initial_message); - string serialized; + std::string serialized; initial_message.SerializeToString(&serialized); { @@ -1236,14 +1245,14 @@ TEST(ArenaTest, MessageLiteOnArena) { // (even if this was not its original intent). TEST(ArenaTest, RepeatedFieldWithNonPODType) { { - RepeatedField field_on_heap; + RepeatedField field_on_heap; for (int i = 0; i < 100; i++) { *field_on_heap.Add() = "test string long enough to exceed inline buffer"; } } { Arena arena; - RepeatedField field_on_arena(&arena); + RepeatedField field_on_arena(&arena); for (int i = 0; i < 100; i++) { *field_on_arena.Add() = "test string long enough to exceed inline buffer"; } @@ -1339,6 +1348,33 @@ TEST(ArenaTest, GetArenaShouldReturnNullForNonArenaAllocatedMessages) { EXPECT_EQ(NULL, Arena::GetArena(const_pointer_to_message)); } +TEST(ArenaTest, GetArenaShouldReturnNullForNonArenaCompatibleTypes) { + TestNoArenaMessage message; + const TestNoArenaMessage* const_pointer_to_message = &message; + EXPECT_EQ(nullptr, Arena::GetArena(&message)); + EXPECT_EQ(nullptr, Arena::GetArena(const_pointer_to_message)); + + // Test that GetArena returns nullptr for types that have a GetArena method + // that doesn't return Arena*. + struct { + int GetArena() const { return 0; } + } has_get_arena_method_wrong_return_type; + EXPECT_EQ(nullptr, Arena::GetArena(&has_get_arena_method_wrong_return_type)); + + // Test that GetArena returns nullptr for types that have a GetArena alias. + struct { + using GetArena = Arena*; + } has_get_arena_alias; + EXPECT_EQ(nullptr, Arena::GetArena(&has_get_arena_alias)); + + // Test that GetArena returns nullptr for types that have a GetArena data + // member. + struct { + Arena GetArena; + } has_get_arena_data_member; + EXPECT_EQ(nullptr, Arena::GetArena(&has_get_arena_data_member)); +} + TEST(ArenaTest, AddCleanup) { Arena arena; for (int i = 0; i < 100; i++) { @@ -1351,7 +1387,7 @@ TEST(ArenaTest, UnsafeSetAllocatedOnArena) { TestAllTypes* message = Arena::CreateMessage(&arena); EXPECT_FALSE(message->has_optional_string()); - string owned_string = "test with long enough content to heap-allocate"; + std::string owned_string = "test with long enough content to heap-allocate"; message->unsafe_arena_set_allocated_optional_string(&owned_string); EXPECT_TRUE(message->has_optional_string()); diff --git a/src/google/protobuf/arenastring.h b/src/google/protobuf/arenastring.h index 9234ee00f0..f4ff07dca1 100644 --- a/src/google/protobuf/arenastring.h +++ b/src/google/protobuf/arenastring.h @@ -67,7 +67,7 @@ class TaggedPtr { struct PROTOBUF_EXPORT ArenaStringPtr { inline void Set(const ::std::string* default_value, - const ::std::string& value, ::google::protobuf::Arena* arena) { + const ::std::string& value, Arena* arena) { if (ptr_ == default_value) { CreateInstance(arena, &value); } else { @@ -76,8 +76,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { } inline void SetLite(const ::std::string* default_value, - const ::std::string& value, - ::google::protobuf::Arena* arena) { + const ::std::string& value, Arena* arena) { Set(default_value, value, arena); } @@ -85,7 +84,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { inline const ::std::string& Get() const { return *ptr_; } inline ::std::string* Mutable(const ::std::string* default_value, - ::google::protobuf::Arena* arena) { + Arena* arena) { if (ptr_ == default_value) { CreateInstance(arena, default_value); } @@ -97,7 +96,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // retains ownership. Clears this field back to NULL state. Used to implement // release_() methods on generated classes. inline ::std::string* Release(const ::std::string* default_value, - ::google::protobuf::Arena* arena) { + Arena* arena) { if (ptr_ == default_value) { return NULL; } @@ -105,8 +104,8 @@ struct PROTOBUF_EXPORT ArenaStringPtr { } // Similar to Release, but ptr_ cannot be the default_value. - inline ::std::string* ReleaseNonDefault( - const ::std::string* default_value, ::google::protobuf::Arena* arena) { + inline ::std::string* ReleaseNonDefault(const ::std::string* default_value, + Arena* arena) { GOOGLE_DCHECK(!IsDefault(default_value)); ::std::string* released = NULL; if (arena != NULL) { @@ -126,7 +125,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // state. Used to implement unsafe_arena_release_() methods on // generated classes. inline ::std::string* UnsafeArenaRelease(const ::std::string* default_value, - ::google::protobuf::Arena* /* arena */) { + Arena* /* arena */) { if (ptr_ == default_value) { return NULL; } @@ -139,7 +138,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // destructor is registered with the arena. Used to implement // set_allocated_ in generated classes. inline void SetAllocated(const ::std::string* default_value, - ::std::string* value, ::google::protobuf::Arena* arena) { + ::std::string* value, Arena* arena) { if (arena == NULL && ptr_ != default_value) { Destroy(default_value, arena); } @@ -159,7 +158,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // to implement unsafe_arena_set_allocated_ in generated classes. inline void UnsafeArenaSetAllocated(const ::std::string* default_value, ::std::string* value, - ::google::protobuf::Arena* /* arena */) { + Arena* /* arena */) { if (value != NULL) { ptr_ = value; } else { @@ -201,8 +200,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { } // Frees storage (if not on an arena). - inline void Destroy(const ::std::string* default_value, - ::google::protobuf::Arena* arena) { + inline void Destroy(const ::std::string* default_value, Arena* arena) { if (arena == NULL && ptr_ != default_value) { delete ptr_; } @@ -213,7 +211,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // the user) will always be the empty string. Assumes that |default_value| // is an empty string. inline void ClearToEmpty(const ::std::string* default_value, - ::google::protobuf::Arena* /* arena */) { + Arena* /* arena */) { if (ptr_ == default_value) { // Already set to default (which is empty) -- do nothing. } else { @@ -234,7 +232,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { // overhead of heap operations. After this returns, the content (as seen by // the user) will always be equal to |default_value|. inline void ClearToDefault(const ::std::string* default_value, - ::google::protobuf::Arena* /* arena */) { + Arena* /* arena */) { if (ptr_ == default_value) { // Already set to default -- do nothing. } else { @@ -370,8 +368,7 @@ struct PROTOBUF_EXPORT ArenaStringPtr { ::std::string* ptr_; PROTOBUF_NOINLINE - void CreateInstance(::google::protobuf::Arena* arena, - const ::std::string* initial_value) { + void CreateInstance(Arena* arena, const ::std::string* initial_value) { GOOGLE_DCHECK(initial_value != NULL); // uses "new ::std::string" when arena is nullptr ptr_ = Arena::Create< ::std::string >(arena, *initial_value); diff --git a/src/google/protobuf/arenastring_unittest.cc b/src/google/protobuf/arenastring_unittest.cc index c5f89a7007..edb6f6cd61 100644 --- a/src/google/protobuf/arenastring_unittest.cc +++ b/src/google/protobuf/arenastring_unittest.cc @@ -52,85 +52,83 @@ namespace protobuf { using internal::ArenaStringPtr; -static string WrapString(const char* value) { - return value; -} +static std::string WrapString(const char* value) { return value; } // Test ArenaStringPtr with arena == NULL. TEST(ArenaStringPtrTest, ArenaStringPtrOnHeap) { ArenaStringPtr field; - ::std::string default_value = "default"; + std::string default_value = "default"; field.UnsafeSetDefault(&default_value); - EXPECT_EQ(string("default"), field.Get()); + EXPECT_EQ(std::string("default"), field.Get()); field.Set(&default_value, WrapString("Test short"), NULL); - EXPECT_EQ(string("Test short"), field.Get()); + EXPECT_EQ(std::string("Test short"), field.Get()); field.Set(&default_value, WrapString("Test long long long long value"), NULL); - EXPECT_EQ(string("Test long long long long value"), field.Get()); - field.Set(&default_value, string(""), NULL); + EXPECT_EQ(std::string("Test long long long long value"), field.Get()); + field.Set(&default_value, std::string(""), NULL); field.Destroy(&default_value, NULL); ArenaStringPtr field2; field2.UnsafeSetDefault(&default_value); - ::std::string* mut = field2.Mutable(&default_value, NULL); + std::string* mut = field2.Mutable(&default_value, NULL); EXPECT_EQ(mut, field2.Mutable(&default_value, NULL)); EXPECT_EQ(mut, &field2.Get()); EXPECT_NE(&default_value, mut); - EXPECT_EQ(string("default"), *mut); + EXPECT_EQ(std::string("default"), *mut); *mut = "Test long long long long value"; // ensure string allocates storage - EXPECT_EQ(string("Test long long long long value"), field2.Get()); + EXPECT_EQ(std::string("Test long long long long value"), field2.Get()); field2.Destroy(&default_value, NULL); } TEST(ArenaStringPtrTest, ArenaStringPtrOnArena) { Arena arena; ArenaStringPtr field; - ::std::string default_value = "default"; + std::string default_value = "default"; field.UnsafeSetDefault(&default_value); - EXPECT_EQ(string("default"), field.Get()); + EXPECT_EQ(std::string("default"), field.Get()); field.Set(&default_value, WrapString("Test short"), &arena); - EXPECT_EQ(string("Test short"), field.Get()); + EXPECT_EQ(std::string("Test short"), field.Get()); field.Set(&default_value, WrapString("Test long long long long value"), &arena); - EXPECT_EQ(string("Test long long long long value"), field.Get()); - field.Set(&default_value, string(""), &arena); + EXPECT_EQ(std::string("Test long long long long value"), field.Get()); + field.Set(&default_value, std::string(""), &arena); field.Destroy(&default_value, &arena); ArenaStringPtr field2; field2.UnsafeSetDefault(&default_value); - ::std::string* mut = field2.Mutable(&default_value, &arena); + std::string* mut = field2.Mutable(&default_value, &arena); EXPECT_EQ(mut, field2.Mutable(&default_value, &arena)); EXPECT_EQ(mut, &field2.Get()); EXPECT_NE(&default_value, mut); - EXPECT_EQ(string("default"), *mut); + EXPECT_EQ(std::string("default"), *mut); *mut = "Test long long long long value"; // ensure string allocates storage - EXPECT_EQ(string("Test long long long long value"), field2.Get()); + EXPECT_EQ(std::string("Test long long long long value"), field2.Get()); field2.Destroy(&default_value, &arena); } TEST(ArenaStringPtrTest, ArenaStringPtrOnArenaNoSSO) { Arena arena; ArenaStringPtr field; - ::std::string default_value = "default"; + std::string default_value = "default"; field.UnsafeSetDefault(&default_value); - EXPECT_EQ(string("default"), field.Get()); + EXPECT_EQ(std::string("default"), field.Get()); // Avoid triggering the SSO optimization by setting the string to something // larger than the internal buffer. field.Set(&default_value, WrapString("Test long long long long value"), &arena); - EXPECT_EQ(string("Test long long long long value"), field.Get()); - field.Set(&default_value, string(""), &arena); + EXPECT_EQ(std::string("Test long long long long value"), field.Get()); + field.Set(&default_value, std::string(""), &arena); field.Destroy(&default_value, &arena); ArenaStringPtr field2; field2.UnsafeSetDefault(&default_value); - ::std::string* mut = field2.Mutable(&default_value, &arena); + std::string* mut = field2.Mutable(&default_value, &arena); EXPECT_EQ(mut, field2.Mutable(&default_value, &arena)); EXPECT_EQ(mut, &field2.Get()); EXPECT_NE(&default_value, mut); - EXPECT_EQ(string("default"), *mut); + EXPECT_EQ(std::string("default"), *mut); *mut = "Test long long long long value"; // ensure string allocates storage - EXPECT_EQ(string("Test long long long long value"), field2.Get()); + EXPECT_EQ(std::string("Test long long long long value"), field2.Get()); field2.Destroy(&default_value, &arena); } diff --git a/src/google/protobuf/compiler/annotation_test_util.cc b/src/google/protobuf/compiler/annotation_test_util.cc index a0530b9a69..d33f29fb94 100644 --- a/src/google/protobuf/compiler/annotation_test_util.cc +++ b/src/google/protobuf/compiler/annotation_test_util.cc @@ -57,8 +57,9 @@ class DescriptorCapturingGenerator : public CodeGenerator { explicit DescriptorCapturingGenerator(FileDescriptorProto* file) : file_(file) {} - virtual bool Generate(const FileDescriptor* file, const string& parameter, - GeneratorContext* context, string* error) const { + virtual bool Generate(const FileDescriptor* file, + const std::string& parameter, GeneratorContext* context, + std::string* error) const { file->CopyTo(file_); return true; } @@ -68,21 +69,21 @@ class DescriptorCapturingGenerator : public CodeGenerator { }; } // namespace -void AddFile(const string& filename, const string& data) { +void AddFile(const std::string& filename, const std::string& data) { GOOGLE_CHECK_OK(File::SetContents(TestTempDir() + "/" + filename, data, true)); } -bool RunProtoCompiler(const string& filename, - const string& plugin_specific_args, +bool RunProtoCompiler(const std::string& filename, + const std::string& plugin_specific_args, CommandLineInterface* cli, FileDescriptorProto* file) { cli->SetInputsAreProtoPathRelative(true); DescriptorCapturingGenerator capturing_generator(file); cli->RegisterGenerator("--capture_out", &capturing_generator, ""); - string proto_path = "-I" + TestTempDir(); - string capture_out = "--capture_out=" + TestTempDir(); + std::string proto_path = "-I" + TestTempDir(); + std::string capture_out = "--capture_out=" + TestTempDir(); const char* argv[] = {"protoc", proto_path.c_str(), plugin_specific_args.c_str(), capture_out.c_str(), @@ -91,15 +92,15 @@ bool RunProtoCompiler(const string& filename, return cli->Run(5, argv) == 0; } -bool DecodeMetadata(const string& path, GeneratedCodeInfo* info) { - string data; +bool DecodeMetadata(const std::string& path, GeneratedCodeInfo* info) { + std::string data; GOOGLE_CHECK_OK(File::GetContents(path, &data, true)); io::ArrayInputStream input(data.data(), data.size()); return info->ParseFromZeroCopyStream(&input); } void FindAnnotationsOnPath( - const GeneratedCodeInfo& info, const string& source_file, + const GeneratedCodeInfo& info, const std::string& source_file, const std::vector& path, std::vector* annotations) { for (int i = 0; i < info.annotation_size(); ++i) { @@ -121,7 +122,7 @@ void FindAnnotationsOnPath( } const GeneratedCodeInfo::Annotation* FindAnnotationOnPath( - const GeneratedCodeInfo& info, const string& source_file, + const GeneratedCodeInfo& info, const std::string& source_file, const std::vector& path) { std::vector annotations; FindAnnotationsOnPath(info, source_file, path, &annotations); @@ -132,9 +133,9 @@ const GeneratedCodeInfo::Annotation* FindAnnotationOnPath( } bool AtLeastOneAnnotationMatchesSubstring( - const string& file_content, + const std::string& file_content, const std::vector& annotations, - const string& expected_text) { + const std::string& expected_text) { for (std::vector::const_iterator i = annotations.begin(), e = annotations.end(); @@ -152,9 +153,9 @@ bool AtLeastOneAnnotationMatchesSubstring( return false; } -bool AnnotationMatchesSubstring(const string& file_content, +bool AnnotationMatchesSubstring(const std::string& file_content, const GeneratedCodeInfo::Annotation* annotation, - const string& expected_text) { + const std::string& expected_text) { std::vector annotations; annotations.push_back(annotation); return AtLeastOneAnnotationMatchesSubstring(file_content, annotations, diff --git a/src/google/protobuf/compiler/annotation_test_util.h b/src/google/protobuf/compiler/annotation_test_util.h index fbd3dec5f3..7c1319182e 100644 --- a/src/google/protobuf/compiler/annotation_test_util.h +++ b/src/google/protobuf/compiler/annotation_test_util.h @@ -52,7 +52,8 @@ struct ExpectedOutput { std::string file_path; std::string file_content; GeneratedCodeInfo file_info; - explicit ExpectedOutput(const std::string& file_path) : file_path(file_path) {} + explicit ExpectedOutput(const std::string& file_path) + : file_path(file_path) {} }; // Creates a file with name `filename` and content `data` in temp test diff --git a/src/google/protobuf/compiler/code_generator.cc b/src/google/protobuf/compiler/code_generator.cc index aaabd9142d..3319d5c503 100644 --- a/src/google/protobuf/compiler/code_generator.cc +++ b/src/google/protobuf/compiler/code_generator.cc @@ -46,11 +46,10 @@ namespace compiler { CodeGenerator::~CodeGenerator() {} -bool CodeGenerator::GenerateAll( - const std::vector& files, - const string& parameter, - GeneratorContext* generator_context, - string* error) const { +bool CodeGenerator::GenerateAll(const std::vector& files, + const std::string& parameter, + GeneratorContext* generator_context, + std::string* error) const { // Default implemenation is just to call the per file method, and prefix any // error string with the file to provide context. bool succeeded = true; @@ -74,13 +73,13 @@ bool CodeGenerator::GenerateAll( GeneratorContext::~GeneratorContext() {} -io::ZeroCopyOutputStream* -GeneratorContext::OpenForAppend(const string& filename) { +io::ZeroCopyOutputStream* GeneratorContext::OpenForAppend( + const std::string& filename) { return NULL; } io::ZeroCopyOutputStream* GeneratorContext::OpenForInsert( - const string& filename, const string& insertion_point) { + const std::string& filename, const std::string& insertion_point) { GOOGLE_LOG(FATAL) << "This GeneratorContext does not support insertion."; return NULL; // make compiler happy } @@ -98,14 +97,15 @@ void GeneratorContext::GetCompilerVersion(Version* version) const { } // Parses a set of comma-delimited name/value pairs. -void ParseGeneratorParameter(const string& text, - std::vector >* output) { - std::vector parts = Split(text, ",", true); +void ParseGeneratorParameter( + const std::string& text, + std::vector >* output) { + std::vector parts = Split(text, ",", true); for (int i = 0; i < parts.size(); i++) { - string::size_type equals_pos = parts[i].find_first_of('='); - std::pair value; - if (equals_pos == string::npos) { + std::string::size_type equals_pos = parts[i].find_first_of('='); + std::pair value; + if (equals_pos == std::string::npos) { value.first = parts[i]; value.second = ""; } else { diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index 6bae201437..126c433b64 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -116,7 +116,7 @@ static const char* kDefaultDirectDependenciesViolationMsg = // Returns true if the text looks like a Windows-style absolute path, starting // with a drive letter. Example: "C:\foo". TODO(kenton): Share this with // copy in importer.cc? -static bool IsWindowsAbsolutePath(const string& text) { +static bool IsWindowsAbsolutePath(const std::string& text) { #if defined(_WIN32) || defined(__CYGWIN__) return text.size() >= 3 && text[1] == ':' && isalpha(text[0]) && @@ -147,13 +147,13 @@ void SetFdToBinaryMode(int fd) { // (Text and binary are the same on non-Windows platforms.) } -void AddTrailingSlash(string* path) { +void AddTrailingSlash(std::string* path) { if (!path->empty() && path->at(path->size() - 1) != '/') { path->push_back('/'); } } -bool VerifyDirectoryExists(const string& path) { +bool VerifyDirectoryExists(const std::string& path) { if (path.empty()) return true; if (access(path.c_str(), F_OK) == -1) { @@ -168,12 +168,13 @@ bool VerifyDirectoryExists(const string& path) { // parent if necessary, and so on. The full file name is actually // (prefix + filename), but we assume |prefix| already exists and only create // directories listed in |filename|. -bool TryCreateParentDirectory(const string& prefix, const string& filename) { +bool TryCreateParentDirectory(const std::string& prefix, + const std::string& filename) { // Recursively create parent directories to the output file. // On Windows, both '/' and '\' are valid path separators. - std::vector parts = + std::vector parts = Split(filename, "/\\", true); - string path_so_far = prefix; + std::string path_so_far = prefix; for (int i = 0; i < parts.size() - 1; i++) { path_so_far += parts[i]; if (mkdir(path_so_far.c_str(), 0777) != 0) { @@ -190,7 +191,7 @@ bool TryCreateParentDirectory(const string& prefix, const string& filename) { } // Get the absolute path of this protoc binary. -bool GetProtocAbsolutePath(string* path) { +bool GetProtocAbsolutePath(std::string* path) { #ifdef _WIN32 char buffer[MAX_PATH]; int len = GetModuleFileNameA(NULL, buffer, MAX_PATH); @@ -218,51 +219,55 @@ bool GetProtocAbsolutePath(string* path) { // Whether a path is where google/protobuf/descriptor.proto and other well-known // type protos are installed. -bool IsInstalledProtoPath(const string& path) { +bool IsInstalledProtoPath(const std::string& path) { // Checking the descriptor.proto file should be good enough. - string file_path = path + "/google/protobuf/descriptor.proto"; + std::string file_path = path + "/google/protobuf/descriptor.proto"; return access(file_path.c_str(), F_OK) != -1; } // Add the paths where google/protobuf/descriptor.proto and other well-known // type protos are installed. -void AddDefaultProtoPaths(std::vector >* paths) { +void AddDefaultProtoPaths( + std::vector >* paths) { // TODO(xiaofeng): The code currently only checks relative paths of where // the protoc binary is installed. We probably should make it handle more // cases than that. - string path; + std::string path; if (!GetProtocAbsolutePath(&path)) { return; } // Strip the binary name. size_t pos = path.find_last_of("/\\"); - if (pos == string::npos || pos == 0) { + if (pos == std::string::npos || pos == 0) { return; } path = path.substr(0, pos); // Check the binary's directory. if (IsInstalledProtoPath(path)) { - paths->push_back(std::pair("", path)); + paths->push_back(std::pair("", path)); return; } // Check if there is an include subdirectory. if (IsInstalledProtoPath(path + "/include")) { - paths->push_back(std::pair("", path + "/include")); + paths->push_back( + std::pair("", path + "/include")); return; } // Check if the upper level directory has an "include" subdirectory. pos = path.find_last_of("/\\"); - if (pos == string::npos || pos == 0) { + if (pos == std::string::npos || pos == 0) { return; } path = path.substr(0, pos); if (IsInstalledProtoPath(path + "/include")) { - paths->push_back(std::pair("", path + "/include")); + paths->push_back( + std::pair("", path + "/include")); return; } } -string PluginName(const string& plugin_prefix, const string& directive) { +string PluginName(const std::string& plugin_prefix, + const std::string& directive) { // Assuming the directive starts with "--" and ends with "_out" or "_opt", // strip the "--" and "_out/_opt" and add the plugin prefix. return plugin_prefix + "gen-" + directive.substr(2, directive.size() - 6); @@ -281,53 +286,47 @@ class CommandLineInterface::ErrorPrinter ~ErrorPrinter() {} // implements MultiFileErrorCollector ------------------------------ - void AddError(const string& filename, int line, int column, - const string& message) { + void AddError(const std::string& filename, int line, int column, + const std::string& message) { found_errors_ = true; AddErrorOrWarning(filename, line, column, message, "error", std::cerr); } - void AddWarning(const string& filename, int line, int column, - const string& message) { + void AddWarning(const std::string& filename, int line, int column, + const std::string& message) { AddErrorOrWarning(filename, line, column, message, "warning", std::clog); } // implements io::ErrorCollector ----------------------------------- - void AddError(int line, int column, const string& message) { + void AddError(int line, int column, const std::string& message) { AddError("input", line, column, message); } - void AddWarning(int line, int column, const string& message) { + void AddWarning(int line, int column, const std::string& message) { AddErrorOrWarning("input", line, column, message, "warning", std::clog); } // implements DescriptorPool::ErrorCollector------------------------- - void AddError( - const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message) { + void AddError(const std::string& filename, const std::string& element_name, + const Message* descriptor, ErrorLocation location, + const std::string& message) { AddErrorOrWarning(filename, -1, -1, message, "error", std::cerr); } - void AddWarning( - const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message) { + void AddWarning(const std::string& filename, const std::string& element_name, + const Message* descriptor, ErrorLocation location, + const std::string& message) { AddErrorOrWarning(filename, -1, -1, message, "warning", std::clog); } bool FoundErrors() const { return found_errors_; } private: - void AddErrorOrWarning(const string& filename, int line, int column, - const string& message, const string& type, + void AddErrorOrWarning(const std::string& filename, int line, int column, + const std::string& message, const std::string& type, std::ostream& out) { // Print full path when running under MSVS - string dfile; + std::string dfile; if (format_ == CommandLineInterface::ERROR_FORMAT_MSVS && tree_ != NULL && tree_->VirtualFileToDiskFile(filename, &dfile)) { @@ -374,24 +373,24 @@ class CommandLineInterface::GeneratorContextImpl : public GeneratorContext { // Write all files in the directory to disk at the given output location, // which must end in a '/'. - bool WriteAllToDisk(const string& prefix); + bool WriteAllToDisk(const std::string& prefix); // Write the contents of this directory to a ZIP-format archive with the // given name. - bool WriteAllToZip(const string& filename); + bool WriteAllToZip(const std::string& filename); // Add a boilerplate META-INF/MANIFEST.MF file as required by the Java JAR // format, unless one has already been written. void AddJarManifest(); // Get name of all output files. - void GetOutputFilenames(std::vector* output_filenames); + void GetOutputFilenames(std::vector* output_filenames); // implements GeneratorContext -------------------------------------- - io::ZeroCopyOutputStream* Open(const string& filename); - io::ZeroCopyOutputStream* OpenForAppend(const string& filename); - io::ZeroCopyOutputStream* OpenForInsert( - const string& filename, const string& insertion_point); + io::ZeroCopyOutputStream* Open(const std::string& filename); + io::ZeroCopyOutputStream* OpenForAppend(const std::string& filename); + io::ZeroCopyOutputStream* OpenForInsert(const std::string& filename, + const std::string& insertion_point); void ListParsedFiles(std::vector* output) { *output = parsed_files_; } @@ -401,7 +400,7 @@ class CommandLineInterface::GeneratorContextImpl : public GeneratorContext { // map instead of unordered_map so that files are written in order (good when // writing zips). - std::map files_; + std::map files_; const std::vector& parsed_files_; bool had_error_; }; @@ -409,10 +408,11 @@ class CommandLineInterface::GeneratorContextImpl : public GeneratorContext { class CommandLineInterface::MemoryOutputStream : public io::ZeroCopyOutputStream { public: - MemoryOutputStream(GeneratorContextImpl* directory, const string& filename, - bool append_mode); - MemoryOutputStream(GeneratorContextImpl* directory, const string& filename, - const string& insertion_point); + MemoryOutputStream(GeneratorContextImpl* directory, + const std::string& filename, bool append_mode); + MemoryOutputStream(GeneratorContextImpl* directory, + const std::string& filename, + const std::string& insertion_point); virtual ~MemoryOutputStream(); // implements ZeroCopyOutputStream --------------------------------- @@ -430,11 +430,11 @@ class CommandLineInterface::MemoryOutputStream // Where to insert the string when it's done. GeneratorContextImpl* directory_; - string filename_; - string insertion_point_; + std::string filename_; + std::string insertion_point_; // The string we're building. - string data_; + std::string data_; // Whether we should append the output stream to the existing file. bool append_mode_; @@ -455,7 +455,7 @@ CommandLineInterface::GeneratorContextImpl::~GeneratorContextImpl() { } bool CommandLineInterface::GeneratorContextImpl::WriteAllToDisk( - const string& prefix) { + const std::string& prefix) { if (had_error_) { return false; } @@ -464,16 +464,17 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToDisk( return false; } - for (std::map::const_iterator iter = files_.begin(); + for (std::map::const_iterator iter = + files_.begin(); iter != files_.end(); ++iter) { - const string& relative_filename = iter->first; + const std::string& relative_filename = iter->first; const char* data = iter->second->data(); int size = iter->second->size(); if (!TryCreateParentDirectory(prefix, relative_filename)) { return false; } - string filename = prefix + relative_filename; + std::string filename = prefix + relative_filename; // Create the output file. int file_descriptor; @@ -530,7 +531,7 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToDisk( } bool CommandLineInterface::GeneratorContextImpl::WriteAllToZip( - const string& filename) { + const std::string& filename) { if (had_error_) { return false; } @@ -552,7 +553,8 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToZip( io::FileOutputStream stream(file_descriptor); ZipWriter zip_writer(&stream); - for (std::map::const_iterator iter = files_.begin(); + for (std::map::const_iterator iter = + files_.begin(); iter != files_.end(); ++iter) { zip_writer.Write(iter->first, *iter->second); } @@ -571,9 +573,9 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToZip( } void CommandLineInterface::GeneratorContextImpl::AddJarManifest() { - string** map_slot = &files_["META-INF/MANIFEST.MF"]; + std::string** map_slot = &files_["META-INF/MANIFEST.MF"]; if (*map_slot == NULL) { - *map_slot = new string( + *map_slot = new std::string( "Manifest-Version: 1.0\n" "Created-By: 1.6.0 (protoc)\n" "\n"); @@ -581,58 +583,57 @@ void CommandLineInterface::GeneratorContextImpl::AddJarManifest() { } void CommandLineInterface::GeneratorContextImpl::GetOutputFilenames( - std::vector* output_filenames) { - for (std::map::iterator iter = files_.begin(); + std::vector* output_filenames) { + for (std::map::iterator iter = files_.begin(); iter != files_.end(); ++iter) { output_filenames->push_back(iter->first); } } io::ZeroCopyOutputStream* CommandLineInterface::GeneratorContextImpl::Open( - const string& filename) { + const std::string& filename) { return new MemoryOutputStream(this, filename, false); } io::ZeroCopyOutputStream* CommandLineInterface::GeneratorContextImpl::OpenForAppend( - const string& filename) { + const std::string& filename) { return new MemoryOutputStream(this, filename, true); } io::ZeroCopyOutputStream* CommandLineInterface::GeneratorContextImpl::OpenForInsert( - const string& filename, const string& insertion_point) { + const std::string& filename, const std::string& insertion_point) { return new MemoryOutputStream(this, filename, insertion_point); } // ------------------------------------------------------------------- CommandLineInterface::MemoryOutputStream::MemoryOutputStream( - GeneratorContextImpl* directory, const string& filename, bool append_mode) + GeneratorContextImpl* directory, const std::string& filename, + bool append_mode) : directory_(directory), filename_(filename), append_mode_(append_mode), - inner_(new io::StringOutputStream(&data_)) { -} + inner_(new io::StringOutputStream(&data_)) {} CommandLineInterface::MemoryOutputStream::MemoryOutputStream( - GeneratorContextImpl* directory, const string& filename, - const string& insertion_point) + GeneratorContextImpl* directory, const std::string& filename, + const std::string& insertion_point) : directory_(directory), filename_(filename), insertion_point_(insertion_point), - inner_(new io::StringOutputStream(&data_)) { -} + inner_(new io::StringOutputStream(&data_)) {} void CommandLineInterface::MemoryOutputStream::UpdateMetadata( size_t insertion_offset, size_t insertion_length) { - std::map::iterator meta_file = + std::map::iterator meta_file = directory_->files_.find(filename_ + ".meta"); if (meta_file == directory_->files_.end() || !meta_file->second) { // No metadata was recorded for this file. return; } - string* encoded_data = meta_file->second; + std::string* encoded_data = meta_file->second; GeneratedCodeInfo metadata; bool is_text_format = false; if (!metadata.ParseFromString(*encoded_data)) { @@ -667,7 +668,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { inner_.reset(); // Insert into the directory. - string** map_slot = &directory_->files_[filename_]; + std::string** map_slot = &directory_->files_[filename_]; if (insertion_point_.empty()) { // This was just a regular Open(). @@ -682,7 +683,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { return; } - *map_slot = new string; + *map_slot = new std::string; (*map_slot)->swap(data_); } else { // This was an OpenForInsert(). @@ -700,14 +701,14 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { directory_->had_error_ = true; return; } - string* target = *map_slot; + std::string* target = *map_slot; // Find the insertion point. - string magic_string = strings::Substitute( - "@@protoc_insertion_point($0)", insertion_point_); - string::size_type pos = target->find(magic_string); + std::string magic_string = + strings::Substitute("@@protoc_insertion_point($0)", insertion_point_); + std::string::size_type pos = target->find(magic_string); - if (pos == string::npos) { + if (pos == std::string::npos) { std::cerr << filename_ << ": insertion point \"" << insertion_point_ << "\" not found." << std::endl; directory_->had_error_ = true; @@ -724,7 +725,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { // intentional because it means that multiple insertions at the same point // will end up in the expected order in the final output. pos = target->find_last_of('\n', pos); - if (pos == string::npos) { + if (pos == std::string::npos) { // Insertion point is on the first line. pos = 0; } else { @@ -734,7 +735,8 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { } // Extract indent. - string indent_(*target, pos, target->find_first_not_of(" \t", pos) - pos); + std::string indent_(*target, pos, + target->find_first_not_of(" \t", pos) - pos); if (indent_.empty()) { // No indent. This makes things easier. @@ -752,7 +754,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { UpdateMetadata(pos, data_.size() + indent_size); // Now copy in the data. - string::size_type data_pos = 0; + std::string::size_type data_pos = 0; char* target_ptr = ::google::protobuf::string_as_array(target) + pos; while (data_pos < data_.size()) { // Copy indent. @@ -762,7 +764,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() { // Copy line from data_. // We already guaranteed that data_ ends with a newline (above), so this // search can't fail. - string::size_type line_length = + std::string::size_type line_length = data_.find_first_of('\n', data_pos) + 1 - data_pos; memcpy(target_ptr, data_.data() + data_pos, line_length); target_ptr += line_length; @@ -795,9 +797,9 @@ CommandLineInterface::CommandLineInterface() disallow_services_(false) {} CommandLineInterface::~CommandLineInterface() {} -void CommandLineInterface::RegisterGenerator(const string& flag_name, +void CommandLineInterface::RegisterGenerator(const std::string& flag_name, CodeGenerator* generator, - const string& help_text) { + const std::string& help_text) { GeneratorInfo info; info.flag_name = flag_name; info.generator = generator; @@ -805,10 +807,9 @@ void CommandLineInterface::RegisterGenerator(const string& flag_name, generators_by_flag_name_[flag_name] = info; } -void CommandLineInterface::RegisterGenerator(const string& flag_name, - const string& option_flag_name, - CodeGenerator* generator, - const string& help_text) { +void CommandLineInterface::RegisterGenerator( + const std::string& flag_name, const std::string& option_flag_name, + CodeGenerator* generator, const std::string& help_text) { GeneratorInfo info; info.flag_name = flag_name; info.option_flag_name = option_flag_name; @@ -818,7 +819,7 @@ void CommandLineInterface::RegisterGenerator(const string& flag_name, generators_by_option_name_[option_flag_name] = info; } -void CommandLineInterface::AllowPlugins(const string& exe_name_prefix) { +void CommandLineInterface::AllowPlugins(const std::string& exe_name_prefix) { plugin_prefix_ = exe_name_prefix; } @@ -893,7 +894,7 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { // Generate output. if (mode_ == MODE_COMPILE) { for (int i = 0; i < output_directives_.size(); i++) { - string output_location = output_directives_[i].output_location; + std::string output_location = output_directives_[i].output_location; if (!HasSuffixString(output_location, ".zip") && !HasSuffixString(output_location, ".jar")) { AddTrailingSlash(&output_location); @@ -915,7 +916,7 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { // Write all output to disk. for (GeneratorContextMap::iterator iter = output_directories.begin(); iter != output_directories.end(); ++iter) { - const string& location = iter->first; + const std::string& location = iter->first; GeneratorContextImpl* directory = iter->second; if (HasSuffixString(location, "/")) { if (!directory->WriteAllToDisk(location)) { @@ -1145,7 +1146,7 @@ void CommandLineInterface::Clear() { } bool CommandLineInterface::MakeProtoProtoPathRelative( - DiskSourceTree* source_tree, string* proto, + DiskSourceTree* source_tree, std::string* proto, DescriptorDatabase* fallback_database) { // If it's in the fallback db, don't report non-existent file errors. FileDescriptorProto fallback_file; @@ -1156,7 +1157,7 @@ bool CommandLineInterface::MakeProtoProtoPathRelative( // If the input file path is not a physical file path, it must be a virtual // path. if (access(proto->c_str(), F_OK) < 0) { - string disk_file; + std::string disk_file; if (source_tree->VirtualFileToDiskFile(*proto, &disk_file) || in_fallback_database) { return true; @@ -1166,7 +1167,7 @@ bool CommandLineInterface::MakeProtoProtoPathRelative( } } - string virtual_file, shadowing_disk_file; + std::string virtual_file, shadowing_disk_file; switch (source_tree->DiskFileToVirtualFile( *proto, &virtual_file, &shadowing_disk_file)) { case DiskSourceTree::SUCCESS: @@ -1188,7 +1189,7 @@ bool CommandLineInterface::MakeProtoProtoPathRelative( return false; case DiskSourceTree::NO_MAPPING: { // Try to interpret the path as a virtual path. - string disk_file; + std::string disk_file; if (source_tree->VirtualFileToDiskFile(*proto, &disk_file) || in_fallback_database) { return true; @@ -1225,15 +1226,15 @@ bool CommandLineInterface::MakeInputsBeProtoPathRelative( } -bool CommandLineInterface::ExpandArgumentFile(const string& file, - std::vector* arguments) { +bool CommandLineInterface::ExpandArgumentFile( + const std::string& file, std::vector* arguments) { // The argument file is searched in the working directory only. We don't // use the proto import path here. std::ifstream file_stream(file.c_str()); if (!file_stream.is_open()) { return false; } - string argument; + std::string argument; // We don't support any kind of shell expansion right now. while (std::getline(file_stream, argument)) { arguments->push_back(argument); @@ -1245,7 +1246,7 @@ CommandLineInterface::ParseArgumentStatus CommandLineInterface::ParseArguments(int argc, const char* const argv[]) { executable_name_ = argv[0]; - std::vector arguments; + std::vector arguments; for (int i = 1; i < argc; ++i) { if (argv[i][0] == '@') { if (!ExpandArgumentFile(argv[i] + 1, &arguments)) { @@ -1266,7 +1267,7 @@ CommandLineInterface::ParseArguments(int argc, const char* const argv[]) { // Iterate through all arguments and parse them. for (int i = 0; i < arguments.size(); ++i) { - string name, value; + std::string name, value; if (ParseArgument(arguments[i].c_str(), &name, &value)) { // Returned true => Use the next argument as the flag value. @@ -1290,7 +1291,8 @@ CommandLineInterface::ParseArguments(int argc, const char* const argv[]) { // Make sure each plugin option has a matching plugin output. bool foundUnknownPluginOption = false; - for (std::map::const_iterator i = plugin_parameters_.begin(); + for (std::map::const_iterator i = + plugin_parameters_.begin(); i != plugin_parameters_.end(); ++i) { if (plugins_.find(i->first) != plugins_.end()) { continue; @@ -1299,7 +1301,7 @@ CommandLineInterface::ParseArguments(int argc, const char* const argv[]) { for (std::vector::const_iterator j = output_directives_.begin(); j != output_directives_.end(); ++j) { if (j->generator == NULL) { - string plugin_name = PluginName(plugin_prefix_ , j->name); + std::string plugin_name = PluginName(plugin_prefix_, j->name); if (plugin_name == i->first) { foundImplicitPlugin = true; break; @@ -1324,7 +1326,7 @@ CommandLineInterface::ParseArguments(int argc, const char* const argv[]) { // Don't use make_pair as the old/default standard library on Solaris // doesn't support it without explicit template parameters, which are // incompatible with C++0x's make_pair. - proto_path_.push_back(std::pair("", ".")); + proto_path_.push_back(std::pair("", ".")); } // Check some error cases. @@ -1365,8 +1367,8 @@ CommandLineInterface::ParseArguments(int argc, const char* const argv[]) { return PARSE_ARGUMENT_DONE_AND_CONTINUE; } -bool CommandLineInterface::ParseArgument(const char* arg, - string* name, string* value) { +bool CommandLineInterface::ParseArgument(const char* arg, std::string* name, + std::string* value) { bool parsed_value = false; if (arg[0] != '-') { @@ -1379,7 +1381,7 @@ bool CommandLineInterface::ParseArgument(const char* arg, // value. const char* equals_pos = strchr(arg, '='); if (equals_pos != NULL) { - *name = string(arg, equals_pos - arg); + *name = std::string(arg, equals_pos - arg); *value = equals_pos + 1; parsed_value = true; } else { @@ -1395,7 +1397,7 @@ bool CommandLineInterface::ParseArgument(const char* arg, *value = arg; parsed_value = true; } else { - *name = string(arg, 2); + *name = std::string(arg, 2); *value = arg + 2; parsed_value = !value->empty(); } @@ -1427,8 +1429,8 @@ bool CommandLineInterface::ParseArgument(const char* arg, } CommandLineInterface::ParseArgumentStatus -CommandLineInterface::InterpretArgument(const string& name, - const string& value) { +CommandLineInterface::InterpretArgument(const std::string& name, + const std::string& value) { if (name.empty()) { // Not a flag. Just a filename. if (value.empty()) { @@ -1447,16 +1449,16 @@ CommandLineInterface::InterpretArgument(const string& name, // Java's -classpath (and some other languages) delimits path components // with colons. Let's accept that syntax too just to make things more // intuitive. - std::vector parts = Split( + std::vector parts = Split( value, CommandLineInterface::kPathSeparator, true); for (int i = 0; i < parts.size(); i++) { - string virtual_path; - string disk_path; + std::string virtual_path; + std::string disk_path; - string::size_type equals_pos = parts[i].find_first_of('='); - if (equals_pos == string::npos) { + std::string::size_type equals_pos = parts[i].find_first_of('='); + if (equals_pos == std::string::npos) { virtual_path = ""; disk_path = parts[i]; } else { @@ -1486,7 +1488,8 @@ CommandLineInterface::InterpretArgument(const string& name, // Don't use make_pair as the old/default standard library on Solaris // doesn't support it without explicit template parameters, which are // incompatible with C++0x's make_pair. - proto_path_.push_back(std::pair(virtual_path, disk_path)); + proto_path_.push_back( + std::pair(virtual_path, disk_path)); } } else if (name == "--direct_dependencies") { @@ -1499,7 +1502,8 @@ CommandLineInterface::InterpretArgument(const string& name, } direct_dependencies_explicitly_set_ = true; - std::vector direct = Split(value, ":", true); + std::vector direct = + Split(value, ":", true); GOOGLE_DCHECK(direct_dependencies_.empty()); direct_dependencies_.insert(direct.begin(), direct.end()); @@ -1585,7 +1589,7 @@ CommandLineInterface::InterpretArgument(const string& name, std::cout << version_info_ << std::endl; } std::cout << "libprotoc " - << protobuf::internal::VersionString(PROTOBUF_VERSION) + << internal::VersionString(PROTOBUF_VERSION) << std::endl; return PARSE_ARGUMENT_DONE_AND_EXIT; // Exit without running compiler. @@ -1638,14 +1642,14 @@ CommandLineInterface::InterpretArgument(const string& name, return PARSE_ARGUMENT_FAIL; } - string plugin_name; - string path; + std::string plugin_name; + std::string path; - string::size_type equals_pos = value.find_first_of('='); - if (equals_pos == string::npos) { + std::string::size_type equals_pos = value.find_first_of('='); + if (equals_pos == std::string::npos) { // Use the basename of the file. - string::size_type slash_pos = value.find_last_of('/'); - if (slash_pos == string::npos) { + std::string::size_type slash_pos = value.find_last_of('/'); + if (slash_pos == std::string::npos) { plugin_name = value; } else { plugin_name = value.substr(slash_pos + 1); @@ -1682,13 +1686,14 @@ CommandLineInterface::InterpretArgument(const string& name, // Check if it's a generator option flag. generator_info = FindOrNull(generators_by_option_name_, name); if (generator_info != NULL) { - string* parameters = &generator_parameters_[generator_info->flag_name]; + std::string* parameters = + &generator_parameters_[generator_info->flag_name]; if (!parameters->empty()) { parameters->append(","); } parameters->append(value); } else if (HasPrefixString(name, "--") && HasSuffixString(name, "_opt")) { - string* parameters = + std::string* parameters = &plugin_parameters_[PluginName(plugin_prefix_, name)]; if (!parameters->empty()) { parameters->append(","); @@ -1717,8 +1722,8 @@ CommandLineInterface::InterpretArgument(const string& name, // Split value at ':' to separate the generator parameter from the // filename. However, avoid doing this if the colon is part of a valid // Windows-style absolute path. - string::size_type colon_pos = value.find_first_of(':'); - if (colon_pos == string::npos || IsWindowsAbsolutePath(value)) { + std::string::size_type colon_pos = value.find_first_of(':'); + if (colon_pos == std::string::npos || IsWindowsAbsolutePath(value)) { directive.output_location = value; } else { directive.parameter = value.substr(0, colon_pos); @@ -1811,7 +1816,8 @@ void CommandLineInterface::PrintHelpText() { // but fixing this nicely (e.g. splitting on spaces) is probably more // trouble than it's worth. std::cout << " " << iter->first << "=OUT_DIR " - << string(19 - iter->first.size(), ' ') // Spaces for alignment. + << std::string(19 - iter->first.size(), + ' ') // Spaces for alignment. << iter->second.help_text << std::endl; } std::cout << @@ -1835,15 +1841,15 @@ bool CommandLineInterface::GenerateOutput( const OutputDirective& output_directive, GeneratorContext* generator_context) { // Call the generator. - string error; + std::string error; if (output_directive.generator == NULL) { // This is a plugin. GOOGLE_CHECK(HasPrefixString(output_directive.name, "--") && HasSuffixString(output_directive.name, "_out")) << "Bad name for plugin generator: " << output_directive.name; - string plugin_name = PluginName(plugin_prefix_ , output_directive.name); - string parameters = output_directive.parameter; + std::string plugin_name = PluginName(plugin_prefix_, output_directive.name); + std::string parameters = output_directive.parameter; if (!plugin_parameters_[plugin_name].empty()) { if (!parameters.empty()) { parameters.append(","); @@ -1858,7 +1864,7 @@ bool CommandLineInterface::GenerateOutput( } } else { // Regular generator. - string parameters = output_directive.parameter; + std::string parameters = output_directive.parameter; if (!generator_parameters_[output_directive.name].empty()) { if (!parameters.empty()) { parameters.append(","); @@ -1891,15 +1897,15 @@ bool CommandLineInterface::GenerateDependencyManifestFile( file_set.mutable_file()); } - std::vector output_filenames; + std::vector output_filenames; for (GeneratorContextMap::const_iterator iter = output_directories.begin(); iter != output_directories.end(); ++iter) { - const string& location = iter->first; + const std::string& location = iter->first; GeneratorContextImpl* directory = iter->second; - std::vector relative_output_filenames; + std::vector relative_output_filenames; directory->GetOutputFilenames(&relative_output_filenames); for (int i = 0; i < relative_output_filenames.size(); i++) { - string output_filename = location + relative_output_filenames[i]; + std::string output_filename = location + relative_output_filenames[i]; if (output_filename.compare(0, 2, "./") == 0) { output_filename = output_filename.substr(2); } @@ -1932,8 +1938,8 @@ bool CommandLineInterface::GenerateDependencyManifestFile( for (int i = 0; i < file_set.file_size(); i++) { const FileDescriptorProto& file = file_set.file(i); - const string& virtual_file = file.name(); - string disk_file; + const std::string& virtual_file = file.name(); + std::string disk_file; if (source_tree && source_tree->VirtualFileToDiskFile(virtual_file, &disk_file)) { printer.Print(" $disk_file$", "disk_file", disk_file); @@ -1950,13 +1956,11 @@ bool CommandLineInterface::GenerateDependencyManifestFile( bool CommandLineInterface::GeneratePluginOutput( const std::vector& parsed_files, - const string& plugin_name, - const string& parameter, - GeneratorContext* generator_context, - string* error) { + const std::string& plugin_name, const std::string& parameter, + GeneratorContext* generator_context, std::string* error) { CodeGeneratorRequest request; CodeGeneratorResponse response; - string processed_parameter = parameter; + std::string processed_parameter = parameter; // Build the request. @@ -1990,7 +1994,7 @@ bool CommandLineInterface::GeneratePluginOutput( subprocess.Start(plugin_name, Subprocess::SEARCH_PATH); } - string communicate_error; + std::string communicate_error; if (!subprocess.Communicate(request, &response, &communicate_error)) { *error = strings::Substitute("$0: $1", plugin_name, communicate_error); return false; @@ -2003,7 +2007,7 @@ bool CommandLineInterface::GeneratePluginOutput( const CodeGeneratorResponse::File& output_file = response.file(i); if (!output_file.insertion_point().empty()) { - string filename = output_file.name(); + std::string filename = output_file.name(); // Open a file for insert. // We reset current_output to NULL first so that the old file is closed // before the new one is opened. @@ -2257,9 +2261,9 @@ void GatherOccupiedFieldRanges( // Utility function for PrintFreeFieldNumbers. // Actually prints the formatted free field numbers for given message name and // occupied ranges. -void FormatFreeFieldNumbers(const string& name, +void FormatFreeFieldNumbers(const std::string& name, const std::set& ranges) { - string output; + std::string output; StringAppendF(&output, "%-35s free:", name.c_str()); int next_free_number = 1; for (std::set::const_iterator i = ranges.begin(); diff --git a/src/google/protobuf/compiler/command_line_interface.h b/src/google/protobuf/compiler/command_line_interface.h index 48455e6ff1..520585ca29 100644 --- a/src/google/protobuf/compiler/command_line_interface.h +++ b/src/google/protobuf/compiler/command_line_interface.h @@ -128,8 +128,7 @@ class PROTOC_EXPORT CommandLineInterface { // protoc --foo_out=enable_bar:outdir // The text before the colon is passed to CodeGenerator::Generate() as the // "parameter". - void RegisterGenerator(const std::string& flag_name, - CodeGenerator* generator, + void RegisterGenerator(const std::string& flag_name, CodeGenerator* generator, const std::string& help_text); // Register a code generator for a language. @@ -199,9 +198,7 @@ class PROTOC_EXPORT CommandLineInterface { // Provides some text which will be printed when the --version flag is // used. The version of libprotoc will also be printed on the next line // after this text. - void SetVersionInfo(const std::string& text) { - version_info_ = text; - } + void SetVersionInfo(const std::string& text) { version_info_ = text; } private: @@ -210,14 +207,16 @@ class PROTOC_EXPORT CommandLineInterface { class ErrorPrinter; class GeneratorContextImpl; class MemoryOutputStream; - typedef std::unordered_map GeneratorContextMap; + typedef std::unordered_map + GeneratorContextMap; // Clear state from previous Run(). void Clear(); // Remaps the proto file so that it is relative to one of the directories // in proto_path_. Returns false if an error occurred. - bool MakeProtoProtoPathRelative(DiskSourceTree* source_tree, std::string* proto, + bool MakeProtoProtoPathRelative(DiskSourceTree* source_tree, + std::string* proto, DescriptorDatabase* fallback_database); // Remaps each file in input_files_ so that it is relative to one of the @@ -238,7 +237,8 @@ class PROTOC_EXPORT CommandLineInterface { // Read an argument file and append the file's content to the list of // arguments. Return false if the file cannot be read. - bool ExpandArgumentFile(const std::string& file, std::vector* arguments); + bool ExpandArgumentFile(const std::string& file, + std::vector* arguments); // Parses a command-line argument into a name/value pair. Returns // true if the next argument in the argv should be used as the value, @@ -388,7 +388,7 @@ class PROTOC_EXPORT CommandLineInterface { ErrorFormat error_format_; std::vector > - proto_path_; // Search path for proto files. + proto_path_; // Search path for proto files. std::vector input_files_; // Names of the input proto files. // Names of proto files which are allowed to be imported. Used by build @@ -403,7 +403,7 @@ class PROTOC_EXPORT CommandLineInterface { // output_directives_ lists all the files we are supposed to output and what // generator to use for each. struct OutputDirective { - std::string name; // E.g. "--foo_out" + std::string name; // E.g. "--foo_out" CodeGenerator* generator; // NULL for plugins std::string parameter; std::string output_location; diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc index 54bec72c22..e4b393c616 100644 --- a/src/google/protobuf/compiler/command_line_interface_unittest.cc +++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc @@ -86,7 +86,7 @@ using google::protobuf::internal::win32::write; namespace { -bool FileExists(const string& path) { +bool FileExists(const std::string& path) { return File::Exists(path); } @@ -98,8 +98,8 @@ class CommandLineInterfaceTest : public testing::Test { // Runs the CommandLineInterface with the given command line. The // command is automatically split on spaces, and the string "$tmpdir" // is replaced with TestTempDir(). - void Run(const string& command); - void RunWithArgs(std::vector args); + void Run(const std::string& command); + void RunWithArgs(std::vector args); // ----------------------------------------------------------------- // Methods to set up the test (called before Run()). @@ -112,10 +112,10 @@ class CommandLineInterfaceTest : public testing::Test { // Create a temp file within temp_directory_ with the given name. // The containing directory is also created if necessary. - void CreateTempFile(const string& name, const string& contents); + void CreateTempFile(const std::string& name, const std::string& contents); // Create a subdirectory within temp_directory_. - void CreateTempDir(const string& name); + void CreateTempDir(const std::string& name); #ifdef PROTOBUF_OPENSOURCE // Change working directory to temp directory. @@ -137,27 +137,27 @@ class CommandLineInterfaceTest : public testing::Test { // Checks that Run() returned non-zero and the stderr output is exactly // the text given. expected_test may contain references to "$tmpdir", // which will be replaced by the temporary directory path. - void ExpectErrorText(const string& expected_text); + void ExpectErrorText(const std::string& expected_text); // Checks that Run() returned non-zero and the stderr contains the given // substring. - void ExpectErrorSubstring(const string& expected_substring); + void ExpectErrorSubstring(const std::string& expected_substring); // Like ExpectErrorSubstring, but checks that Run() returned zero. void ExpectErrorSubstringWithZeroReturnCode( - const string& expected_substring); + const std::string& expected_substring); // Checks that the captured stdout is the same as the expected_text. - void ExpectCapturedStdout(const string& expected_text); + void ExpectCapturedStdout(const std::string& expected_text); // Checks that Run() returned zero and the stdout contains the given // substring. void ExpectCapturedStdoutSubstringWithZeroReturnCode( - const string& expected_substring); + const std::string& expected_substring); // Returns true if ExpectErrorSubstring(expected_substring) would pass, but // does not fail otherwise. - bool HasAlternateErrorSubstring(const string& expected_substring); + bool HasAlternateErrorSubstring(const std::string& expected_substring); // Checks that MockCodeGenerator::Generate() was called in the given // context (or the generator in test_plugin.cc, which produces the same @@ -168,37 +168,38 @@ class CommandLineInterfaceTest : public testing::Test { // generate given these inputs. message_name is the name of the first // message that appeared in the proto file; this is just to make extra // sure that the correct file was parsed. - void ExpectGenerated(const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name); - void ExpectGenerated(const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name, - const string& output_directory); - void ExpectGeneratedWithMultipleInputs(const string& generator_name, - const string& all_proto_names, - const string& proto_name, - const string& message_name); - void ExpectGeneratedWithInsertions(const string& generator_name, - const string& parameter, - const string& insertions, - const string& proto_name, - const string& message_name); - void CheckGeneratedAnnotations(const string& name, const string& file); - - void ExpectNullCodeGeneratorCalled(const string& parameter); - - - void ReadDescriptorSet(const string& filename, + void ExpectGenerated(const std::string& generator_name, + const std::string& parameter, + const std::string& proto_name, + const std::string& message_name); + void ExpectGenerated(const std::string& generator_name, + const std::string& parameter, + const std::string& proto_name, + const std::string& message_name, + const std::string& output_directory); + void ExpectGeneratedWithMultipleInputs(const std::string& generator_name, + const std::string& all_proto_names, + const std::string& proto_name, + const std::string& message_name); + void ExpectGeneratedWithInsertions(const std::string& generator_name, + const std::string& parameter, + const std::string& insertions, + const std::string& proto_name, + const std::string& message_name); + void CheckGeneratedAnnotations(const std::string& name, + const std::string& file); + + void ExpectNullCodeGeneratorCalled(const std::string& parameter); + + + void ReadDescriptorSet(const std::string& filename, FileDescriptorSet* descriptor_set); - void WriteDescriptorSet(const string& filename, + void WriteDescriptorSet(const std::string& filename, const FileDescriptorSet* descriptor_set); - void ExpectFileContent(const string& filename, - const string& content); + void ExpectFileContent(const std::string& filename, + const std::string& content); private: // The object we are testing. @@ -211,16 +212,16 @@ class CommandLineInterfaceTest : public testing::Test { // protection against accidentally deleting user files (since we recursively // delete this directory during the test). This is the full path of that // directory. - string temp_directory_; + std::string temp_directory_; // The result of Run(). int return_code_; // The captured stderr output. - string error_text_; + std::string error_text_; // The captured stdout. - string captured_stdout_; + std::string captured_stdout_; // Pointers which need to be deleted later. std::vector mock_generators_to_delete_; @@ -234,13 +235,11 @@ class CommandLineInterfaceTest::NullCodeGenerator : public CodeGenerator { ~NullCodeGenerator() {} mutable bool called_; - mutable string parameter_; + mutable std::string parameter_; // implements CodeGenerator ---------------------------------------- - bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { + bool Generate(const FileDescriptor* file, const std::string& parameter, + GeneratorContext* context, std::string* error) const { called_ = true; parameter_ = parameter; return true; @@ -292,14 +291,14 @@ void CommandLineInterfaceTest::TearDown() { mock_generators_to_delete_.clear(); } -void CommandLineInterfaceTest::Run(const string& command) { +void CommandLineInterfaceTest::Run(const std::string& command) { RunWithArgs(Split(command, " ", true)); } -void CommandLineInterfaceTest::RunWithArgs(std::vector args) { +void CommandLineInterfaceTest::RunWithArgs(std::vector args) { if (!disallow_plugins_) { cli_.AllowPlugins("prefix-"); - string plugin_path; + std::string plugin_path; #ifdef GOOGLE_PROTOBUF_TEST_PLUGIN_PATH plugin_path = GOOGLE_PROTOBUF_TEST_PLUGIN_PATH; #else @@ -361,13 +360,12 @@ void CommandLineInterfaceTest::RunWithArgs(std::vector args) { // ------------------------------------------------------------------- -void CommandLineInterfaceTest::CreateTempFile( - const string& name, - const string& contents) { +void CommandLineInterfaceTest::CreateTempFile(const std::string& name, + const std::string& contents) { // Create parent directory, if necessary. - string::size_type slash_pos = name.find_last_of('/'); - if (slash_pos != string::npos) { - string dir = name.substr(0, slash_pos); + std::string::size_type slash_pos = name.find_last_of('/'); + if (slash_pos != std::string::npos) { + std::string dir = name.substr(0, slash_pos); if (!FileExists(temp_directory_ + "/" + dir)) { GOOGLE_CHECK_OK(File::RecursivelyCreateDir(temp_directory_ + "/" + dir, 0777)); @@ -375,13 +373,13 @@ void CommandLineInterfaceTest::CreateTempFile( } // Write file. - string full_name = temp_directory_ + "/" + name; + std::string full_name = temp_directory_ + "/" + name; GOOGLE_CHECK_OK(File::SetContents( full_name, StringReplace(contents, "$tmpdir", temp_directory_, true), true)); } -void CommandLineInterfaceTest::CreateTempDir(const string& name) { +void CommandLineInterfaceTest::CreateTempDir(const std::string& name) { GOOGLE_CHECK_OK(File::RecursivelyCreateDir(temp_directory_ + "/" + name, 0777)); } @@ -393,56 +391,51 @@ void CommandLineInterfaceTest::ExpectNoErrors() { EXPECT_EQ("", error_text_); } -void CommandLineInterfaceTest::ExpectErrorText(const string& expected_text) { +void CommandLineInterfaceTest::ExpectErrorText( + const std::string& expected_text) { EXPECT_NE(0, return_code_); EXPECT_EQ(StringReplace(expected_text, "$tmpdir", temp_directory_, true), error_text_); } void CommandLineInterfaceTest::ExpectErrorSubstring( - const string& expected_substring) { + const std::string& expected_substring) { EXPECT_NE(0, return_code_); EXPECT_PRED_FORMAT2(testing::IsSubstring, expected_substring, error_text_); } void CommandLineInterfaceTest::ExpectErrorSubstringWithZeroReturnCode( - const string& expected_substring) { + const std::string& expected_substring) { EXPECT_EQ(0, return_code_); EXPECT_PRED_FORMAT2(testing::IsSubstring, expected_substring, error_text_); } bool CommandLineInterfaceTest::HasAlternateErrorSubstring( - const string& expected_substring) { + const std::string& expected_substring) { EXPECT_NE(0, return_code_); - return error_text_.find(expected_substring) != string::npos; + return error_text_.find(expected_substring) != std::string::npos; } void CommandLineInterfaceTest::ExpectGenerated( - const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name) { + const std::string& generator_name, const std::string& parameter, + const std::string& proto_name, const std::string& message_name) { MockCodeGenerator::ExpectGenerated( generator_name, parameter, "", proto_name, message_name, proto_name, temp_directory_); } void CommandLineInterfaceTest::ExpectGenerated( - const string& generator_name, - const string& parameter, - const string& proto_name, - const string& message_name, - const string& output_directory) { + const std::string& generator_name, const std::string& parameter, + const std::string& proto_name, const std::string& message_name, + const std::string& output_directory) { MockCodeGenerator::ExpectGenerated( generator_name, parameter, "", proto_name, message_name, proto_name, temp_directory_ + "/" + output_directory); } void CommandLineInterfaceTest::ExpectGeneratedWithMultipleInputs( - const string& generator_name, - const string& all_proto_names, - const string& proto_name, - const string& message_name) { + const std::string& generator_name, const std::string& all_proto_names, + const std::string& proto_name, const std::string& message_name) { MockCodeGenerator::ExpectGenerated( generator_name, "", "", proto_name, message_name, all_proto_names, @@ -450,32 +443,30 @@ void CommandLineInterfaceTest::ExpectGeneratedWithMultipleInputs( } void CommandLineInterfaceTest::ExpectGeneratedWithInsertions( - const string& generator_name, - const string& parameter, - const string& insertions, - const string& proto_name, - const string& message_name) { + const std::string& generator_name, const std::string& parameter, + const std::string& insertions, const std::string& proto_name, + const std::string& message_name) { MockCodeGenerator::ExpectGenerated( generator_name, parameter, insertions, proto_name, message_name, proto_name, temp_directory_); } -void CommandLineInterfaceTest::CheckGeneratedAnnotations(const string& name, - const string& file) { +void CommandLineInterfaceTest::CheckGeneratedAnnotations( + const std::string& name, const std::string& file) { MockCodeGenerator::CheckGeneratedAnnotations(name, file, temp_directory_); } void CommandLineInterfaceTest::ExpectNullCodeGeneratorCalled( - const string& parameter) { + const std::string& parameter) { EXPECT_TRUE(null_generator_->called_); EXPECT_EQ(parameter, null_generator_->parameter_); } void CommandLineInterfaceTest::ReadDescriptorSet( - const string& filename, FileDescriptorSet* descriptor_set) { - string path = temp_directory_ + "/" + filename; - string file_contents; + const std::string& filename, FileDescriptorSet* descriptor_set) { + std::string path = temp_directory_ + "/" + filename; + std::string file_contents; GOOGLE_CHECK_OK(File::GetContents(path, &file_contents, true)); if (!descriptor_set->ParseFromString(file_contents)) { @@ -484,28 +475,28 @@ void CommandLineInterfaceTest::ReadDescriptorSet( } void CommandLineInterfaceTest::WriteDescriptorSet( - const string& filename, const FileDescriptorSet* descriptor_set) { - string binary_proto; + const std::string& filename, const FileDescriptorSet* descriptor_set) { + std::string binary_proto; GOOGLE_CHECK(descriptor_set->SerializeToString(&binary_proto)); CreateTempFile(filename, binary_proto); } void CommandLineInterfaceTest::ExpectCapturedStdout( - const string& expected_text) { + const std::string& expected_text) { EXPECT_EQ(expected_text, captured_stdout_); } void CommandLineInterfaceTest::ExpectCapturedStdoutSubstringWithZeroReturnCode( - const string& expected_substring) { + const std::string& expected_substring) { EXPECT_EQ(0, return_code_); EXPECT_PRED_FORMAT2( testing::IsSubstring, expected_substring, captured_stdout_); } -void CommandLineInterfaceTest::ExpectFileContent( - const string& filename, const string& content) { - string path = temp_directory_ + "/" + filename; - string file_contents; +void CommandLineInterfaceTest::ExpectFileContent(const std::string& filename, + const std::string& content) { + std::string path = temp_directory_ + "/" + filename; + std::string file_contents; GOOGLE_CHECK_OK(File::GetContents(path, &file_contents, true)); EXPECT_EQ(StringReplace(content, "$tmpdir", temp_directory_, true), @@ -729,9 +720,8 @@ TEST_F(CommandLineInterfaceTest, MultipleInputsWithImport_DescriptorSetIn) { Run(strings::Substitute( "protocol_compiler --test_out=$$tmpdir --plug_out=$$tmpdir " "--descriptor_set_in=$0 foo.proto bar.proto", - string("$tmpdir/foo_and_bar.bin") + - CommandLineInterface::kPathSeparator + - "$tmpdir/baz_and_bat.bin")); + std::string("$tmpdir/foo_and_bar.bin") + + CommandLineInterface::kPathSeparator + "$tmpdir/baz_and_bat.bin")); ExpectNoErrors(); ExpectGeneratedWithMultipleInputs("test_generator", "foo.proto,bar.proto", @@ -746,9 +736,8 @@ TEST_F(CommandLineInterfaceTest, MultipleInputsWithImport_DescriptorSetIn) { Run(strings::Substitute( "protocol_compiler --test_out=$$tmpdir --plug_out=$$tmpdir " "--descriptor_set_in=$0 baz.proto bat.proto", - string("$tmpdir/foo_and_bar.bin") + - CommandLineInterface::kPathSeparator + - "$tmpdir/baz_and_bat.bin")); + std::string("$tmpdir/foo_and_bar.bin") + + CommandLineInterface::kPathSeparator + "$tmpdir/baz_and_bat.bin")); ExpectNoErrors(); ExpectGeneratedWithMultipleInputs("test_generator", "baz.proto,bat.proto", @@ -805,9 +794,8 @@ TEST_F(CommandLineInterfaceTest, Run(strings::Substitute( "protocol_compiler --test_out=$$tmpdir --plug_out=$$tmpdir " "--descriptor_set_in=$0 bar.proto", - string("$tmpdir/foo_and_bar.bin") + - CommandLineInterface::kPathSeparator + - "$tmpdir/foo_and_baz.bin")); + std::string("$tmpdir/foo_and_bar.bin") + + CommandLineInterface::kPathSeparator + "$tmpdir/foo_and_baz.bin")); ExpectNoErrors(); ExpectGenerated("test_generator", "", "bar.proto", "Bar"); @@ -1101,9 +1089,8 @@ TEST_F(CommandLineInterfaceTest, ColonDelimitedPath) { Run(strings::Substitute( "protocol_compiler --test_out=$$tmpdir --proto_path=$0 foo.proto", - string("$tmpdir/a") + - CommandLineInterface::kPathSeparator + - "$tmpdir/b")); + std::string("$tmpdir/a") + CommandLineInterface::kPathSeparator + + "$tmpdir/b")); ExpectNoErrors(); ExpectGenerated("test_generator", "", "foo.proto", "Foo"); @@ -1298,7 +1285,7 @@ TEST_F(CommandLineInterfaceTest, DirectDependencies_CustomErrorMessage) { "syntax = \"proto2\";\n" "message Bar { optional string text = 1; }"); - std::vector commands; + std::vector commands; commands.push_back("protocol_compiler"); commands.push_back("--test_out=$tmpdir"); commands.push_back("--proto_path=$tmpdir"); @@ -1512,7 +1499,7 @@ TEST_F(CommandLineInterfaceTest, WriteDependencyManifestFile) { " optional Foo foo = 1;\n" "}\n"); - string current_working_directory = getcwd(NULL, 0); + std::string current_working_directory = getcwd(NULL, 0); SwitchToTempDirectory(); Run("protocol_compiler --dependency_out=manifest --test_out=. " @@ -1838,7 +1825,7 @@ TEST_F(CommandLineInterfaceTest, OutputWriteError) { "syntax = \"proto2\";\n" "message Foo {}\n"); - string output_file = + std::string output_file = MockCodeGenerator::GetOutputFileName("test_generator", "foo.proto"); // Create a directory blocking our output location. @@ -1867,7 +1854,7 @@ TEST_F(CommandLineInterfaceTest, PluginOutputWriteError) { "syntax = \"proto2\";\n" "message Foo {}\n"); - string output_file = + std::string output_file = MockCodeGenerator::GetOutputFileName("test_plugin", "foo.proto"); // Create a directory blocking our output location. @@ -2279,13 +2266,13 @@ class EncodeDecodeTest : public testing::TestWithParam { close(duped_stdin_); } - void RedirectStdinFromText(const string& input) { - string filename = TestTempDir() + "/test_stdin"; + void RedirectStdinFromText(const std::string& input) { + std::string filename = TestTempDir() + "/test_stdin"; GOOGLE_CHECK_OK(File::SetContents(filename, input, true)); GOOGLE_CHECK(RedirectStdinFromFile(filename)); } - bool RedirectStdinFromFile(const string& filename) { + bool RedirectStdinFromFile(const std::string& filename) { int fd = open(filename.c_str(), O_RDONLY); if (fd < 0) return false; dup2(fd, STDIN_FILENO); @@ -2294,8 +2281,8 @@ class EncodeDecodeTest : public testing::TestWithParam { } // Remove '\r' characters from text. - string StripCR(const string& text) { - string result; + std::string StripCR(const std::string& text) { + std::string result; for (int i = 0; i < text.size(); i++) { if (text[i] != '\r') { @@ -2309,8 +2296,8 @@ class EncodeDecodeTest : public testing::TestWithParam { enum Type { TEXT, BINARY }; enum ReturnCode { SUCCESS, ERROR }; - bool Run(const string& command) { - std::vector args; + bool Run(const std::string& command) { + std::vector args; args.push_back("protoc"); SplitStringUsing(command, " ", &args); switch (GetParam()) { @@ -2343,8 +2330,8 @@ class EncodeDecodeTest : public testing::TestWithParam { return result == 0; } - void ExpectStdoutMatchesBinaryFile(const string& filename) { - string expected_output; + void ExpectStdoutMatchesBinaryFile(const std::string& filename) { + std::string expected_output; GOOGLE_CHECK_OK(File::GetContents(filename, &expected_output, true)); // Don't use EXPECT_EQ because we don't want to print raw binary data to @@ -2352,18 +2339,18 @@ class EncodeDecodeTest : public testing::TestWithParam { EXPECT_TRUE(captured_stdout_ == expected_output); } - void ExpectStdoutMatchesTextFile(const string& filename) { - string expected_output; + void ExpectStdoutMatchesTextFile(const std::string& filename) { + std::string expected_output; GOOGLE_CHECK_OK(File::GetContents(filename, &expected_output, true)); ExpectStdoutMatchesText(expected_output); } - void ExpectStdoutMatchesText(const string& expected_text) { + void ExpectStdoutMatchesText(const std::string& expected_text) { EXPECT_EQ(StripCR(expected_text), StripCR(captured_stdout_)); } - void ExpectStderrMatchesText(const string& expected_text) { + void ExpectStderrMatchesText(const std::string& expected_text) { EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_)); } @@ -2384,7 +2371,7 @@ class EncodeDecodeTest : public testing::TestWithParam { file_descriptor_set.add_file()); GOOGLE_DCHECK(file_descriptor_set.IsInitialized()); - string binary_proto; + std::string binary_proto; GOOGLE_CHECK(file_descriptor_set.SerializeToString(&binary_proto)); GOOGLE_CHECK_OK(File::SetContents( unittest_proto_descriptor_set_filename_, @@ -2393,9 +2380,9 @@ class EncodeDecodeTest : public testing::TestWithParam { } int duped_stdin_; - string captured_stdout_; - string captured_stderr_; - string unittest_proto_descriptor_set_filename_; + std::string captured_stdout_; + std::string captured_stderr_; + std::string unittest_proto_descriptor_set_filename_; }; TEST_P(EncodeDecodeTest, Encode) { @@ -2436,7 +2423,7 @@ TEST_P(EncodeDecodeTest, DecodeRaw) { protobuf_unittest::TestAllTypes message; message.set_optional_int32(123); message.set_optional_string("foo"); - string data; + std::string data; message.SerializeToString(&data); RedirectStdinFromText(data); diff --git a/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc b/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc index 0797fc2818..c197dae94f 100644 --- a/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc +++ b/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc @@ -72,11 +72,11 @@ class MockErrorCollector : public MultiFileErrorCollector { MockErrorCollector() {} ~MockErrorCollector() {} - string text_; + std::string text_; // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, int line, int column, - const string& message) { + void AddError(const std::string& filename, int line, int column, + const std::string& message) { strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, column, message); } @@ -87,13 +87,14 @@ class MockGeneratorContext : public GeneratorContext { MockGeneratorContext() {} ~MockGeneratorContext() { STLDeleteValues(&files_); } - void ExpectFileMatches(const string& virtual_filename, - const string& physical_filename) { - string* expected_contents = FindPtrOrNull(files_, virtual_filename); + void ExpectFileMatches(const std::string& virtual_filename, + const std::string& physical_filename) { + std::string* expected_contents = + FindPtrOrNull(files_, virtual_filename); ASSERT_TRUE(expected_contents != NULL) << "Generator failed to generate file: " << virtual_filename; - string actual_contents; + std::string actual_contents; GOOGLE_CHECK_OK( File::GetContents(TestUtil::TestSourceDir() + "/" + physical_filename, &actual_contents, true)) @@ -102,11 +103,11 @@ class MockGeneratorContext : public GeneratorContext { #ifdef WRITE_FILES // Define to debug mismatched files. GOOGLE_CHECK_OK( - File::SetContents("/tmp/1.cc", *expected_contents, true)); - GOOGLE_CHECK_OK(File::SetContents("/tmp/2.cc", actual_contents, true)); + File::SetContents("/tmp/expected.cc", *expected_contents, true)); + GOOGLE_CHECK_OK(File::SetContents("/tmp/actual.cc", actual_contents, true)); #endif - EXPECT_EQ(*expected_contents, actual_contents) + ASSERT_EQ(*expected_contents, actual_contents) << physical_filename << " needs to be regenerated. Please run " "generate_descriptor_proto.sh. " @@ -115,16 +116,16 @@ class MockGeneratorContext : public GeneratorContext { // implements GeneratorContext -------------------------------------- - virtual io::ZeroCopyOutputStream* Open(const string& filename) { - string** map_slot = &files_[filename]; + virtual io::ZeroCopyOutputStream* Open(const std::string& filename) { + std::string** map_slot = &files_[filename]; delete *map_slot; - *map_slot = new string; + *map_slot = new std::string; return new io::StringOutputStream(*map_slot); } private: - std::map files_; + std::map files_; }; const char kDescriptorParameter[] = "dllexport_decl=PROTOBUF_EXPORT"; @@ -139,8 +140,8 @@ const char* test_protos[][2] = { TEST(BootstrapTest, GeneratedFilesMatch) { // We need a mapping from the actual file to virtual and actual path // of the data to compare to. - std::map vpath_map; - std::map rpath_map; + std::map vpath_map; + std::map rpath_map; rpath_map["third_party/protobuf/src/google/protobuf/test_messages_proto2"] = "net/proto2/z_generated_example/test_messages_proto2"; rpath_map["third_party/protobuf/src/google/protobuf/test_messages_proto3"] = @@ -155,7 +156,7 @@ TEST(BootstrapTest, GeneratedFilesMatch) { MockErrorCollector error_collector; Importer importer(&source_tree, &error_collector); const FileDescriptor* file = - importer.Import(file_parameter[0] + string(".proto")); + importer.Import(file_parameter[0] + std::string(".proto")); ASSERT_TRUE(file != nullptr) << "Can't import file " << file_parameter[0] + string(".proto") << "\n"; EXPECT_EQ("", error_collector.text_); @@ -165,12 +166,12 @@ TEST(BootstrapTest, GeneratedFilesMatch) { generator.set_opensource_runtime(true); generator.set_runtime_include_base(GOOGLE_PROTOBUF_RUNTIME_INCLUDE_BASE); #endif - string error; + std::string error; ASSERT_TRUE(generator.Generate(file, file_parameter[1], &context, &error)); - string vpath = + std::string vpath = FindWithDefault(vpath_map, file_parameter[0], file_parameter[0]); - string rpath = + std::string rpath = FindWithDefault(rpath_map, file_parameter[0], file_parameter[0]); context.ExpectFileMatches(vpath + ".pb.cc", rpath + ".pb.cc"); context.ExpectFileMatches(vpath + ".pb.h", rpath + ".pb.h"); diff --git a/src/google/protobuf/compiler/cpp/cpp_enum.cc b/src/google/protobuf/compiler/cpp/cpp_enum.cc index 66e56d0f9f..b728470182 100644 --- a/src/google/protobuf/compiler/cpp/cpp_enum.cc +++ b/src/google/protobuf/compiler/cpp/cpp_enum.cc @@ -60,7 +60,7 @@ bool ShouldGenerateArraySize(const EnumDescriptor* descriptor) { } // namespace EnumGenerator::EnumGenerator(const EnumDescriptor* descriptor, - const std::map& vars, + const std::map& vars, const Options& options) : descriptor_(descriptor), classname_(ClassName(descriptor, false)), @@ -68,7 +68,7 @@ EnumGenerator::EnumGenerator(const EnumDescriptor* descriptor, generate_array_size_(ShouldGenerateArraySize(descriptor)), variables_(vars) { variables_["classname"] = classname_; - variables_["classtype"] = QualifiedClassName(descriptor_); + variables_["classtype"] = QualifiedClassName(descriptor_, options); variables_["short_name"] = descriptor_->name(); variables_["enumbase"] = options_.proto_h ? " : int" : ""; variables_["nested_name"] = descriptor_->name(); @@ -110,7 +110,7 @@ void EnumGenerator::GenerateDefinition(io::Printer* printer) { } } - if (HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (descriptor_->file()->syntax() == FileDescriptor::SYNTAX_PROTO3) { // For new enum semantics: generate min and max sentinel values equal to // INT32_MIN and INT32_MAX if (descriptor_->value_count() > 0) format(",\n"); @@ -148,7 +148,7 @@ void EnumGenerator::GenerateDefinition(io::Printer* printer) { // TODO(haberman): consider removing this in favor of the stricter // version below. Would this break our compatibility guarantees? format( - "inline const $string$& $classname$_Name($classname$ value) {\n" + "inline const std::string& $classname$_Name($classname$ value) {\n" " return ::$proto_ns$::internal::NameOfEnum(\n" " $classname$_descriptor(), value);\n" "}\n"); @@ -158,7 +158,7 @@ void EnumGenerator::GenerateDefinition(io::Printer* printer) { // an integral type. format( "template\n" - "inline const $string$& $classname$_Name(T enum_t_value) {\n" + "inline const std::string& $classname$_Name(T enum_t_value) {\n" " static_assert(::std::is_same::value ||\n" " ::std::is_integral::value,\n" " \"Incorrect type passed to function $classname$_Name.\");\n" @@ -168,7 +168,7 @@ void EnumGenerator::GenerateDefinition(io::Printer* printer) { } format( "inline bool $classname$_Parse(\n" - " const $string$& name, $classname$* value) {\n" + " const std::string& name, $classname$* value) {\n" " return ::$proto_ns$::internal::ParseNamedEnum<$classname$>(\n" " $classname$_descriptor(), name, value);\n" "}\n"); @@ -195,7 +195,7 @@ void EnumGenerator::GenerateSymbolImports(io::Printer* printer) const { format("typedef $classname$ $nested_name$;\n"); for (int j = 0; j < descriptor_->value_count(); j++) { - string deprecated_attr = DeprecatedAttribute( + std::string deprecated_attr = DeprecatedAttribute( options_, descriptor_->value(j)->options().deprecated()); format( "$1$static constexpr $nested_name$ ${2$$3$$}$ =\n" @@ -230,7 +230,7 @@ void EnumGenerator::GenerateSymbolImports(io::Printer* printer) const { // TODO(haberman): consider removing this in favor of the stricter // version below. Would this break our compatibility guarantees? format( - "static inline const $string$& " + "static inline const std::string& " "$nested_name$_Name($nested_name$ value) {" "\n" " return $classname$_Name(value);\n" @@ -241,7 +241,8 @@ void EnumGenerator::GenerateSymbolImports(io::Printer* printer) const { // an integral type. format( "template\n" - "static inline const $string$& $nested_name$_Name(T enum_t_value) {\n" + "static inline const std::string& $nested_name$_Name(T enum_t_value) " + "{\n" " static_assert(::std::is_same::value ||\n" " ::std::is_integral::value,\n" " \"Incorrect type passed to function $nested_name$_Name.\");\n" @@ -249,7 +250,7 @@ void EnumGenerator::GenerateSymbolImports(io::Printer* printer) const { "}\n"); } format( - "static inline bool $nested_name$_Parse(const $string$& name,\n" + "static inline bool $nested_name$_Parse(const std::string& name,\n" " $nested_name$* value) {\n" " return $classname$_Parse(name, value);\n" "}\n"); @@ -295,7 +296,7 @@ void EnumGenerator::GenerateMethods(int idx, io::Printer* printer) { "\n"); if (descriptor_->containing_type() != NULL) { - string parent = ClassName(descriptor_->containing_type(), false); + std::string parent = ClassName(descriptor_->containing_type(), false); // Before C++17, we must define the static constants which were // declared in the header, to give the linker a place to put them. // But pre-2015 MSVC++ insists that we not. diff --git a/src/google/protobuf/compiler/cpp/cpp_enum.h b/src/google/protobuf/compiler/cpp/cpp_enum.h index 6b9700ae5d..cce8cf200f 100644 --- a/src/google/protobuf/compiler/cpp/cpp_enum.h +++ b/src/google/protobuf/compiler/cpp/cpp_enum.h @@ -58,7 +58,8 @@ class EnumGenerator { public: // See generator.cc for the meaning of dllexport_decl. EnumGenerator(const EnumDescriptor* descriptor, - const std::map& vars, const Options& options); + const std::map& vars, + const Options& options); ~EnumGenerator(); // Generate header code defining the enum. This code should be placed diff --git a/src/google/protobuf/compiler/cpp/cpp_enum_field.cc b/src/google/protobuf/compiler/cpp/cpp_enum_field.cc index 256afb9d9e..10eed3dff6 100644 --- a/src/google/protobuf/compiler/cpp/cpp_enum_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_enum_field.cc @@ -46,11 +46,11 @@ namespace cpp { namespace { void SetEnumVariables(const FieldDescriptor* descriptor, - std::map* variables, + std::map* variables, const Options& options) { SetCommonFieldVariables(descriptor, variables, options); const EnumValueDescriptor* default_value = descriptor->default_value_enum(); - (*variables)["type"] = ClassName(descriptor->enum_type(), true); + (*variables)["type"] = QualifiedClassName(descriptor->enum_type(), options); (*variables)["default"] = Int32ToString(default_value->number()); (*variables)["full_name"] = descriptor->full_name(); } @@ -90,7 +90,7 @@ void EnumFieldGenerator::GenerateInlineAccessorDefinitions( " return static_cast< $type$ >($name$_);\n" "}\n" "inline void $classname$::set_$name$($type$ value) {\n"); - if (!HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } format( @@ -134,7 +134,7 @@ void EnumFieldGenerator::GenerateMergeFromCodedStream( "DO_((::$proto_ns$::internal::WireFormatLite::ReadPrimitive<\n" " int, ::$proto_ns$::internal::WireFormatLite::TYPE_ENUM>(\n" " input, &value)));\n"); - if (HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (HasPreservingUnknownEnumSemantics(descriptor_)) { format("set_$name$(static_cast< $type$ >(value));\n"); } else { format( @@ -202,7 +202,7 @@ void EnumOneofFieldGenerator::GenerateInlineAccessorDefinitions( " return static_cast< $type$ >($default$);\n" "}\n" "inline void $classname$::set_$name$($type$ value) {\n"); - if (!HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } format( @@ -273,7 +273,7 @@ void RepeatedEnumFieldGenerator::GenerateInlineAccessorDefinitions( " return static_cast< $type$ >($name$_.Get(index));\n" "}\n" "inline void $classname$::set_$name$(int index, $type$ value) {\n"); - if (!HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } format( @@ -281,7 +281,7 @@ void RepeatedEnumFieldGenerator::GenerateInlineAccessorDefinitions( " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" "inline void $classname$::add_$name$($type$ value) {\n"); - if (!HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (!HasPreservingUnknownEnumSemantics(descriptor_)) { format(" assert($type$_IsValid(value));\n"); } format( @@ -332,7 +332,7 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStream( "DO_((::$proto_ns$::internal::WireFormatLite::ReadPrimitive<\n" " int, ::$proto_ns$::internal::WireFormatLite::TYPE_ENUM>(\n" " input, &value)));\n"); - if (HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (HasPreservingUnknownEnumSemantics(descriptor_)) { format("add_$name$(static_cast< $type$ >(value));\n"); } else { format( @@ -359,7 +359,7 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking( Formatter format(printer, variables_); if (!descriptor_->is_packed()) { // This path is rarely executed, so we use a non-inlined implementation. - if (HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (HasPreservingUnknownEnumSemantics(descriptor_)) { format( "DO_((::$proto_ns$::internal::" "WireFormatLite::ReadPackedEnumPreserveUnknowns(\n" @@ -398,7 +398,7 @@ void RepeatedEnumFieldGenerator::GenerateMergeFromCodedStreamWithPacking( " DO_((::$proto_ns$::internal::WireFormatLite::ReadPrimitive<\n" " int, ::$proto_ns$::internal::WireFormatLite::TYPE_ENUM>(\n" " input, &value)));\n"); - if (HasPreservingUnknownEnumSemantics(descriptor_->file())) { + if (HasPreservingUnknownEnumSemantics(descriptor_)) { format(" add_$name$(static_cast< $type$ >(value));\n"); } else { format( diff --git a/src/google/protobuf/compiler/cpp/cpp_extension.cc b/src/google/protobuf/compiler/cpp/cpp_extension.cc index 06c34caa4d..6bcbb3a2b8 100644 --- a/src/google/protobuf/compiler/cpp/cpp_extension.cc +++ b/src/google/protobuf/compiler/cpp/cpp_extension.cc @@ -51,7 +51,7 @@ namespace { // Returns the fully-qualified class name of the message that this field // extends. This function is used in the Google-internal code to handle some // legacy cases. -string ExtendeeClassName(const FieldDescriptor* descriptor) { +std::string ExtendeeClassName(const FieldDescriptor* descriptor) { const Descriptor* extendee = descriptor->containing_type(); return ClassName(extendee, true); } @@ -92,17 +92,17 @@ ExtensionGenerator::ExtensionGenerator(const FieldDescriptor* descriptor, SetCommonVars(options, &variables_); variables_["extendee"] = ExtendeeClassName(descriptor_); variables_["type_traits"] = type_traits_; - string name = descriptor_->name(); + std::string name = descriptor_->name(); variables_["name"] = name; variables_["constant_name"] = FieldConstantName(descriptor_); variables_["field_type"] = StrCat(static_cast(descriptor_->type())); variables_["packed"] = descriptor_->options().packed() ? "true" : "false"; - string scope = + std::string scope = IsScoped() ? ClassName(descriptor_->extension_scope(), false) + "::" : ""; variables_["scope"] = scope; - string scoped_name = scope + name; + std::string scoped_name = scope + name; variables_["scoped_name"] = scoped_name; variables_["number"] = StrCat(descriptor_->number()); } @@ -119,7 +119,7 @@ void ExtensionGenerator::GenerateDeclaration(io::Printer* printer) const { // If this is a class member, it needs to be declared "static". Otherwise, // it needs to be "extern". In the latter case, it also needs the DLL // export/import specifier. - string qualifier; + std::string qualifier; if (!IsScoped()) { qualifier = "extern"; if (!options_.dllexport_decl.empty()) { @@ -149,7 +149,7 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* printer) { } Formatter format(printer, variables_); - string default_str; + std::string default_str; // If this is a class member, it needs to be declared in its class scope. if (descriptor_->cpp_type() == FieldDescriptor::CPPTYPE_STRING) { // We need to declare a global string which will contain the default value. @@ -158,7 +158,7 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* printer) { // replace :: with _ in the name and declare it as a global. default_str = StringReplace(variables_["scoped_name"], "::", "_", true) + "_default"; - format("const ::std::string $1$($2$);\n", default_str, + format("const std::string $1$($2$);\n", default_str, DefaultValue(options_, descriptor_)); } else { default_str = DefaultValue(options_, descriptor_); diff --git a/src/google/protobuf/compiler/cpp/cpp_field.cc b/src/google/protobuf/compiler/cpp/cpp_field.cc index fe20d4bb12..48e6cec1fc 100644 --- a/src/google/protobuf/compiler/cpp/cpp_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_field.cc @@ -57,10 +57,10 @@ namespace cpp { using internal::WireFormat; void SetCommonFieldVariables(const FieldDescriptor* descriptor, - std::map* variables, + std::map* variables, const Options& options) { SetCommonVars(options, variables); - (*variables)["ns"] = Namespace(descriptor); + (*variables)["ns"] = Namespace(descriptor, options); (*variables)["name"] = FieldName(descriptor); (*variables)["index"] = StrCat(descriptor->index()); (*variables)["number"] = StrCat(descriptor->number()); @@ -102,9 +102,10 @@ void FieldGenerator::SetHasBitIndex(int32 has_bit_index) { strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8), "u;"); } -void SetCommonOneofFieldVariables(const FieldDescriptor* descriptor, - std::map* variables) { - const string prefix = descriptor->containing_oneof()->name() + "_."; +void SetCommonOneofFieldVariables( + const FieldDescriptor* descriptor, + std::map* variables) { + const std::string prefix = descriptor->containing_oneof()->name() + "_."; (*variables)["oneof_name"] = descriptor->containing_oneof()->name(); (*variables)["field_member"] = StrCat(prefix, (*variables)["name"], "_"); diff --git a/src/google/protobuf/compiler/cpp/cpp_field.h b/src/google/protobuf/compiler/cpp/cpp_field.h index 43a3e3674d..054c64b479 100644 --- a/src/google/protobuf/compiler/cpp/cpp_field.h +++ b/src/google/protobuf/compiler/cpp/cpp_field.h @@ -64,8 +64,9 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, std::map* variables, const Options& options); -void SetCommonOneofFieldVariables(const FieldDescriptor* descriptor, - std::map* variables); +void SetCommonOneofFieldVariables( + const FieldDescriptor* descriptor, + std::map* variables); class FieldGenerator { public: diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc index 24c88d3b9d..d9a7bde45d 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -74,7 +74,7 @@ FileGenerator::FileGenerator(const FileDescriptor* file, const Options& options) UniqueName("file_level_service_descriptors", file_, options_); variables_["add_descriptors"] = UniqueName("AddDescriptors", file_, options_); variables_["filename"] = file_->name(); - variables_["package_ns"] = Namespace(file_); + variables_["package_ns"] = Namespace(file_, options); variables_["init_defaults"] = UniqueName("InitDefaults", file_, options_); std::vector msgs = FlattenMessagesInFile(file); @@ -120,11 +120,11 @@ void FileGenerator::GenerateMacroUndefs(io::Printer* printer) { file_->name() != "google/protobuf/compiler/plugin.proto") { return; } - std::vector names_to_undef; + std::vector names_to_undef; std::vector fields; ListAllFields(file_, &fields); for (int i = 0; i < fields.size(); i++) { - const string& name = fields[i]->name(); + const std::string& name = fields[i]->name(); static const char* kMacroNames[] = {"major", "minor"}; for (int i = 0; i < GOOGLE_ARRAYSIZE(kMacroNames); ++i) { if (name == kMacroNames[i]) { @@ -156,6 +156,15 @@ void FileGenerator::GenerateHeader(io::Printer* printer) { format("class TagMapper;\n"); } + // For Any support with lite protos, we need to friend AnyMetadata, so we + // forward-declare it here. + format( + "PROTOBUF_NAMESPACE_OPEN\n" + "namespace internal {\n" + "class AnyMetadata;\n" + "} // namespace internal\n" + "PROTOBUF_NAMESPACE_CLOSE\n"); + if (!options_.opensource_runtime) { // EmbeddedMessageHolder is a proxy class to provide access into arena // constructors for proto1 message objects. @@ -173,7 +182,7 @@ void FileGenerator::GenerateHeader(io::Printer* printer) { GenerateForwardDeclarations(printer); { - NamespaceOpener ns(Namespace(file_), format); + NamespaceOpener ns(Namespace(file_, options_), format); format("\n"); @@ -215,14 +224,13 @@ void FileGenerator::GenerateHeader(io::Printer* printer) { } void FileGenerator::GenerateProtoHeader(io::Printer* printer, - const string& info_path) { + const std::string& info_path) { Formatter format(printer, variables_); if (!options_.proto_h) { return; } - string filename_identifier = FilenameIdentifier(file_->name()); - GenerateTopHeaderGuard(printer, filename_identifier); + GenerateTopHeaderGuard(printer, false); if (!options_.opensource_runtime) { format( @@ -247,7 +255,7 @@ void FileGenerator::GenerateProtoHeader(io::Printer* printer, if (IsProto1(dep, options_)) { extension = ".pb.h"; } - string dependency = StripProto(dep->name()) + extension; + std::string dependency = StripProto(dep->name()) + extension; format("#include \"$1$\"\n", dependency); } @@ -257,18 +265,16 @@ void FileGenerator::GenerateProtoHeader(io::Printer* printer, GenerateHeader(printer); - GenerateBottomHeaderGuard(printer, filename_identifier); + GenerateBottomHeaderGuard(printer, false); } void FileGenerator::GeneratePBHeader(io::Printer* printer, - const string& info_path) { + const std::string& info_path) { Formatter format(printer, variables_); - string filename_identifier = - FilenameIdentifier(file_->name() + (options_.proto_h ? ".pb.h" : "")); - GenerateTopHeaderGuard(printer, filename_identifier); + GenerateTopHeaderGuard(printer, true); if (options_.proto_h) { - string target_basename = StripProto(file_->name()); + std::string target_basename = StripProto(file_->name()); if (!options_.opensource_runtime) { GetBootstrapBasename(options_, target_basename, &target_basename); } @@ -293,7 +299,7 @@ void FileGenerator::GeneratePBHeader(io::Printer* printer, GenerateHeader(printer); } else { { - NamespaceOpener ns(Namespace(file_), format); + NamespaceOpener ns(Namespace(file_, options_), format); format( "\n" "// @@protoc_insertion_point(namespace_scope)\n"); @@ -304,17 +310,17 @@ void FileGenerator::GeneratePBHeader(io::Printer* printer, "\n"); } - GenerateBottomHeaderGuard(printer, filename_identifier); + GenerateBottomHeaderGuard(printer, true); } -void FileGenerator::DoIncludeFile(const string& google3_name, bool do_export, - io::Printer* printer) { +void FileGenerator::DoIncludeFile(const std::string& google3_name, + bool do_export, io::Printer* printer) { Formatter format(printer, variables_); - const string prefix = "net/proto2/"; + const std::string prefix = "net/proto2/"; GOOGLE_CHECK(google3_name.find(prefix) == 0) << google3_name; if (options_.opensource_runtime) { - string path = google3_name.substr(prefix.size()); + std::string path = google3_name.substr(prefix.size()); path = StringReplace(path, "internal/", "", false); path = StringReplace(path, "proto/", "", false); @@ -336,10 +342,10 @@ void FileGenerator::DoIncludeFile(const string& google3_name, bool do_export, format("\n"); } -string FileGenerator::CreateHeaderInclude(const string& basename, - const FileDescriptor* file) { +std::string FileGenerator::CreateHeaderInclude(const std::string& basename, + const FileDescriptor* file) { bool use_system_include = false; - string name = basename; + std::string name = basename; if (options_.opensource_runtime) { if (IsWellKnownMessage(file)) { @@ -351,8 +357,8 @@ string FileGenerator::CreateHeaderInclude(const string& basename, } } - string left = "\""; - string right = "\""; + std::string left = "\""; + std::string right = "\""; if (use_system_include) { left = "<"; right = ">"; @@ -362,7 +368,7 @@ string FileGenerator::CreateHeaderInclude(const string& basename, void FileGenerator::GenerateSourceIncludes(io::Printer* printer) { Formatter format(printer, variables_); - string target_basename = StripProto(file_->name()); + std::string target_basename = StripProto(file_->name()); if (!options_.opensource_runtime) { GetBootstrapBasename(options_, target_basename, &target_basename); } @@ -384,7 +390,7 @@ void FileGenerator::GenerateSourceIncludes(io::Printer* printer) { IncludeFile("net/proto2/io/public/coded_stream.h", printer); // TODO(gerbens) This is to include parse_context.h, we need a better way IncludeFile("net/proto2/public/extension_set.h", printer); - IncludeFile("net/proto2/public/wire_format_lite_inl.h", printer); + IncludeFile("net/proto2/public/wire_format_lite.h", printer); // Unknown fields implementation in lite mode uses StringOutputStream if (!UseUnknownFieldSet(file_, options_) && !message_generators_.empty()) { @@ -408,7 +414,7 @@ void FileGenerator::GenerateSourceIncludes(io::Printer* printer) { for (int i = 0; i < file_->dependency_count(); i++) { const FileDescriptor* dep = file_->dependency(i); const char* extension = ".proto.h"; - string basename = StripProto(dep->name()); + std::string basename = StripProto(dep->name()); // Do not import weak deps. if (!options_.opensource_runtime && IsDepWeak(dep)) continue; // The proto1 compiler only generates .pb.h files, so even if we are @@ -419,7 +425,7 @@ void FileGenerator::GenerateSourceIncludes(io::Printer* printer) { if (IsBootstrapProto(options_, file_)) { GetBootstrapBasename(options_, basename, &basename); } - string dependency = basename + extension; + std::string dependency = basename + extension; format("#include \"$1$\"\n", dependency); } } @@ -451,9 +457,9 @@ void FileGenerator::GenerateInternalForwardDeclarations( // To ensure determinism and minimize the number of namespace statements, // we output the forward declarations sorted on namespace and type / function // name. - std::set global_namespace_decls; + std::set global_namespace_decls; // weak defaults - std::set > messages; + std::set > messages; for (int i = 0; i < fields.size(); ++i) { const FieldDescriptor* field = fields[i]; const Descriptor* msg = field->message_type(); @@ -463,20 +469,21 @@ void FileGenerator::GenerateInternalForwardDeclarations( GOOGLE_CHECK(!options_.opensource_runtime); is_weak = true; } - string weak_attr; + std::string weak_attr; if (is_weak) { global_namespace_decls.insert( "void " + UniqueName("AddDescriptors", msg, options_) + "() __attribute__((weak))"); - messages.insert(std::make_pair(Namespace(msg), ClassName(msg))); + messages.insert(std::make_pair(Namespace(msg, options_), ClassName(msg))); weak_attr = " __attribute__((weak))"; } - string dllexport = UniqueName("PROTOBUF_INTERNAL_EXPORT", msg, options_); + std::string dllexport = + UniqueName("PROTOBUF_INTERNAL_EXPORT", msg, options_); if (IsProto1(msg->file(), options_) || IsWeak(field, options_)) { dllexport = ""; } auto scc = scc_analyzer->GetSCC(msg); - string repr = + std::string repr = UniqueName(ClassName(scc->GetRepresentative()), msg, options_); global_namespace_decls.insert(StrCat( "extern ", dllexport, weak_attr, " ::", ProtobufNamespace(options), @@ -485,7 +492,7 @@ void FileGenerator::GenerateInternalForwardDeclarations( format("\n"); - for (const string& decl : global_namespace_decls) { + for (const std::string& decl : global_namespace_decls) { format("$1$;\n", decl); } @@ -521,7 +528,7 @@ void FileGenerator::GenerateSourceForMessage(int idx, io::Printer* printer) { } { // package namespace - NamespaceOpener ns(Namespace(file_), format); + NamespaceOpener ns(Namespace(file_, options_), format); // Define default instances GenerateSourceDefaultInstance(idx, printer); @@ -563,7 +570,7 @@ void FileGenerator::GenerateGlobalSource(io::Printer* printer) { } } - NamespaceOpener ns(Namespace(file_), format); + NamespaceOpener ns(Namespace(file_, options_), format); // Generate enums. for (int i = 0; i < enum_generators_.size(); i++) { @@ -595,7 +602,7 @@ void FileGenerator::GenerateSource(io::Printer* printer) { printer); { - NamespaceOpener ns(Namespace(file_), format); + NamespaceOpener ns(Namespace(file_, options_), format); // Define default instances for (int i = 0; i < message_generators_.size(); i++) { @@ -624,7 +631,7 @@ void FileGenerator::GenerateSource(io::Printer* printer) { format("void $init_defaults$() {\n"); for (int i = 0; i < message_generators_.size(); i++) { if (!IsSCCRepresentative(message_generators_[i]->descriptor_)) continue; - string scc_name = + std::string scc_name = UniqueName(ClassName(message_generators_[i]->descriptor_), message_generators_[i]->descriptor_, options_); format(" ::$proto_ns$::internal::InitSCC(&scc_info_$1$.base);\n", @@ -639,7 +646,7 @@ void FileGenerator::GenerateSource(io::Printer* printer) { } { - NamespaceOpener ns(Namespace(file_), format); + NamespaceOpener ns(Namespace(file_, options_), format); // Actually implement the protos @@ -774,7 +781,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { format( "reinterpret_cast(&$1$::_$2$_default_instance_),\n", - Namespace(descriptor), // 1 + Namespace(descriptor, options_), // 1 ClassName(descriptor)); // 2 } format.Outdent(); @@ -814,13 +821,13 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { // Embed the descriptor. We simply serialize the entire // FileDescriptorProto/ and embed it as a string literal, which is parsed and // built into real descriptors at initialization time. - const string protodef_name = + const std::string protodef_name = UniqueName("descriptor_table_protodef", file_, options_); format( "const char $1$[] =\n", protodef_name); format.Indent(); FileDescriptorProto file_proto; file_->CopyTo(&file_proto); - string file_data; + std::string file_data; file_proto.SerializeToString(&file_data); { @@ -885,7 +892,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { void FileGenerator::GenerateInitForSCC(const SCC* scc, io::Printer* printer) { Formatter format(printer, variables_); - const string scc_name = ClassName(scc->GetRepresentative()); + const std::string scc_name = ClassName(scc->GetRepresentative()); // We use static and not anonymous namespace because symbol names are // substantially shorter. format("static void InitDefaults$1$() {\n", @@ -916,14 +923,16 @@ void FileGenerator::GenerateInitForSCC(const SCC* scc, io::Printer* printer) { message_generators_[i]->GenerateFieldDefaultInstances(printer); format( "{\n" - " void* ptr = &$1$::_$2$_default_instance_;\n" - " new (ptr) $1$::$2$();\n", - Namespace(message_generators_[i]->descriptor_), // 1 - ClassName(message_generators_[i]->descriptor_)); // 2 + " void* ptr = &$1$;\n" + " new (ptr) $2$();\n", + DefaultInstanceName(message_generators_[i]->descriptor_, options_), + QualifiedClassName(message_generators_[i]->descriptor_, options_)); if (options_.opensource_runtime && !IsMapEntryMessage(message_generators_[i]->descriptor_)) { format( - " ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);\n"); + " " + "::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);" + "\n"); } format("}\n"); } @@ -936,7 +945,7 @@ void FileGenerator::GenerateInitForSCC(const SCC* scc, io::Printer* printer) { continue; } format("$1$::InitAsDefaultInstance();\n", - QualifiedClassName(message_generators_[i]->descriptor_)); + QualifiedClassName(message_generators_[i]->descriptor_, options_)); } format.Outdent(); format("}\n\n"); @@ -1080,7 +1089,7 @@ class FileGenerator::ForwardDeclarations { void Print(const Formatter& format, const Options& options) const { for (const auto& p : enums_) { - const string& enumname = p.first; + const std::string& enumname = p.first; const EnumDescriptor* enum_desc = p.second; format( "enum ${1$$2$$}$ : int;\n" @@ -1088,7 +1097,7 @@ class FileGenerator::ForwardDeclarations { enum_desc, enumname); } for (const auto& p : classes_) { - const string& classname = p.first; + const std::string& classname = p.first; const Descriptor* class_desc = p.second; format( "class ${1$$2$$}$;\n" @@ -1102,18 +1111,19 @@ class FileGenerator::ForwardDeclarations { } } - void PrintTopLevelDecl(const Formatter& format) const { + void PrintTopLevelDecl(const Formatter& format, + const Options& options) const { for (const auto& pair : classes_) { format( "template<> $dllexport_decl $" "$1$* Arena::CreateMaybeMessage<$1$>(Arena*);\n", - QualifiedClassName(pair.second)); + QualifiedClassName(pair.second, options)); } } private: - std::map classes_; - std::map enums_; + std::map classes_; + std::map enums_; }; static void PublicImportDFS(const FileDescriptor* fd, @@ -1148,42 +1158,46 @@ void FileGenerator::GenerateForwardDeclarations(io::Printer* printer) { std::unordered_set public_set; PublicImportDFS(file_, &public_set); - std::map decls; + std::map decls; for (int i = 0; i < classes.size(); i++) { const Descriptor* d = classes[i]; - if (d && !public_set.count(d->file())) decls[Namespace(d)].AddMessage(d); + if (d && !public_set.count(d->file())) + decls[Namespace(d, options_)].AddMessage(d); } for (int i = 0; i < enums.size(); i++) { const EnumDescriptor* d = enums[i]; - if (d && !public_set.count(d->file())) decls[Namespace(d)].AddEnum(d); + if (d && !public_set.count(d->file())) + decls[Namespace(d, options_)].AddEnum(d); } - NamespaceOpener ns(format); - for (const auto& pair : decls) { - ns.ChangeTo(pair.first); - pair.second.Print(format, options_); + { + NamespaceOpener ns(format); + for (const auto& pair : decls) { + ns.ChangeTo(pair.first); + pair.second.Print(format, options_); + } } - ns.ChangeTo(variables_["proto_ns"]); + format("PROTOBUF_NAMESPACE_OPEN\n"); for (const auto& pair : decls) { - pair.second.PrintTopLevelDecl(format); + pair.second.PrintTopLevelDecl(format, options_); } + format("PROTOBUF_NAMESPACE_CLOSE\n"); } -void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, - const string& filename_identifier) { +void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, bool pb_h) { Formatter format(printer, variables_); // Generate top of header. format( "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" "// source: $filename$\n" "\n" - "#ifndef PROTOBUF_INCLUDED_$1$\n" - "#define PROTOBUF_INCLUDED_$1$\n" + "#ifndef $1$\n" + "#define $1$\n" "\n" "#include \n" "#include \n", - filename_identifier); + IncludeGuard(file_, pb_h, options_)); if (!options_.opensource_runtime && !enum_generators_.empty()) { // Add header to provide std::is_integral for safe Enum_Name() function. format("#include \n"); @@ -1191,10 +1205,10 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, format("\n"); } -void FileGenerator::GenerateBottomHeaderGuard( - io::Printer* printer, const string& filename_identifier) { +void FileGenerator::GenerateBottomHeaderGuard(io::Printer* printer, bool pb_h) { Formatter format(printer, variables_); - format("#endif // PROTOBUF_INCLUDED_$1$\n", filename_identifier); + format("#endif // $GOOGLE_PROTOBUF$_INCLUDED_$1$\n", + IncludeGuard(file_, pb_h, options_)); } void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) { @@ -1302,31 +1316,11 @@ void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) { if (IsAnyMessage(file_, options_)) { IncludeFile("net/proto2/internal/any.h", printer); - } else { - // For Any support with lite protos, we need to friend AnyMetadata, so we - // forward-declare it here. - if (options_.opensource_runtime) { - format( - "namespace google {\n" - "namespace protobuf {\n" - "namespace internal {\n" - "class AnyMetadata;\n" - "} // namespace internal\n" - "} // namespace protobuf\n" - "} // namespace google\n"); - } else { - format( - "namespace google {\nnamespace protobuf {\n" - "namespace internal {\n" - "class AnyMetadata;\n" - "} // namespace internal\n" - "} // namespace protobuf\n} // namespace google\n"); - } } } void FileGenerator::GenerateMetadataPragma(io::Printer* printer, - const string& info_path) { + const std::string& info_path) { Formatter format(printer, variables_); if (!info_path.empty() && !options_.annotation_pragma_name.empty() && !options_.annotation_guard_name.empty()) { @@ -1343,7 +1337,7 @@ void FileGenerator::GenerateMetadataPragma(io::Printer* printer, void FileGenerator::GenerateDependencyIncludes(io::Printer* printer) { Formatter format(printer, variables_); for (int i = 0; i < file_->dependency_count(); i++) { - string basename = StripProto(file_->dependency(i)->name()); + std::string basename = StripProto(file_->dependency(i)->name()); // Do not import weak deps. if (IsDepWeak(file_->dependency(i))) continue; diff --git a/src/google/protobuf/compiler/cpp/cpp_file.h b/src/google/protobuf/compiler/cpp/cpp_file.h index 315cf139be..a7308ab995 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.h +++ b/src/google/protobuf/compiler/cpp/cpp_file.h @@ -94,14 +94,15 @@ class FileGenerator { void IncludeFile(const std::string& google3_name, io::Printer* printer) { DoIncludeFile(google3_name, false, printer); } - void IncludeFileAndExport(const std::string& google3_name, io::Printer* printer) { + void IncludeFileAndExport(const std::string& google3_name, + io::Printer* printer) { DoIncludeFile(google3_name, true, printer); } void DoIncludeFile(const std::string& google3_name, bool do_export, io::Printer* printer); std::string CreateHeaderInclude(const std::string& basename, - const FileDescriptor* file); + const FileDescriptor* file); void GenerateInternalForwardDeclarations( const std::vector& fields, const Options& options, MessageSCCAnalyzer* scc_analyzer, io::Printer* printer); @@ -116,10 +117,8 @@ class FileGenerator { void GenerateForwardDeclarations(io::Printer* printer); // Generates top or bottom of a header file. - void GenerateTopHeaderGuard(io::Printer* printer, - const std::string& filename_identifier); - void GenerateBottomHeaderGuard(io::Printer* printer, - const std::string& filename_identifier); + void GenerateTopHeaderGuard(io::Printer* printer, bool pb_h); + void GenerateBottomHeaderGuard(io::Printer* printer, bool pb_h); // Generates #include directives. void GenerateLibraryIncludes(io::Printer* printer); @@ -127,7 +126,8 @@ class FileGenerator { // Generate a pragma to pull in metadata using the given info_path (if // non-empty). info_path should be relative to printer's output. - void GenerateMetadataPragma(io::Printer* printer, const std::string& info_path); + void GenerateMetadataPragma(io::Printer* printer, + const std::string& info_path); // Generates a couple of different pieces before definitions: void GenerateGlobalStateFunctionDeclarations(io::Printer* printer); diff --git a/src/google/protobuf/compiler/cpp/cpp_generator.cc b/src/google/protobuf/compiler/cpp/cpp_generator.cc index e4ec690a03..fe7131fe80 100644 --- a/src/google/protobuf/compiler/cpp/cpp_generator.cc +++ b/src/google/protobuf/compiler/cpp/cpp_generator.cc @@ -56,10 +56,10 @@ CppGenerator::CppGenerator() {} CppGenerator::~CppGenerator() {} bool CppGenerator::Generate(const FileDescriptor* file, - const string& parameter, + const std::string& parameter, GeneratorContext* generator_context, - string* error) const { - std::vector > options; + std::string* error) const { + std::vector > options; ParseGeneratorParameter(parameter, &options); // ----------------------------------------------------------------- @@ -125,7 +125,7 @@ bool CppGenerator::Generate(const FileDescriptor* file, // ----------------------------------------------------------------- - string basename = StripProto(file->name()); + std::string basename = StripProto(file->name()); if (MaybeBootstrap(file_options, generator_context, file_options.bootstrap, &basename)) { @@ -141,7 +141,7 @@ bool CppGenerator::Generate(const FileDescriptor* file, GeneratedCodeInfo annotations; io::AnnotationProtoCollector annotation_collector( &annotations); - string info_path = basename + ".proto.h.meta"; + std::string info_path = basename + ".proto.h.meta"; io::Printer printer(output.get(), '$', file_options.annotate_headers ? &annotation_collector : NULL); @@ -160,7 +160,7 @@ bool CppGenerator::Generate(const FileDescriptor* file, GeneratedCodeInfo annotations; io::AnnotationProtoCollector annotation_collector( &annotations); - string info_path = basename + ".pb.h.meta"; + std::string info_path = basename + ".pb.h.meta"; io::Printer printer(output.get(), '$', file_options.annotate_headers ? &annotation_collector : NULL); diff --git a/src/google/protobuf/compiler/cpp/cpp_generator.h b/src/google/protobuf/compiler/cpp/cpp_generator.h index 469af9c612..dafc6e60e0 100644 --- a/src/google/protobuf/compiler/cpp/cpp_generator.h +++ b/src/google/protobuf/compiler/cpp/cpp_generator.h @@ -80,10 +80,8 @@ class PROTOC_EXPORT CppGenerator : public CodeGenerator { } // implements CodeGenerator ---------------------------------------- - bool Generate(const FileDescriptor* file, - const std::string& parameter, - GeneratorContext* generator_context, - std::string* error) const; + bool Generate(const FileDescriptor* file, const std::string& parameter, + GeneratorContext* generator_context, std::string* error) const; private: bool opensource_runtime_ = true; diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc index a3bd81f3fc..b502618eac 100644 --- a/src/google/protobuf/compiler/cpp/cpp_helpers.cc +++ b/src/google/protobuf/compiler/cpp/cpp_helpers.cc @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -68,11 +69,11 @@ static const char kAnyMessageName[] = "Any"; static const char kAnyProtoFile[] = "google/protobuf/any.proto"; static const char kGoogleProtobufPrefix[] = "google/protobuf/"; -string DotsToUnderscores(const string& name) { +std::string DotsToUnderscores(const std::string& name) { return StringReplace(name, ".", "_", true); } -string DotsToColons(const string& name) { +std::string DotsToColons(const std::string& name) { return StringReplace(name, ".", "::", true); } @@ -161,15 +162,15 @@ static const char* const kKeywordList[] = { // "xor", "xor_eq"}; -static std::unordered_set* MakeKeywordsMap() { - auto* result = new std::unordered_set(); +static std::unordered_set* MakeKeywordsMap() { + auto* result = new std::unordered_set(); for (const auto keyword : kKeywordList) { result->emplace(keyword); } return result; } -static std::unordered_set& kKeywords = *MakeKeywordsMap(); +static std::unordered_set& kKeywords = *MakeKeywordsMap(); // Returns whether the provided descriptor has an extension. This includes its // nested types. @@ -200,8 +201,8 @@ char Base63Char(int value) { // Given a c identifier has 63 legal characters we can't implement base64 // encoding. So we return the k least significant "digits" in base 63. template -string Base63(I n, int k) { - string res; +std::string Base63(I n, int k) { + std::string res; while (k-- > 0) { res += Base63Char(static_cast(n % 63)); n /= 63; @@ -209,27 +210,23 @@ string Base63(I n, int k) { return res; } -string IntTypeName(const Options& options, const string& type) { +std::string IntTypeName(const Options& options, const std::string& type) { if (options.opensource_runtime) { - return "::google::protobuf::" + type; + return "::PROTOBUF_NAMESPACE_ID::" + type; } else { return "::" + type; } } -string StringTypeName(const Options& options) { - return options.opensource_runtime ? "::std::string" : "::std::string"; -} - -void SetIntVar(const Options& options, const string& type, - std::map* variables) { +void SetIntVar(const Options& options, const std::string& type, + std::map* variables) { (*variables)[type] = IntTypeName(options, type); } } // namespace void SetCommonVars(const Options& options, - std::map* variables) { + std::map* variables) { (*variables)["proto_ns"] = ProtobufNamespace(options); // Warning: there is some clever naming/splitting here to avoid extract script @@ -262,11 +259,12 @@ void SetCommonVars(const Options& options, SetIntVar(options, "uint64", variables); SetIntVar(options, "int32", variables); SetIntVar(options, "int64", variables); - (*variables)["string"] = StringTypeName(options); + (*variables)["string"] = "std::string"; } -string UnderscoresToCamelCase(const string& input, bool cap_next_letter) { - string result; +std::string UnderscoresToCamelCase(const std::string& input, + bool cap_next_letter) { + std::string result; // Note: I distrust ctype.h due to locales. for (int i = 0; i < input.size(); i++) { if ('a' <= input[i] && input[i] <= 'z') { @@ -319,16 +317,16 @@ bool CanInitializeByZeroing(const FieldDescriptor* field) { } } -string ClassName(const Descriptor* descriptor) { +std::string ClassName(const Descriptor* descriptor) { const Descriptor* parent = descriptor->containing_type(); - string res; + std::string res; if (parent) res += ClassName(parent) + "_"; res += descriptor->name(); if (IsMapEntryMessage(descriptor)) res += "_DoNotUse"; return res; } -string ClassName(const EnumDescriptor* enum_descriptor) { +std::string ClassName(const EnumDescriptor* enum_descriptor) { if (enum_descriptor->containing_type() == nullptr) { return enum_descriptor->name(); } else { @@ -337,43 +335,72 @@ string ClassName(const EnumDescriptor* enum_descriptor) { } } -string QualifiedClassName(const Descriptor* d) { - return Namespace(d) + "::" + ClassName(d); +std::string QualifiedClassName(const Descriptor* d, const Options& options) { + return QualifiedFileLevelSymbol(d->file(), ClassName(d), options); +} + +std::string QualifiedClassName(const EnumDescriptor* d, + const Options& options) { + return QualifiedFileLevelSymbol(d->file(), ClassName(d), options); +} + +std::string QualifiedClassName(const Descriptor* d) { + return QualifiedClassName(d, Options()); } -string QualifiedClassName(const EnumDescriptor* d) { - return Namespace(d) + "::" + ClassName(d); +std::string QualifiedClassName(const EnumDescriptor* d) { + return QualifiedClassName(d, Options()); } -string Namespace(const string& package) { +std::string Namespace(const std::string& package) { if (package.empty()) return ""; return "::" + DotsToColons(package); } -string Namespace(const Descriptor* d) { return Namespace(d->file()); } +std::string Namespace(const FileDescriptor* d, const Options& options) { + std::string ret = Namespace(d->package()); + if (IsWellKnownMessage(d) && options.opensource_runtime) { + // Written with string concatenation to prevent rewriting of + // ::google::protobuf. + ret = StringReplace(ret, "::google::" "protobuf", "PROTOBUF_NAMESPACE_ID", + false); + } + return ret; +} + +std::string Namespace(const Descriptor* d, const Options& options) { + return Namespace(d->file(), options); +} -string Namespace(const FieldDescriptor* d) { return Namespace(d->file()); } +std::string Namespace(const FieldDescriptor* d, const Options& options) { + return Namespace(d->file(), options); +} -string Namespace(const EnumDescriptor* d) { return Namespace(d->file()); } +std::string Namespace(const EnumDescriptor* d, const Options& options) { + return Namespace(d->file(), options); +} -string DefaultInstanceName(const Descriptor* descriptor) { - string prefix = descriptor->file()->package().empty() ? "" : "::"; - return prefix + DotsToColons(descriptor->file()->package()) + "::_" + - ClassName(descriptor, false) + "_default_instance_"; +std::string DefaultInstanceName(const Descriptor* descriptor, + const Options& options) { + return QualifiedFileLevelSymbol( + descriptor->file(), + "_" + ClassName(descriptor, false) + "_default_instance_", options); } -string ReferenceFunctionName(const Descriptor* descriptor) { - return QualifiedClassName(descriptor) + "_ReferenceStrong"; +std::string ReferenceFunctionName(const Descriptor* descriptor, + const Options& options) { + return QualifiedClassName(descriptor, options) + "_ReferenceStrong"; } -string SuperClassName(const Descriptor* descriptor, const Options& options) { +std::string SuperClassName(const Descriptor* descriptor, + const Options& options) { return "::" + ProtobufNamespace(options) + (HasDescriptorMethods(descriptor->file(), options) ? "::Message" : "::MessageLite"); } -string FieldName(const FieldDescriptor* field) { - string result = field->name(); +std::string FieldName(const FieldDescriptor* field) { + std::string result = field->name(); LowerString(&result); if (kKeywords.count(result) > 0) { result.append("_"); @@ -381,8 +408,8 @@ string FieldName(const FieldDescriptor* field) { return result; } -string EnumValueName(const EnumValueDescriptor* enum_value) { - string result = enum_value->name(); +std::string EnumValueName(const EnumValueDescriptor* enum_value) { + std::string result = enum_value->name(); if (kKeywords.count(result) > 0) { result.append("_"); } @@ -413,9 +440,9 @@ int EstimateAlignmentSize(const FieldDescriptor* field) { return -1; // Make compiler happy. } -string FieldConstantName(const FieldDescriptor* field) { - string field_name = UnderscoresToCamelCase(field->name(), true); - string result = "k" + field_name + "FieldNumber"; +std::string FieldConstantName(const FieldDescriptor* field) { + std::string field_name = UnderscoresToCamelCase(field->name(), true); + std::string result = "k" + field_name + "FieldNumber"; if (!field->is_extension() && field->containing_type()->FindFieldByCamelcaseName( @@ -429,13 +456,14 @@ string FieldConstantName(const FieldDescriptor* field) { return result; } -string FieldMessageTypeName(const FieldDescriptor* field) { +std::string FieldMessageTypeName(const FieldDescriptor* field, + const Options& options) { // Note: The Google-internal version of Protocol Buffers uses this function // as a hook point for hacks to support legacy code. - return ClassName(field->message_type(), true); + return QualifiedClassName(field->message_type(), options); } -string StripProto(const string& filename) { +std::string StripProto(const std::string& filename) { if (HasSuffixString(filename, ".protodevel")) { return StripSuffixString(filename, ".protodevel"); } else { @@ -462,7 +490,7 @@ const char* PrimitiveTypeName(FieldDescriptor::CppType type) { case FieldDescriptor::CPPTYPE_ENUM: return "int"; case FieldDescriptor::CPPTYPE_STRING: - return "::std::string"; + return "std::string"; case FieldDescriptor::CPPTYPE_MESSAGE: return nullptr; @@ -474,8 +502,8 @@ const char* PrimitiveTypeName(FieldDescriptor::CppType type) { return nullptr; } -string PrimitiveTypeName(const Options& options, - FieldDescriptor::CppType type) { +std::string PrimitiveTypeName(const Options& options, + FieldDescriptor::CppType type) { switch (type) { case FieldDescriptor::CPPTYPE_INT32: return IntTypeName(options, "int32"); @@ -494,7 +522,7 @@ string PrimitiveTypeName(const Options& options, case FieldDescriptor::CPPTYPE_ENUM: return "int"; case FieldDescriptor::CPPTYPE_STRING: - return StringTypeName(options); + return "std::string"; case FieldDescriptor::CPPTYPE_MESSAGE: return ""; @@ -554,7 +582,7 @@ const char* DeclaredTypeMethodName(FieldDescriptor::Type type) { return ""; } -string Int32ToString(int number) { +std::string Int32ToString(int number) { if (number == kint32min) { // This needs to be special-cased, see explanation here: // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52661 @@ -564,7 +592,7 @@ string Int32ToString(int number) { } } -string Int64ToString(const string& macro_prefix, int64 number) { +std::string Int64ToString(const std::string& macro_prefix, int64 number) { if (number == kint64min) { // This needs to be special-cased, see explanation here: // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52661 @@ -573,11 +601,11 @@ string Int64ToString(const string& macro_prefix, int64 number) { return StrCat(macro_prefix, "_LONGLONG(", number, ")"); } -string UInt64ToString(const string& macro_prefix, uint64 number) { +std::string UInt64ToString(const std::string& macro_prefix, uint64 number) { return StrCat(macro_prefix, "_ULONGLONG(", number, ")"); } -string DefaultValue(const FieldDescriptor* field) { +std::string DefaultValue(const FieldDescriptor* field) { switch (field->cpp_type()) { case FieldDescriptor::CPPTYPE_INT64: return Int64ToString("GG", field->default_value_int64()); @@ -588,7 +616,7 @@ string DefaultValue(const FieldDescriptor* field) { } } -string DefaultValue(const Options& options, const FieldDescriptor* field) { +std::string DefaultValue(const Options& options, const FieldDescriptor* field) { switch (field->cpp_type()) { case FieldDescriptor::CPPTYPE_INT32: return Int32ToString(field->default_value_int32()); @@ -619,7 +647,7 @@ string DefaultValue(const Options& options, const FieldDescriptor* field) { } else if (value != value) { return "std::numeric_limits::quiet_NaN()"; } else { - string float_value = SimpleFtoa(value); + std::string float_value = SimpleFtoa(value); // If floating point value contains a period (.) or an exponent // (either E or e), then append suffix 'f' to make it a float // literal. @@ -642,7 +670,7 @@ string DefaultValue(const Options& options, const FieldDescriptor* field) { EscapeTrigraphs(CEscape(field->default_value_string())) + "\""; case FieldDescriptor::CPPTYPE_MESSAGE: - return "*" + FieldMessageTypeName(field) + + return "*" + FieldMessageTypeName(field, options) + "::internal_default_instance()"; } // Can't actually get here; make compiler happy. (We could add a default @@ -653,8 +681,8 @@ string DefaultValue(const Options& options, const FieldDescriptor* field) { } // Convert a file name into a valid identifier. -string FilenameIdentifier(const string& filename) { - string result; +std::string FilenameIdentifier(const std::string& filename) { + std::string result; for (int i = 0; i < filename.size(); i++) { if (ascii_isalnum(filename[i])) { result.push_back(filename[i]); @@ -667,31 +695,34 @@ string FilenameIdentifier(const string& filename) { return result; } -string UniqueName(const string& name, const string& filename, +string UniqueName(const std::string& name, const std::string& filename, const Options& options) { return name + "_" + FilenameIdentifier(filename); } // Return the qualified C++ name for a file level symbol. -string QualifiedFileLevelSymbol(const string& package, const string& name) { - if (package.empty()) { +std::string QualifiedFileLevelSymbol(const FileDescriptor* file, + const std::string& name, + const Options& options) { + if (file->package().empty()) { return StrCat("::", name); } - return StrCat("::", DotsToColons(package), "::", name); + return StrCat(Namespace(file, options), "::", name); } // Escape C++ trigraphs by escaping question marks to \? -string EscapeTrigraphs(const string& to_escape) { +std::string EscapeTrigraphs(const std::string& to_escape) { return StringReplace(to_escape, "?", "\\?", true); } // Escaped function name to eliminate naming conflict. -string SafeFunctionName(const Descriptor* descriptor, - const FieldDescriptor* field, const string& prefix) { +std::string SafeFunctionName(const Descriptor* descriptor, + const FieldDescriptor* field, + const std::string& prefix) { // Do not use FieldName() since it will escape keywords. - string name = field->name(); + std::string name = field->name(); LowerString(&name); - string function_name = prefix + name; + std::string function_name = prefix + name; if (descriptor->FindFieldByName(function_name)) { // Single underscore will also make it conflicting with the private data // member. We use double underscore to escape function names. @@ -920,8 +951,22 @@ bool IsAnyMessage(const Descriptor* descriptor, const Options& options) { IsAnyMessage(descriptor->file(), options); } -bool IsWellKnownMessage(const FileDescriptor* descriptor) { - return !descriptor->name().compare(0, 16, kGoogleProtobufPrefix); +bool IsWellKnownMessage(const FileDescriptor* file) { + static const std::unordered_set well_known_files{ + "google/protobuf/any.proto", + "google/protobuf/api.proto", + "google/protobuf/compiler/plugin.proto", + "google/protobuf/descriptor.proto", + "google/protobuf/duration.proto", + "google/protobuf/empty.proto", + "google/protobuf/field_mask.proto", + "google/protobuf/source_context.proto", + "google/protobuf/struct.proto", + "google/protobuf/timestamp.proto", + "google/protobuf/type.proto", + "google/protobuf/wrappers.proto", + }; + return well_known_files.find(file->name()) != well_known_files.end(); } enum Utf8CheckMode { @@ -955,7 +1000,8 @@ static Utf8CheckMode GetUtf8CheckMode(const FieldDescriptor* field, } } -string GetUtf8Suffix(const FieldDescriptor* field, const Options& options) { +std::string GetUtf8Suffix(const FieldDescriptor* field, + const Options& options) { switch (GetUtf8CheckMode(field, options)) { case STRICT: return "UTF8"; @@ -1179,13 +1225,13 @@ void ListAllTypesForServices(const FileDescriptor* fd, } } -bool GetBootstrapBasename(const Options& options, const string& basename, - string* bootstrap_basename) { +bool GetBootstrapBasename(const Options& options, const std::string& basename, + std::string* bootstrap_basename) { if (options.opensource_runtime || options.lite_implicit_weak_fields) { return false; } - std::unordered_map bootstrap_mapping{ + std::unordered_map bootstrap_mapping{ {"net/proto2/proto/descriptor", "net/proto2/internal/descriptor"}, {"net/proto2/compiler/proto/plugin", @@ -1204,13 +1250,13 @@ bool GetBootstrapBasename(const Options& options, const string& basename, } bool IsBootstrapProto(const Options& options, const FileDescriptor* file) { - string my_name = StripProto(file->name()); + std::string my_name = StripProto(file->name()); return GetBootstrapBasename(options, my_name, &my_name); } bool MaybeBootstrap(const Options& options, GeneratorContext* generator_context, - bool bootstrap_flag, string* basename) { - string bootstrap_basename; + bool bootstrap_flag, std::string* basename) { + std::string bootstrap_basename; if (!GetBootstrapBasename(options, *basename, &bootstrap_basename)) { return false; } @@ -1220,7 +1266,7 @@ bool MaybeBootstrap(const Options& options, GeneratorContext* generator_context, *basename = bootstrap_basename; return false; } else { - string forward_to_basename = bootstrap_basename; + std::string forward_to_basename = bootstrap_basename; // Generate forwarding headers and empty .pb.cc. { @@ -1305,7 +1351,7 @@ class ParseLoopGenerator { format_.Set("GOOGLE_PROTOBUF", MacroPrefix(options_)); format_.Set("kSlopBytes", static_cast(internal::ParseContext::kSlopBytes)); - std::map vars; + std::map vars; SetCommonVars(options_, &vars); format_.AddMap(vars); @@ -1324,6 +1370,7 @@ class ParseLoopGenerator { format_( "const char* $classname$::_InternalParse(const char* ptr, " "$pi_ns$::ParseContext* ctx) {\n" + " $p_ns$::Arena* arena = GetArena(); (void)arena;\n" " while (!ctx->Done(&ptr)) {\n" " $uint32$ tag;\n" " ptr = $pi_ns$::ReadTag(ptr, &tag);\n" @@ -1338,7 +1385,7 @@ class ParseLoopGenerator { // Print the field's (or oneof's) proto-syntax definition as a comment. // We don't want to print group bodies so we cut off after the first // line. - string def; + std::string def; { DebugStringOptions options; options.elide_group_body = true; @@ -1419,20 +1466,30 @@ class ParseLoopGenerator { using WireFormat = internal::WireFormat; using WireFormatLite = internal::WireFormatLite; - void GenerateArenaString(const FieldDescriptor* field, const string& utf8, - const string& field_name) { + void GenerateArenaString(const FieldDescriptor* field, + const std::string& utf8, std::string field_name) { + if (!field_name.empty()) { + format_("static const char kFieldName[] = $1$;\n", + field_name.substr(2)); // remove ", " + field_name = ", kFieldName"; + } + format_("if (arena != nullptr) {\n"); if (HasFieldPresence(field->file())) { - format_("HasBitSetters::set_has_$1$(this);\n", FieldName(field)); + format_(" HasBitSetters::set_has_$1$(this);\n", FieldName(field)); } format_( - "ptr = $pi_ns$::InlineCopyIntoArenaString$1$(&$2$_, ptr, ctx, " - "GetArenaNoVirtual()$3$);\n", - utf8, FieldName(field), field_name); + " ptr = $pi_ns$::InlineCopyIntoArenaString$1$(&$2$_, ptr, ctx, " + " arena$3$);\n" + "} else {\n" + " ptr = $pi_ns$::InlineGreedyStringParser$1$($4$_$2$(), ptr, ctx$3$);" + "\n}\n", + utf8, FieldName(field), field_name, + field->is_repeated() ? "add" : "mutable"); } void GenerateStrings(const FieldDescriptor* field, bool check_utf8) { - string utf8; - string field_name; + std::string utf8; + std::string field_name; if (check_utf8) { utf8 = GetUtf8Suffix(field, options_); if (!utf8.empty()) { @@ -1463,7 +1520,7 @@ class ParseLoopGenerator { GenerateArenaString(field, utf8, field_name); return; } - string name; + std::string name; switch (ctype) { case FieldOptions::STRING: name = "GreedyStringParser" + utf8; @@ -1483,11 +1540,11 @@ class ParseLoopGenerator { void GenerateLengthDelim(const FieldDescriptor* field) { if (!IsProto1(field->file(), options_) && field->is_packable()) { - string enum_validator; - if (!HasPreservingUnknownEnumSemantics(field->file()) && - field->type() == FieldDescriptor::TYPE_ENUM) { + std::string enum_validator; + if (field->type() == FieldDescriptor::TYPE_ENUM && + !HasPreservingUnknownEnumSemantics(field)) { enum_validator = StrCat( - ", ", QualifiedClassName(field->enum_type()), + ", ", QualifiedClassName(field->enum_type(), options_), "_IsValid, mutable_unknown_fields(), ", field->number()); } format_( @@ -1515,7 +1572,21 @@ class ParseLoopGenerator { break; case FieldDescriptor::TYPE_MESSAGE: { if (!IsProto1(field->file(), options_) && field->is_map()) { - format_("ptr = ctx->ParseMessage(&$1$_, ptr);\n", FieldName(field)); + const FieldDescriptor* val = + field->message_type()->FindFieldByName("value"); + GOOGLE_CHECK(val); + if (HasFieldPresence(field->file()) && + val->type() == FieldDescriptor::TYPE_ENUM) { + format_( + "auto object = ::$proto_ns$::internal::InitEnumParseWrapper(" + "&$1$_, $2$_IsValid, $3$, &_internal_metadata_);\n" + "ptr = ctx->ParseMessage(&object, ptr);\n", + FieldName(field), QualifiedClassName(val->enum_type()), + field->number()); + } else { + format_("ptr = ctx->ParseMessage(&$1$_, ptr);\n", + FieldName(field)); + } } else if (!IsProto1(field->file(), options_) && IsLazy(field, options_)) { if (field->containing_oneof() != nullptr) { @@ -1550,7 +1621,7 @@ class ParseLoopGenerator { "CastToBase(&$1$_)->AddWeak(reinterpret_cast(&$2$::_$3$_default_instance_)), " "ptr);\n", - FieldName(field), Namespace(field->message_type()), + FieldName(field), Namespace(field->message_type(), options_), ClassName(field->message_type())); } } else if (IsWeak(field, options_)) { @@ -1587,27 +1658,28 @@ class ParseLoopGenerator { } switch (wiretype) { case WireFormatLite::WIRETYPE_VARINT: { - string type = PrimitiveTypeName(options_, field->cpp_type()); - string prefix = field->is_repeated() ? "add" : "set"; + std::string type = PrimitiveTypeName(options_, field->cpp_type()); + std::string prefix = field->is_repeated() ? "add" : "set"; if (field->type() == FieldDescriptor::TYPE_ENUM && !IsProto1(field->file(), options_)) { format_( "$uint64$ val = $pi_ns$::ReadVarint(&ptr);\n" "$GOOGLE_PROTOBUF$_PARSER_ASSERT(ptr);\n"); - if (!HasPreservingUnknownEnumSemantics(field->file())) { + if (!HasPreservingUnknownEnumSemantics(field)) { format_( "if (!$1$_IsValid(val)) {\n" " $pi_ns$::WriteVarint($2$, val, " "mutable_unknown_fields());\n" " break;\n" "}\n", - QualifiedClassName(field->enum_type()), field->number()); + QualifiedClassName(field->enum_type(), options_), + field->number()); } format_("$1$_$2$(static_cast<$3$>(val));\n", prefix, FieldName(field), - QualifiedClassName(field->enum_type())); + QualifiedClassName(field->enum_type(), options_)); } else { int size = field->type() == FieldDescriptor::TYPE_SINT32 ? 32 : 64; - string zigzag; + std::string zigzag; if ((field->type() == FieldDescriptor::TYPE_SINT32 || field->type() == FieldDescriptor::TYPE_SINT64) && !IsProto1(field->file(), options_)) { @@ -1622,8 +1694,8 @@ class ParseLoopGenerator { } case WireFormatLite::WIRETYPE_FIXED32: case WireFormatLite::WIRETYPE_FIXED64: { - string prefix = field->is_repeated() ? "add" : "set"; - string type = PrimitiveTypeName(options_, field->cpp_type()); + std::string prefix = field->is_repeated() ? "add" : "set"; + std::string type = PrimitiveTypeName(options_, field->cpp_type()); format_( "$1$_$2$($pi_ns$::UnalignedLoad<$3$>(ptr));\n" "ptr += sizeof($3$);\n", diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h index 21521f8a91..2e4ba4f35e 100644 --- a/src/google/protobuf/compiler/cpp/cpp_helpers.h +++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h @@ -49,8 +49,8 @@ #include #include -#include +#include namespace google { namespace protobuf { @@ -58,14 +58,15 @@ namespace compiler { namespace cpp { inline std::string ProtobufNamespace(const Options& options) { - return options.opensource_runtime ? "google::protobuf" : "proto2"; + return "PROTOBUF_NAMESPACE_ID"; } inline std::string MacroPrefix(const Options& options) { return options.opensource_runtime ? "GOOGLE_PROTOBUF" : "GOOGLE_PROTOBUF"; } -inline std::string DeprecatedAttribute(const Options& options, bool deprecated) { +inline std::string DeprecatedAttribute(const Options& options, + bool deprecated) { return deprecated ? "PROTOBUF_DEPRECATED " : ""; } @@ -78,7 +79,8 @@ inline bool IsProto1(const FileDescriptor* file, const Options& options) { return false; } -void SetCommonVars(const Options& options, std::map* variables); +void SetCommonVars(const Options& options, + std::map* variables); bool GetBootstrapBasename(const Options& options, const std::string& basename, std::string* bootstrap_basename); @@ -90,14 +92,10 @@ bool IsBootstrapProto(const Options& options, const FileDescriptor* file); // "::some_name" is the correct fully qualified namespace. // This means if the package is empty the namespace is "", and otherwise // the namespace is "::foo::bar::...::baz" without trailing semi-colons. -std::string Namespace(const std::string& package); -inline std::string Namespace(const FileDescriptor* d) { - return Namespace(d->package()); -} - -std::string Namespace(const Descriptor* d); -std::string Namespace(const FieldDescriptor* d); -std::string Namespace(const EnumDescriptor* d); +std::string Namespace(const FileDescriptor* d, const Options& options); +std::string Namespace(const Descriptor* d, const Options& options); +std::string Namespace(const FieldDescriptor* d, const Options& options); +std::string Namespace(const EnumDescriptor* d, const Options& options); // Returns true if it's safe to reset "field" to zero. bool CanInitializeByZeroing(const FieldDescriptor* field); @@ -105,6 +103,9 @@ bool CanInitializeByZeroing(const FieldDescriptor* field); std::string ClassName(const Descriptor* descriptor); std::string ClassName(const EnumDescriptor* enum_descriptor); +std::string QualifiedClassName(const Descriptor* d, const Options& options); +std::string QualifiedClassName(const EnumDescriptor* d, const Options& options); + std::string QualifiedClassName(const Descriptor* d); std::string QualifiedClassName(const EnumDescriptor* d); @@ -119,23 +120,28 @@ std::string QualifiedClassName(const EnumDescriptor* d); // While the non-qualified version would be: // Baz_Qux inline std::string ClassName(const Descriptor* descriptor, bool qualified) { - return qualified ? QualifiedClassName(descriptor) : ClassName(descriptor); + return qualified ? QualifiedClassName(descriptor, Options()) + : ClassName(descriptor); } inline std::string ClassName(const EnumDescriptor* descriptor, bool qualified) { - return qualified ? QualifiedClassName(descriptor) : ClassName(descriptor); + return qualified ? QualifiedClassName(descriptor, Options()) + : ClassName(descriptor); } // Fully qualified name of the default_instance of this message. -std::string DefaultInstanceName(const Descriptor* descriptor); +std::string DefaultInstanceName(const Descriptor* descriptor, + const Options& options); // Returns the name of a no-op function that we can call to introduce a linker // dependency on the given message type. This is used to implement implicit weak // fields. -std::string ReferenceFunctionName(const Descriptor* descriptor); +std::string ReferenceFunctionName(const Descriptor* descriptor, + const Options& options); // Name of the base class: google::protobuf::Message or google::protobuf::MessageLite. -std::string SuperClassName(const Descriptor* descriptor, const Options& options); +std::string SuperClassName(const Descriptor* descriptor, + const Options& options); // Get the (unqualified) name that should be used for this field in C++ code. // The name is coerced to lower-case to emulate proto1 behavior. People @@ -154,7 +160,7 @@ int EstimateAlignmentSize(const FieldDescriptor* field); // Get the unqualified name that should be used for a field's field // number constant. -std::string FieldConstantName(const FieldDescriptor *field); +std::string FieldConstantName(const FieldDescriptor* field); // Returns the scope where the field was defined (for extensions, this is // different from the message type to which the field applies). @@ -165,14 +171,16 @@ inline const Descriptor* FieldScope(const FieldDescriptor* field) { // Returns the fully-qualified type name field->message_type(). Usually this // is just ClassName(field->message_type(), true); -std::string FieldMessageTypeName(const FieldDescriptor* field); +std::string FieldMessageTypeName(const FieldDescriptor* field, + const Options& options); // Strips ".proto" or ".protodevel" from the end of a filename. PROTOC_EXPORT std::string StripProto(const std::string& filename); // Get the C++ type name for a primitive type (e.g. "double", "::google::protobuf::int32", etc.). const char* PrimitiveTypeName(FieldDescriptor::CppType type); -std::string PrimitiveTypeName(const Options& options, FieldDescriptor::CppType type); +std::string PrimitiveTypeName(const Options& options, + FieldDescriptor::CppType type); // Get the declared type name in CamelCase format, as is used e.g. for the // methods of WireFormat. For example, TYPE_INT32 becomes "Int32". @@ -196,21 +204,22 @@ std::string FilenameIdentifier(const std::string& filename); // For each .proto file generates a unique name. To prevent collisions of // symbols in the global namespace std::string UniqueName(const std::string& name, const std::string& filename, - const Options& options); + const Options& options); inline std::string UniqueName(const std::string& name, const FileDescriptor* d, - const Options& options) { + const Options& options) { return UniqueName(name, d->name(), options); } inline std::string UniqueName(const std::string& name, const Descriptor* d, - const Options& options) { + const Options& options) { return UniqueName(name, d->file(), options); } inline std::string UniqueName(const std::string& name, const EnumDescriptor* d, - const Options& options) { + const Options& options) { return UniqueName(name, d->file(), options); } -inline std::string UniqueName(const std::string& name, const ServiceDescriptor* d, - const Options& options) { +inline std::string UniqueName(const std::string& name, + const ServiceDescriptor* d, + const Options& options) { return UniqueName(name, d->file(), options); } @@ -221,32 +230,38 @@ inline Options InternalRuntimeOptions() { options.opensource_runtime = false; return options; } -inline std::string UniqueName(const std::string& name, const std::string& filename) { +inline std::string UniqueName(const std::string& name, + const std::string& filename) { return UniqueName(name, filename, InternalRuntimeOptions()); } -inline std::string UniqueName(const std::string& name, const FileDescriptor* d) { +inline std::string UniqueName(const std::string& name, + const FileDescriptor* d) { return UniqueName(name, d->name(), InternalRuntimeOptions()); } inline std::string UniqueName(const std::string& name, const Descriptor* d) { return UniqueName(name, d->file(), InternalRuntimeOptions()); } -inline std::string UniqueName(const std::string& name, const EnumDescriptor* d) { +inline std::string UniqueName(const std::string& name, + const EnumDescriptor* d) { return UniqueName(name, d->file(), InternalRuntimeOptions()); } -inline std::string UniqueName(const std::string& name, const ServiceDescriptor* d) { +inline std::string UniqueName(const std::string& name, + const ServiceDescriptor* d) { return UniqueName(name, d->file(), InternalRuntimeOptions()); } // Return the qualified C++ name for a file level symbol. -std::string QualifiedFileLevelSymbol(const std::string& package, const std::string& name); +std::string QualifiedFileLevelSymbol(const FileDescriptor* file, + const std::string& name, + const Options& options); // Escape C++ trigraphs by escaping question marks to \? std::string EscapeTrigraphs(const std::string& to_escape); // Escaped function name to eliminate naming conflict. std::string SafeFunctionName(const Descriptor* descriptor, - const FieldDescriptor* field, - const std::string& prefix); + const FieldDescriptor* field, + const std::string& prefix); // Returns true if generated messages have public unknown fields accessors inline bool PublicUnknownFieldsAccessors(const Descriptor* message) { @@ -377,7 +392,8 @@ inline bool IsMapEntryMessage(const Descriptor* descriptor) { // Returns true if the field's CPPTYPE is string or message. bool IsStringOrMessage(const FieldDescriptor* field); -std::string UnderscoresToCamelCase(const std::string& input, bool cap_next_letter); +std::string UnderscoresToCamelCase(const std::string& input, + bool cap_next_letter); inline bool HasFieldPresence(const FileDescriptor* file) { return file->syntax() != FileDescriptor::SYNTAX_PROTO3; @@ -385,8 +401,8 @@ inline bool HasFieldPresence(const FileDescriptor* file) { // Returns true if 'enum' semantics are such that unknown values are preserved // in the enum field itself, rather than going to the UnknownFieldSet. -inline bool HasPreservingUnknownEnumSemantics(const FileDescriptor* file) { - return file->syntax() == FileDescriptor::SYNTAX_PROTO3; +inline bool HasPreservingUnknownEnumSemantics(const FieldDescriptor* field) { + return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3; } inline bool SupportsArenas(const FileDescriptor* file) { @@ -420,6 +436,30 @@ bool IsAnyMessage(const Descriptor* descriptor, const Options& options); bool IsWellKnownMessage(const FileDescriptor* descriptor); +inline std::string IncludeGuard(const FileDescriptor* file, bool pb_h, + const Options& options) { + // If we are generating a .pb.h file and the proto_h option is enabled, then + // the .pb.h gets an extra suffix. + std::string filename_identifier = FilenameIdentifier( + file->name() + (pb_h && options.proto_h ? ".pb.h" : "")); + + if (IsWellKnownMessage(file)) { + // For well-known messages we need third_party/protobuf and net/proto2 to + // have distinct include guards, because some source files include both and + // both need to be defined (the third_party copies will be in the + // google::protobuf_opensource namespace). + return MacroPrefix(options) + "_INCLUDED_" + filename_identifier; + } else { + // Ideally this case would use distinct include guards for opensource and + // google3 protos also. (The behavior of "first #included wins" is not + // ideal). But unfortunately some legacy code includes both and depends on + // the identical include guards to avoid compile errors. + // + // We should clean this up so that this case can be removed. + return "GOOGLE_PROTOBUF_INCLUDED_" + filename_identifier; + } +} + inline FileOptions_OptimizeMode GetOptimizeFor(const FileDescriptor* file, const Options& options) { switch (options.enforce_mode) { @@ -553,7 +593,8 @@ bool IsImplicitWeakField(const FieldDescriptor* field, const Options& options, class PROTOC_EXPORT Formatter { public: explicit Formatter(io::Printer* printer) : printer_(printer) {} - Formatter(io::Printer* printer, const std::map& vars) + Formatter(io::Printer* printer, + const std::map& vars) : printer_(printer), vars_(vars) {} template @@ -600,7 +641,9 @@ class PROTOC_EXPORT Formatter { static std::string ToString(const FieldDescriptor* d) { return Payload(d); } static std::string ToString(const Descriptor* d) { return Payload(d); } static std::string ToString(const EnumDescriptor* d) { return Payload(d); } - static std::string ToString(const EnumValueDescriptor* d) { return Payload(d); } + static std::string ToString(const EnumValueDescriptor* d) { + return Payload(d); + } template static std::string Payload(const Descriptor* descriptor) { @@ -635,11 +678,19 @@ class PROTOC_EXPORT NamespaceOpener { common_idx++; } for (int i = name_stack_.size() - 1; i >= common_idx; i--) { - printer_->Print("} // namespace $ns$\n", "ns", name_stack_[i]); + if (name_stack_[i] == "PROTOBUF_NAMESPACE_ID") { + printer_->Print("PROTOBUF_NAMESPACE_CLOSE\n"); + } else { + printer_->Print("} // namespace $ns$\n", "ns", name_stack_[i]); + } } name_stack_.swap(new_stack_); for (int i = common_idx; i < name_stack_.size(); i++) { - printer_->Print("namespace $ns$ {\n", "ns", name_stack_[i]); + if (name_stack_[i] == "PROTOBUF_NAMESPACE_ID") { + printer_->Print("PROTOBUF_NAMESPACE_OPEN\n"); + } else { + printer_->Print("namespace $ns$ {\n", "ns", name_stack_[i]); + } } } diff --git a/src/google/protobuf/compiler/cpp/cpp_map_field.cc b/src/google/protobuf/compiler/cpp/cpp_map_field.cc index bc9ca92e86..7ed55307ed 100644 --- a/src/google/protobuf/compiler/cpp/cpp_map_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_map_field.cc @@ -46,7 +46,7 @@ bool IsProto3Field(const FieldDescriptor* field_descriptor) { } void SetMessageVariables(const FieldDescriptor* descriptor, - std::map* variables, + std::map* variables, const Options& options) { SetCommonFieldVariables(descriptor, variables, options); (*variables)["type"] = ClassName(descriptor->message_type(), false); @@ -64,7 +64,7 @@ void SetMessageVariables(const FieldDescriptor* descriptor, (*variables)["key_cpp"] = PrimitiveTypeName(options, key->cpp_type()); switch (val->cpp_type()) { case FieldDescriptor::CPPTYPE_MESSAGE: - (*variables)["val_cpp"] = FieldMessageTypeName(val); + (*variables)["val_cpp"] = FieldMessageTypeName(val, options); (*variables)["wrapper"] = "MapEntryWrapper"; break; case FieldDescriptor::CPPTYPE_ENUM: @@ -176,8 +176,8 @@ GenerateMergeFromCodedStream(io::Printer* printer) const { descriptor_->message_type()->FindFieldByName("key"); const FieldDescriptor* value_field = descriptor_->message_type()->FindFieldByName("value"); - string key; - string value; + std::string key; + std::string value; format( "$map_classname$::Parser< ::$proto_ns$::internal::MapField$lite$<\n" " $map_classname$,\n" @@ -199,7 +199,7 @@ GenerateMergeFromCodedStream(io::Printer* printer) const { value = "entry->value()"; format("auto entry = parser.NewEntry();\n"); format( - "::std::string data;\n" + "std::string data;\n" "DO_(::$proto_ns$::internal::WireFormatLite::ReadString(input, " "&data));\n" "DO_(entry->ParseFromString(data));\n" @@ -241,7 +241,7 @@ GenerateMergeFromCodedStream(io::Printer* printer) const { static void GenerateSerializationLoop(const Formatter& format, bool string_key, bool string_value, bool to_array, bool is_deterministic) { - string ptr; + std::string ptr; if (is_deterministic) { format("for (size_type i = 0; i < n; i++) {\n"); ptr = string_key ? "items[static_cast(i)]" diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index 01ab53ec9a..28543980ea 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -78,7 +78,7 @@ void PrintFieldComment(const Formatter& format, const T* field) { DebugStringOptions options; options.elide_group_body = true; options.elide_oneof_body = true; - string def = field->DebugStringWithOptions(options); + std::string def = field->DebugStringWithOptions(options); format("// $1$\n", def.substr(0, def.find_first_of('\n'))); } @@ -91,7 +91,7 @@ void PrintPresenceCheck(const Formatter& format, const FieldDescriptor* field, *cached_has_bit_index = (has_bit_index / 32); format("cached_has_bits = _has_bits_[$1$];\n", *cached_has_bit_index); } - const string mask = + const std::string mask = StrCat(strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); format("if (cached_has_bits & 0x$1$u) {\n", mask); } else { @@ -164,7 +164,8 @@ bool CanConstructByZeroing(const FieldDescriptor* field, // considered non-default (will be sent over the wire), for message types // without true field presence. Should only be called if // !HasFieldPresence(message_descriptor). -bool EmitFieldNonDefaultCondition(io::Printer* printer, const string& prefix, +bool EmitFieldNonDefaultCondition(io::Printer* printer, + const std::string& prefix, const FieldDescriptor* field) { Formatter format(printer); format.Set("prefix", prefix); @@ -203,15 +204,15 @@ bool HasHasMethod(const FieldDescriptor* field) { // Collects map entry message type information. void CollectMapInfo(const Options& options, const Descriptor* descriptor, - std::map* variables) { + std::map* variables) { GOOGLE_CHECK(IsMapEntryMessage(descriptor)); - std::map& vars = *variables; + std::map& vars = *variables; const FieldDescriptor* key = descriptor->FindFieldByName("key"); const FieldDescriptor* val = descriptor->FindFieldByName("value"); vars["key_cpp"] = PrimitiveTypeName(options, key->cpp_type()); switch (val->cpp_type()) { case FieldDescriptor::CPPTYPE_MESSAGE: - vars["val_cpp"] = FieldMessageTypeName(val); + vars["val_cpp"] = FieldMessageTypeName(val, options); break; case FieldDescriptor::CPPTYPE_ENUM: vars["val_cpp"] = ClassName(val->enum_type(), true); @@ -251,40 +252,40 @@ bool ShouldMarkClassAsFinal(const Descriptor* descriptor, bool ShouldMarkClearAsFinal(const Descriptor* descriptor, const Options& options) { - static std::set exclusions{ + static std::set exclusions{ }; - const string name = ClassName(descriptor, true); + const std::string name = ClassName(descriptor, true); return exclusions.find(name) == exclusions.end() || options.opensource_runtime; } bool ShouldMarkIsInitializedAsFinal(const Descriptor* descriptor, const Options& options) { - static std::set exclusions{ + static std::set exclusions{ }; - const string name = ClassName(descriptor, true); + const std::string name = ClassName(descriptor, true); return exclusions.find(name) == exclusions.end() || options.opensource_runtime; } bool ShouldMarkMergePartialAsFinal(const Descriptor* descriptor, const Options& options) { - static std::set exclusions{ + static std::set exclusions{ }; - const string name = ClassName(descriptor, true); + const std::string name = ClassName(descriptor, true); return exclusions.find(name) == exclusions.end() || options.opensource_runtime; } bool ShouldMarkNewAsFinal(const Descriptor* descriptor, const Options& options) { - static std::set exclusions{ + static std::set exclusions{ }; - const string name = ClassName(descriptor, true); + const std::string name = ClassName(descriptor, true); return exclusions.find(name) == exclusions.end() || options.opensource_runtime; } @@ -342,8 +343,8 @@ bool TableDrivenParsingEnabled(const Descriptor* descriptor, void SetUnknkownFieldsVariable(const Descriptor* descriptor, const Options& options, - std::map* variables) { - string proto_ns = ProtobufNamespace(options); + std::map* variables) { + std::string proto_ns = ProtobufNamespace(options); if (UseUnknownFieldSet(descriptor->file(), options)) { (*variables)["unknown_fields_type"] = "::" + proto_ns + "::UnknownFieldSet"; } else { @@ -508,8 +509,8 @@ class ColdChunkSkipper { // May open an external if check for a batch of cold fields. "from" is the // prefix to _has_bits_ to allow MergeFrom to use "from._has_bits_". // Otherwise, it should be "". - void OnStartChunk(int chunk, int cached_has_bit_index, const string& from, - io::Printer* printer); + void OnStartChunk(int chunk, int cached_has_bit_index, + const std::string& from, io::Printer* printer); bool OnEndChunk(int chunk, io::Printer* printer); private: @@ -523,7 +524,7 @@ class ColdChunkSkipper { const std::vector& has_bit_indices_; const AccessInfoMap* access_info_map_; const double cold_threshold_; - std::map variables_; + std::map variables_; int limit_chunk_ = -1; bool has_field_presence_; }; @@ -534,7 +535,8 @@ const double kColdRatio = 0.005; bool ColdChunkSkipper::IsColdChunk(int chunk) { return false; } void ColdChunkSkipper::OnStartChunk(int chunk, int cached_has_bit_index, - const string& from, io::Printer* printer) { + const std::string& from, + io::Printer* printer) { Formatter format(printer, variables_); if (!access_info_map_ || !has_field_presence_) { return; @@ -602,11 +604,10 @@ bool ColdChunkSkipper::OnEndChunk(int chunk, io::Printer* printer) { // =================================================================== -MessageGenerator::MessageGenerator(const Descriptor* descriptor, - const std::map& vars, - int index_in_file_messages, - const Options& options, - MessageSCCAnalyzer* scc_analyzer) +MessageGenerator::MessageGenerator( + const Descriptor* descriptor, + const std::map& vars, int index_in_file_messages, + const Options& options, MessageSCCAnalyzer* scc_analyzer) : descriptor_(descriptor), index_in_file_messages_(index_in_file_messages), classname_(ClassName(descriptor, false)), @@ -622,8 +623,8 @@ MessageGenerator::MessageGenerator(const Descriptor* descriptor, // Variables that apply to this class variables_["classname"] = classname_; - variables_["classtype"] = QualifiedClassName(descriptor_); - string scc_name = + variables_["classtype"] = QualifiedClassName(descriptor_, options); + std::string scc_name = ClassName(scc_analyzer_->GetSCC(descriptor_)->GetRepresentative()); variables_["scc_name"] = UniqueName(scc_name, descriptor_, options_); variables_["full_name"] = descriptor_->full_name(); @@ -721,7 +722,7 @@ void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* printer) { Formatter::SaveState save(&format); - std::map vars; + std::map vars; SetCommonFieldVariables(field, &vars, options_); format.AddMap(vars); @@ -892,7 +893,7 @@ void MessageGenerator::GenerateFieldAccessorDefinitions(io::Printer* printer) { for (auto field : FieldRange(descriptor_)) { PrintFieldComment(format, field); - std::map vars; + std::map vars; SetCommonFieldVariables(field, &vars, options_); Formatter::SaveState saver(&format); @@ -935,7 +936,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { ShouldMarkClassAsFinal(descriptor_, options_) ? "final": ""); if (IsMapEntryMessage(descriptor_)) { - std::map vars; + std::map vars; CollectMapInfo(options_, descriptor_, &vars); vars["lite"] = HasDescriptorMethods(descriptor_->file(), options_) ? "" : "Lite"; @@ -959,6 +960,55 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { " static const $classname$* internal_default_instance() { return " "reinterpret_cast(&_$classname$_default_instance_); }\n"); + std::string suffix = GetUtf8Suffix(descriptor_->field(0), options_); + if (descriptor_->field(0)->type() == FieldDescriptor::TYPE_STRING && + !suffix.empty()) { + if (suffix == "UTF8") { + format( + " bool ValidateKey() const {\n" + " return ::$proto_ns$::internal::WireFormatLite::" + "VerifyUtf8String(key().data(), key().size(), " + "::$proto_ns$::internal::WireFormatLite::PARSE, \"$1$\");\n" + " }\n", + descriptor_->field(0)->full_name()); + } else { + GOOGLE_CHECK(suffix == "UTF8Verify"); + format( + " bool ValidateKey() const {\n" + " ::$proto_ns$::internal::WireFormatLite::VerifyUtf8String(\n" + " key().data(), key().size(), ::$proto_ns$::internal::" + "WireFormatLite::PARSE, \"$1$\");\n" + " return true;\n" + " }\n", + descriptor_->field(0)->full_name()); + } + } else { + format(" bool ValidateKey() const { return true; }\n"); + } + if (descriptor_->field(1)->type() == FieldDescriptor::TYPE_STRING && + !suffix.empty()) { + if (suffix == "UTF8") { + format( + " bool ValidateValue() const {\n" + " return ::$proto_ns$::internal::WireFormatLite::" + "VerifyUtf8String(value().data(), value().size(), " + "::$proto_ns$::internal::WireFormatLite::PARSE, \"$1$\");\n" + " }\n", + descriptor_->field(1)->full_name()); + } else { + GOOGLE_CHECK(suffix == "UTF8Verify"); + format( + " bool ValidateValue() const {\n" + " ::$proto_ns$::internal::WireFormatLite::VerifyUtf8String(\n" + " value().data(), value().size(), ::$proto_ns$::internal::" + "WireFormatLite::PARSE, \"$1$\");\n" + " return true;\n" + " }\n", + descriptor_->field(1)->full_name()); + } + } else { + format(" bool ValidateValue() const { return true; }\n"); + } if (HasDescriptorMethods(descriptor_->file(), options_)) { format( " void MergeFrom(const ::$proto_ns$::Message& other) final;\n" @@ -983,28 +1033,15 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "virtual ~$classname$();\n" "\n" "$classname$(const $classname$& from);\n" - "\n" - "inline $classname$& operator=(const $classname$& from) {\n" - " CopyFrom(from);\n" - " return *this;\n" - "}\n"); - - if (options_.table_driven_serialization) { - format( - "private:\n" - "const void* InternalGetTable() const;\n" - "public:\n" - "\n"); - } - - // Generate move constructor and move assignment operator. - format( - "#if LANG_CXX11\n" "$classname$($classname$&& from) noexcept\n" " : $classname$() {\n" " *this = ::std::move(from);\n" "}\n" "\n" + "inline $classname$& operator=(const $classname$& from) {\n" + " CopyFrom(from);\n" + " return *this;\n" + "}\n" "inline $classname$& operator=($classname$&& from) noexcept {\n" " if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {\n" " if (this != &from) InternalSwap(&from);\n" @@ -1013,9 +1050,17 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { " }\n" " return *this;\n" "}\n" - "#endif\n"); + "\n"); + + if (options_.table_driven_serialization) { + format( + "private:\n" + "const void* InternalGetTable() const;\n" + "public:\n" + "\n"); + } - std::map vars; + std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); if (PublicUnknownFieldsAccessors(descriptor_)) { @@ -1063,7 +1108,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { format("enum $1$Case {\n", UnderscoresToCamelCase(oneof->name(), true)); format.Indent(); for (auto field : FieldRange(oneof)) { - string oneof_enum_case_field_name = + std::string oneof_enum_case_field_name = UnderscoresToCamelCase(field->name(), true); format("k$1$ = $2$,\n", oneof_enum_case_field_name, // 1 field->number()); // 2 @@ -1098,7 +1143,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { format( "void PackFrom(const ::$proto_ns$::Message& message);\n" "void PackFrom(const ::$proto_ns$::Message& message,\n" - " const $string$& type_url_prefix);\n" + " const std::string& type_url_prefix);\n" "bool UnpackTo(::$proto_ns$::Message* message) const;\n" "static bool GetAnyFieldDescriptors(\n" " const ::$proto_ns$::Message& message,\n" @@ -1112,7 +1157,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "}\n" "template \n" "void PackFrom(const T& message,\n" - " const $string$& type_url_prefix) {\n" + " const std::string& type_url_prefix) {\n" " _any_metadata_.PackFrom(message, type_url_prefix);" "}\n" "template \n" @@ -1125,7 +1170,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { " return _any_metadata_.Is();\n" "}\n" "static bool ParseAnyTypeUrl(const string& type_url,\n" - " string* full_type_name);\n"); + " std::string* full_type_name);\n"); } format.Set("new_final", @@ -1221,7 +1266,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "static $1$ FullMessageName() {\n" " return \"$full_name$\";\n" "}\n", - options_.opensource_runtime ? "::google::protobuf::StringPiece" + options_.opensource_runtime ? "::PROTOBUF_NAMESPACE_ID::StringPiece" : "::StringPiece"); if (SupportsArenas(descriptor_)) { @@ -1266,7 +1311,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { "\n"); } else { format( - "$string$ GetTypeName() const final;\n" + "std::string GetTypeName() const final;\n" "\n"); } @@ -1348,11 +1393,11 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { // output will be determined later. bool need_to_emit_cached_size = true; - const string cached_size_decl = + const std::string cached_size_decl = "mutable ::$proto_ns$::internal::CachedSize _cached_size_;\n"; const size_t sizeof_has_bits = HasBitsSize(); - const string has_bits_decl = + const std::string has_bits_decl = sizeof_has_bits == 0 ? "" : StrCat("::$proto_ns$::internal::HasBits<", @@ -1416,7 +1461,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) { // For each oneof generate a union for (auto oneof : OneOfRange(descriptor_)) { - string camel_oneof_name = UnderscoresToCamelCase(oneof->name(), true); + std::string camel_oneof_name = UnderscoresToCamelCase(oneof->name(), true); format( "union $1$Union {\n" // explicit empty constructor is needed when union contains @@ -1644,8 +1689,8 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { uint32 tag = internal::WireFormatLite::MakeTag( field->number(), WireFormat::WireTypeForFieldType(field->type())); - std::map vars; - vars["classtype"] = QualifiedClassName(descriptor_); + std::map vars; + vars["classtype"] = QualifiedClassName(descriptor_, options_); vars["field_name"] = FieldName(field); vars["tag"] = StrCat(tag); vars["hasbit"] = StrCat(i); @@ -1708,12 +1753,12 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { field->number(), WireFormatLite::WIRETYPE_LENGTH_DELIMITED); } - string classfieldname = FieldName(field); + std::string classfieldname = FieldName(field); if (field->containing_oneof()) { classfieldname = field->containing_oneof()->name(); } format.Set("field_name", classfieldname); - string ptr = "nullptr"; + std::string ptr = "nullptr"; if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { if (IsMapEntryMessage(field->message_type())) { format( @@ -1726,7 +1771,7 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { "$3$>::MapFieldType, " "$tablename$::serialization_table>))},\n", tag, FindMessageIndexInFile(field->message_type()), - QualifiedClassName(field->message_type())); + QualifiedClassName(field->message_type(), options_)); continue; } else if (!IsProto1(field->message_type()->file(), options_) && !field->message_type()->options().message_set_wire_format()) { @@ -1789,9 +1834,9 @@ int MessageGenerator::GenerateFieldMetadata(io::Printer* printer) { } int num_field_metadata = 1 + sorted.size() + sorted_extensions.size(); num_field_metadata++; - string serializer = UseUnknownFieldSet(descriptor_->file(), options_) - ? "UnknownFieldSetSerializer" - : "UnknownFieldSerializerLite"; + std::string serializer = UseUnknownFieldSet(descriptor_->file(), options_) + ? "UnknownFieldSetSerializer" + : "UnknownFieldSerializerLite"; format( "{PROTOBUF_FIELD_OFFSET($classtype$, _internal_metadata_), 0, ~0u, " "::$proto_ns$::internal::FieldMetadata::kSpecial, reinterpret_castcpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && (field->containing_oneof() == NULL || HasDescriptorMethods(descriptor_->file(), options_))) { - string name; + std::string name; if (field->containing_oneof() || field->options().weak()) { name = "_" + classname_ + "_default_instance_."; } else { @@ -1835,10 +1880,6 @@ void MessageGenerator::GenerateDefaultInstanceInitializer( name += FieldName(field); format.Set("name", name); if (IsWeak(field, options_)) { - const FileDescriptor* dependency = field->message_type()->file(); - string default_instance = QualifiedFileLevelSymbol( - dependency->package(), - "_" + ClassName(field->message_type()) + "_default_instance_"); format( "$package_ns$::$name$_ = reinterpret_cast(&$1$);\n" @@ -1846,13 +1887,13 @@ void MessageGenerator::GenerateDefaultInstanceInitializer( " $package_ns$::$name$_ = " "::$proto_ns$::Empty::internal_default_instance();\n" "}\n", - default_instance); // 1 + DefaultInstanceName(field->message_type(), options_)); // 1 continue; } format( "$package_ns$::$name$_ = const_cast< $1$*>(\n" " $1$::internal_default_instance());\n", - FieldMessageTypeName(field)); + FieldMessageTypeName(field, options_)); } else if (field->containing_oneof() && HasDescriptorMethods(descriptor_->file(), options_)) { field_generators_.get(field).GenerateConstructorCode(printer); @@ -1904,7 +1945,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { "}\n" "\n" "void $classname$::PackFrom(const ::$proto_ns$::Message& message,\n" - " const $string$& type_url_prefix) {\n" + " const std::string& type_url_prefix) {\n" " _any_metadata_.PackFrom(message, type_url_prefix);\n" "}\n" "\n" @@ -1921,7 +1962,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { } format( "bool $classname$::ParseAnyTypeUrl(const string& type_url,\n" - " string* full_type_name) {\n" + " std::string* full_type_name) {\n" " return ::$proto_ns$::internal::ParseAnyTypeUrl(type_url,\n" " full_type_name);\n" "}\n" @@ -1960,7 +2001,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { field_generators_.get(field).GenerateNonInlineAccessorDefinitions(printer); if (IsCrossFileMaybeMap(field)) { Formatter::SaveState saver(&format); - std::map vars; + std::map vars; SetCommonFieldVariables(field, &vars, options_); if (field->containing_oneof()) { SetCommonOneofFieldVariables(field, &vars); @@ -2035,7 +2076,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) { "\n"); } else { format( - "$string$ $classname$::GetTypeName() const {\n" + "std::string $classname$::GetTypeName() const {\n" " return \"$full_name$\";\n" "}\n" "\n"); @@ -2124,7 +2165,7 @@ size_t MessageGenerator::GenerateParseOffsets(io::Printer* printer) { const unsigned char tag_size = WireFormat::TagSize(field->number(), field->type()); - std::map vars; + std::map vars; if (field->containing_oneof() != NULL) { vars["name"] = field->containing_oneof()->name(); vars["presence"] = StrCat(field->containing_oneof()->index()); @@ -2170,16 +2211,22 @@ size_t MessageGenerator::GenerateParseAuxTable(io::Printer* printer) { format("::$proto_ns$::internal::AuxillaryParseTableField(),\n"); } - std::map vars; + std::map vars; SetCommonFieldVariables(field, &vars, options_); format.AddMap(vars); switch (field->cpp_type()) { case FieldDescriptor::CPPTYPE_ENUM: - format( - "{::$proto_ns$::internal::AuxillaryParseTableField::enum_aux{" - "$1$_IsValid}},\n", - ClassName(field->enum_type(), true)); + if (HasPreservingUnknownEnumSemantics(field)) { + format( + "{::$proto_ns$::internal::AuxillaryParseTableField::enum_aux{" + "nullptr}},\n"); + } else { + format( + "{::$proto_ns$::internal::AuxillaryParseTableField::enum_aux{" + "$1$_IsValid}},\n", + ClassName(field->enum_type(), true)); + } last_field_number++; break; case FieldDescriptor::CPPTYPE_MESSAGE: { @@ -2187,27 +2234,28 @@ size_t MessageGenerator::GenerateParseAuxTable(io::Printer* printer) { format( "{::$proto_ns$::internal::AuxillaryParseTableField::map_" "aux{&::$proto_ns$::internal::ParseMap<$1$>}},\n", - QualifiedClassName(field->message_type())); + QualifiedClassName(field->message_type(), options_)); last_field_number++; break; } format.Set("field_classname", ClassName(field->message_type(), false)); - format.Set("ns", Namespace(field->message_type())); + format.Set("default_instance", + DefaultInstanceName(field->message_type(), options_)); format( "{::$proto_ns$::internal::AuxillaryParseTableField::message_aux{\n" - " &$ns$::_$field_classname$_default_instance_}},\n"); + " &$default_instance$}},\n"); last_field_number++; break; } case FieldDescriptor::CPPTYPE_STRING: { - string default_val; + std::string default_val; switch (EffectiveStringCType(field, options_)) { case FieldOptions::STRING: default_val = field->default_value_string().empty() ? "&::" + variables_["proto_ns"] + "::internal::fixed_address_empty_string" - : "&" + QualifiedClassName(descriptor_) + + : "&" + QualifiedClassName(descriptor_, options_) + "::" + MakeDefaultName(field); break; case FieldOptions::CORD: @@ -2290,7 +2338,7 @@ std::pair MessageGenerator::GenerateOffsets( } else if (HasFieldPresence(descriptor_->file())) { entries += has_bit_indices_.size(); for (int i = 0; i < has_bit_indices_.size(); i++) { - const string index = + const std::string index = has_bit_indices_[i] >= 0 ? StrCat(has_bit_indices_[i]) : "~0u"; format("$1$,\n", index); } @@ -2441,7 +2489,7 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer, } } - string pod_template; + std::string pod_template; if (copy_constructor) { pod_template = "::memcpy(&$first$_, &from.$first$_,\n" @@ -2467,8 +2515,8 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer, if (it != runs.end() && it->second > 1) { // Use a memset, then skip run_length fields. const size_t run_length = it->second; - const string first_field_name = FieldName(field); - const string last_field_name = + const std::string first_field_name = FieldName(field); + const std::string last_field_name = FieldName(optimized_order_[i + run_length - 1]); format.Set("first", first_field_name); @@ -2491,9 +2539,9 @@ void MessageGenerator::GenerateConstructorBody(io::Printer* printer, void MessageGenerator::GenerateStructors(io::Printer* printer) { Formatter format(printer, variables_); - string superclass; + std::string superclass; superclass = SuperClassName(descriptor_, options_); - string initializer_with_arena = superclass + "()"; + std::string initializer_with_arena = superclass + "()"; if (descriptor_->extension_range_count() > 0) { initializer_with_arena += ",\n _extensions_(arena)"; @@ -2510,7 +2558,7 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { } if (has_arena_constructor) { initializer_with_arena += - string(",\n ") + FieldName(field) + string("_(arena)"); + std::string(",\n ") + FieldName(field) + std::string("_(arena)"); } } @@ -2521,7 +2569,8 @@ void MessageGenerator::GenerateStructors(io::Printer* printer) { initializer_with_arena += ", _weak_field_map_(arena)"; } - string initializer_null = superclass + "(), _internal_metadata_(nullptr)"; + std::string initializer_null = + superclass + "(), _internal_metadata_(nullptr)"; if (IsAnyMessage(descriptor_, options_)) { initializer_null += ", _any_metadata_(&type_url_, &value_)"; } @@ -2688,7 +2737,7 @@ bool MessageGenerator::MaybeGenerateOptionalFieldCondition( int has_bit_index = has_bit_indices_[field->index()]; if (!field->options().weak() && expected_has_bits_index == has_bit_index / 32) { - const string mask = + const std::string mask = StrCat(strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); format("if (cached_has_bits & 0x$1$u) {\n", mask); return true; @@ -2832,8 +2881,8 @@ void MessageGenerator::GenerateClear(io::Printer* printer) { field_generators_.get(chunk[memset_run_start]); generator.GenerateMessageClearingCode(printer); } else { - const string first_field_name = FieldName(chunk[memset_run_start]); - const string last_field_name = FieldName(chunk[memset_run_end]); + const std::string first_field_name = FieldName(chunk[memset_run_start]); + const std::string last_field_name = FieldName(chunk[memset_run_end]); format( "::memset(&$1$_, 0, static_cast(\n" @@ -3067,7 +3116,8 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) { format( "void $classname$::CheckTypeAndMergeFrom(\n" " const ::$proto_ns$::MessageLite& from) {\n" - " MergeFrom(*::google::protobuf::down_cast(&from));\n" + " MergeFrom(*::$proto_ns$::internal::DownCast(\n" + " &from));\n" "}\n" "\n"); } @@ -3154,7 +3204,7 @@ void MessageGenerator::GenerateMergeFrom(io::Printer* printer) { int has_bit_index = has_bit_indices_[field->index()]; if (!field->options().weak() && cached_has_bit_index == has_bit_index / 32) { - const string mask = StrCat( + const std::string mask = StrCat( strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); format("if (cached_has_bits & 0x$1$u) {\n", mask); @@ -3311,7 +3361,7 @@ void MessageGenerator::GenerateCopyFrom(io::Printer* printer) { } void MessageGenerator::GenerateMergeFromCodedStream(io::Printer* printer) { - std::map vars = variables_; + std::map vars = variables_; SetUnknkownFieldsVariable(descriptor_, options_, &vars); Formatter format(printer, vars); if (descriptor_->options().message_set_wire_format()) { @@ -3345,7 +3395,7 @@ void MessageGenerator::GenerateMergeFromCodedStream(io::Printer* printer) { if (table_driven_) { format.Indent(); - const string lite = + const std::string lite = UseUnknownFieldSet(descriptor_->file(), options_) ? "" : "Lite"; format( @@ -3685,7 +3735,7 @@ void MessageGenerator::GenerateSerializeOneField(io::Printer* printer, // Attempt to use the state of cached_has_bits, if possible. int has_bit_index = has_bit_indices_[field->index()]; if (cached_has_bits_index == has_bit_index / 32) { - const string mask = + const std::string mask = StrCat(strings::Hex(1u << (has_bit_index % 32), strings::ZERO_PAD_8)); format("if (cached_has_bits & 0x$1$u) {\n", mask); @@ -3716,7 +3766,7 @@ void MessageGenerator::GenerateSerializeOneField(io::Printer* printer, void MessageGenerator::GenerateSerializeOneExtensionRange( io::Printer* printer, const Descriptor::ExtensionRange* range, bool to_array) { - std::map vars; + std::map vars; vars["start"] = StrCat(range->start); vars["end"] = StrCat(range->end); Formatter format(printer, vars); @@ -3740,7 +3790,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizes(io::Printer* printer) { "void $classname$::SerializeWithCachedSizes(\n" " ::$proto_ns$::io::CodedOutputStream* output) const {\n" " _extensions_.SerializeMessageSetWithCachedSizes(output);\n"); - std::map vars; + std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); format( @@ -3778,7 +3828,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesToArray( " target = _extensions_." "InternalSerializeMessageSetWithCachedSizesToArray(target);\n"); GOOGLE_CHECK(UseUnknownFieldSet(descriptor_->file(), options_)); - std::map vars; + std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); format( @@ -3942,7 +3992,7 @@ void MessageGenerator::GenerateSerializeWithCachedSizesBody( } } - std::map vars; + std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); if (UseUnknownFieldSet(descriptor_->file(), options_)) { @@ -3987,18 +4037,19 @@ std::vector MessageGenerator::RequiredFieldsBitMask() const { // "for all i, (_has_bits_[i] & masks[i]) == masks[i]" // masks is allowed to be shorter than _has_bits_, but at least one element of // masks must be non-zero. -static string ConditionalToCheckBitmasks(const std::vector& masks) { - std::vector parts; +static std::string ConditionalToCheckBitmasks( + const std::vector& masks) { + std::vector parts; for (int i = 0; i < masks.size(); i++) { if (masks[i] == 0) continue; - string m = StrCat("0x", strings::Hex(masks[i], strings::ZERO_PAD_8)); + std::string m = StrCat("0x", strings::Hex(masks[i], strings::ZERO_PAD_8)); // Each xor evaluates to 0 if the expected bits are present. parts.push_back( StrCat("((_has_bits_[", i, "] & ", m, ") ^ ", m, ")")); } GOOGLE_CHECK(!parts.empty()); // If we have multiple parts, each expected to be 0, then bitwise-or them. - string result = + std::string result = parts.size() == 1 ? parts[0] : StrCat("(", Join(parts, "\n | "), ")"); @@ -4010,7 +4061,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { if (descriptor_->options().message_set_wire_format()) { // Special-case MessageSet. - std::map vars; + std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); format( @@ -4072,7 +4123,7 @@ void MessageGenerator::GenerateByteSize(io::Printer* printer) { "\n"); } - std::map vars; + std::map vars; SetUnknkownFieldsVariable(descriptor_, options_, &vars); format.AddMap(vars); if (UseUnknownFieldSet(descriptor_->file(), options_)) { diff --git a/src/google/protobuf/compiler/cpp/cpp_message_field.cc b/src/google/protobuf/compiler/cpp/cpp_message_field.cc index a29372da21..32653bb973 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message_field.cc @@ -51,7 +51,7 @@ namespace { // Ordinarily a static_cast is enough to cast google::protobuf::MessageLite* to a class // deriving from it, but we need a reinterpret_cast in cases where the generated // message is forward-declared but its full definition is not visible. -string StaticCast(const string& type, const string& expression, +string StaticCast(const std::string& type, const std::string& expression, bool implicit_weak_field) { if (implicit_weak_field) { return "static_cast< " + type + " >(" + expression + ")"; @@ -60,7 +60,7 @@ string StaticCast(const string& type, const string& expression, } } -string ReinterpretCast(const string& type, const string& expression, +string ReinterpretCast(const std::string& type, const std::string& expression, bool implicit_weak_field) { if (implicit_weak_field) { return "reinterpret_cast< " + type + " >(" + expression + ")"; @@ -71,16 +71,17 @@ string ReinterpretCast(const string& type, const string& expression, void SetMessageVariables(const FieldDescriptor* descriptor, const Options& options, bool implicit_weak, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, variables, options); - (*variables)["type"] = FieldMessageTypeName(descriptor); + (*variables)["type"] = FieldMessageTypeName(descriptor, options); (*variables)["casted_member"] = ReinterpretCast( (*variables)["type"] + "*", (*variables)["name"] + "_", implicit_weak); (*variables)["type_default_instance"] = - DefaultInstanceName(descriptor->message_type()); + DefaultInstanceName(descriptor->message_type(), options); (*variables)["type_reference_function"] = implicit_weak - ? (" " + ReferenceFunctionName(descriptor->message_type()) + "();\n") + ? (" " + ReferenceFunctionName(descriptor->message_type(), options) + + "();\n") : ""; (*variables)["stream_writer"] = (*variables)["declared_type"] + diff --git a/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc b/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc index 4f8a23ed32..96b5a8bfba 100644 --- a/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc +++ b/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc @@ -58,9 +58,8 @@ class TestGenerator : public CodeGenerator { ~TestGenerator() {} virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { + const std::string& parameter, GeneratorContext* context, + std::string* error) const { TryInsert("test.pb.h", "includes", context); TryInsert("test.pb.h", "namespace_scope", context); TryInsert("test.pb.h", "global_scope", context); @@ -167,7 +166,8 @@ class TestGenerator : public CodeGenerator { return true; } - void TryInsert(const string& filename, const string& insertion_point, + void TryInsert(const std::string& filename, + const std::string& insertion_point, GeneratorContext* context) const { std::unique_ptr output( context->OpenForInsert(filename, insertion_point)); @@ -227,9 +227,9 @@ TEST(CppPluginTest, PluginTest) { cli.RegisterGenerator("--cpp_out", &cpp_generator, ""); cli.RegisterGenerator("--test_out", &test_generator, ""); - string proto_path = "-I" + TestTempDir(); - string cpp_out = "--cpp_out=" + TestTempDir(); - string test_out = "--test_out=" + TestTempDir(); + std::string proto_path = "-I" + TestTempDir(); + std::string cpp_out = "--cpp_out=" + TestTempDir(); + std::string test_out = "--test_out=" + TestTempDir(); const char* argv[] = { "protoc", diff --git a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc index a009a14ed7..9ab20c1a7e 100644 --- a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc @@ -81,7 +81,7 @@ int FixedSize(FieldDescriptor::Type type) { } void SetPrimitiveVariables(const FieldDescriptor* descriptor, - std::map* variables, + std::map* variables, const Options& options) { SetCommonFieldVariables(descriptor, variables, options); (*variables)["type"] = PrimitiveTypeName(options, descriptor->cpp_type()); diff --git a/src/google/protobuf/compiler/cpp/cpp_service.cc b/src/google/protobuf/compiler/cpp/cpp_service.cc index 677b73746e..79738c5f3f 100644 --- a/src/google/protobuf/compiler/cpp/cpp_service.cc +++ b/src/google/protobuf/compiler/cpp/cpp_service.cc @@ -44,18 +44,20 @@ namespace cpp { namespace { -void InitMethodVariables(const MethodDescriptor* method, Formatter* format) { +void InitMethodVariables(const MethodDescriptor* method, const Options& options, + Formatter* format) { format->Set("name", method->name()); - format->Set("input_type", QualifiedClassName(method->input_type())); - format->Set("output_type", QualifiedClassName(method->output_type())); + format->Set("input_type", QualifiedClassName(method->input_type(), options)); + format->Set("output_type", + QualifiedClassName(method->output_type(), options)); } } // namespace -ServiceGenerator::ServiceGenerator(const ServiceDescriptor* descriptor, - const std::map& vars, - const Options& options) - : descriptor_(descriptor), vars_(vars) { +ServiceGenerator::ServiceGenerator( + const ServiceDescriptor* descriptor, + const std::map& vars, const Options& options) + : descriptor_(descriptor), vars_(vars), options_(options) { vars_["classname"] = descriptor_->name(); vars_["full_name"] = descriptor_->full_name(); } @@ -153,7 +155,7 @@ void ServiceGenerator::GenerateMethodSignatures(VirtualOrNon virtual_or_non, for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); Formatter format(printer, vars_); - InitMethodVariables(method, &format); + InitMethodVariables(method, options_, &format); format.Set("virtual", virtual_or_non == VIRTUAL ? "virtual " : ""); format( "$virtual$void $name$(::$proto_ns$::RpcController* controller,\n" @@ -219,7 +221,7 @@ void ServiceGenerator::GenerateNotImplementedMethods(io::Printer* printer) { for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); Formatter format(printer, vars_); - InitMethodVariables(method, &format); + InitMethodVariables(method, options_, &format); format( "void $classname$::$name$(::$proto_ns$::RpcController* controller,\n" " const $input_type$*,\n" @@ -248,15 +250,17 @@ void ServiceGenerator::GenerateCallMethod(io::Printer* printer) { for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); Formatter format(printer, vars_); - InitMethodVariables(method, &format); + InitMethodVariables(method, options_, &format); // Note: down_cast does not work here because it only works on pointers, // not references. format( " case $1$:\n" " $name$(controller,\n" - " ::google::protobuf::down_cast(request),\n" - " ::google::protobuf::down_cast< $output_type$*>(response),\n" + " ::$proto_ns$::internal::DownCast(\n" + " request),\n" + " ::$proto_ns$::internal::DownCast<$output_type$*>(\n" + " response),\n" " done);\n" " break;\n", i); @@ -293,7 +297,7 @@ void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which, format( " case $1$:\n" " return $2$::default_instance();\n", - i, QualifiedClassName(type)); + i, QualifiedClassName(type, options_)); } format( @@ -311,7 +315,7 @@ void ServiceGenerator::GenerateStubMethods(io::Printer* printer) { for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); Formatter format(printer, vars_); - InitMethodVariables(method, &format); + InitMethodVariables(method, options_, &format); format( "void $classname$_Stub::$name$(::$proto_ns$::RpcController* " "controller,\n" diff --git a/src/google/protobuf/compiler/cpp/cpp_service.h b/src/google/protobuf/compiler/cpp/cpp_service.h index 2952e413b8..f441b3b68c 100644 --- a/src/google/protobuf/compiler/cpp/cpp_service.h +++ b/src/google/protobuf/compiler/cpp/cpp_service.h @@ -110,6 +110,7 @@ class ServiceGenerator { const ServiceDescriptor* descriptor_; std::map vars_; + const Options& options_; int index_in_metadata_; diff --git a/src/google/protobuf/compiler/cpp/cpp_string_field.cc b/src/google/protobuf/compiler/cpp/cpp_string_field.cc index 3972ed25e3..a5a0a60dc7 100644 --- a/src/google/protobuf/compiler/cpp/cpp_string_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_string_field.cc @@ -48,19 +48,19 @@ namespace cpp { namespace { void SetStringVariables(const FieldDescriptor* descriptor, - std::map* variables, + std::map* variables, const Options& options) { SetCommonFieldVariables(descriptor, variables, options); (*variables)["default"] = DefaultValue(options, descriptor); (*variables)["default_length"] = StrCat(descriptor->default_value_string().length()); - string default_variable_string = MakeDefaultName(descriptor); + std::string default_variable_string = MakeDefaultName(descriptor); (*variables)["default_variable_name"] = default_variable_string; (*variables)["default_variable"] = descriptor->default_value_string().empty() ? "&::" + (*variables)["proto_ns"] + "::internal::GetEmptyStringAlreadyInited()" - : "&" + QualifiedClassName(descriptor->containing_type()) + + : "&" + QualifiedClassName(descriptor->containing_type(), options) + "::" + default_variable_string + ".get()"; (*variables)["pointer_type"] = descriptor->type() == FieldDescriptor::TYPE_BYTES ? "void" : "char"; @@ -126,7 +126,7 @@ GenerateStaticMembers(io::Printer* printer) const { // non-friend code. format( "public:\n" - "static ::$proto_ns$::internal::ExplicitlyConstructed<$string$>" + "static ::$proto_ns$::internal::ExplicitlyConstructed" " $default_variable_name$;\n" "private:\n"); } @@ -164,28 +164,24 @@ GenerateAccessorDeclarations(io::Printer* printer) const { } format( - "$deprecated_attr$const $string$& ${1$$name$$}$() const;\n" - "$deprecated_attr$void ${1$set_$name$$}$(const $string$& value);\n" - "#if LANG_CXX11\n" - "$deprecated_attr$void ${1$set_$name$$}$($string$&& value);\n" - "#endif\n" + "$deprecated_attr$const std::string& ${1$$name$$}$() const;\n" + "$deprecated_attr$void ${1$set_$name$$}$(const std::string& value);\n" + "$deprecated_attr$void ${1$set_$name$$}$(std::string&& value);\n" "$deprecated_attr$void ${1$set_$name$$}$(const char* value);\n", descriptor_); if (!options_.opensource_runtime) { format( - "$deprecated_attr$void ${1$set_$name$$}$(::StringPiece value);\n" - "#ifdef HAS_GLOBAL_STRING\n" - "$deprecated_attr$void ${1$set_$name$$}$(const ::std::string& value);\n" - "#endif\n", + "$deprecated_attr$void ${1$set_$name$$}$(::StringPiece value);\n", descriptor_); } format( "$deprecated_attr$void ${1$set_$name$$}$(const $pointer_type$* " "value, size_t size)" ";\n" - "$deprecated_attr$$string$* ${1$mutable_$name$$}$();\n" - "$deprecated_attr$$string$* ${1$$release_name$$}$();\n" - "$deprecated_attr$void ${1$set_allocated_$name$$}$($string$* $name$);\n", + "$deprecated_attr$std::string* ${1$mutable_$name$$}$();\n" + "$deprecated_attr$std::string* ${1$$release_name$$}$();\n" + "$deprecated_attr$void ${1$set_allocated_$name$$}$(std::string* " + "$name$);\n", descriptor_); if (options_.opensource_runtime) { if (SupportsArenas(descriptor_)) { @@ -194,13 +190,13 @@ GenerateAccessorDeclarations(io::Printer* printer) const { "for\"\n" "\" string fields are deprecated and will be removed in a\"\n" "\" future release.\")\n" - "$string$* ${1$unsafe_arena_release_$name$$}$();\n" + "std::string* ${1$unsafe_arena_release_$name$$}$();\n" "$GOOGLE_PROTOBUF$_RUNTIME_DEPRECATED(\"The unsafe_arena_ accessors " "for\"\n" "\" string fields are deprecated and will be removed in a\"\n" "\" future release.\")\n" "void ${1$unsafe_arena_set_allocated_$name$$}$(\n" - " $string$* $name$);\n", + " std::string* $name$);\n", descriptor_); } } @@ -217,23 +213,21 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { Formatter format(printer, variables_); if (SupportsArenas(descriptor_)) { format( - "inline const $string$& $classname$::$name$() const {\n" + "inline const std::string& $classname$::$name$() const {\n" " // @@protoc_insertion_point(field_get:$full_name$)\n" " return $name$_.Get();\n" "}\n" - "inline void $classname$::set_$name$(const $string$& value) {\n" + "inline void $classname$::set_$name$(const std::string& value) {\n" " $set_hasbit$\n" " $name$_.Set$lite$($default_variable$, value, GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" - "#if LANG_CXX11\n" - "inline void $classname$::set_$name$($string$&& value) {\n" + "inline void $classname$::set_$name$(std::string&& value) {\n" " $set_hasbit$\n" " $name$_.Set$lite$(\n" " $default_variable$, ::std::move(value), GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" - "#endif\n" "inline void $classname$::set_$name$(const char* value) {\n" " $null_check$" " $set_hasbit$\n" @@ -248,16 +242,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $name$_.Set$lite$($default_variable$, value, " "GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" - "}\n" - "#ifdef HAS_GLOBAL_STRING\n" - "inline void $classname$::set_$name$(const ::std::string& value) {\n" - " $set_hasbit$\n" - " $name$_.Set$lite$($default_variable$, " - "::StringPiece(value.data(),\n" - " value.size()), GetArenaNoVirtual());\n" - " // @@protoc_insertion_point(field_set_std_string:$full_name$)\n" - "}\n" - "#endif\n"); + "}\n"); } format( "inline " @@ -269,12 +254,12 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { "GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline $string$* $classname$::mutable_$name$() {\n" + "inline std::string* $classname$::mutable_$name$() {\n" " $set_hasbit$\n" " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $name$_.Mutable($default_variable$, GetArenaNoVirtual());\n" "}\n" - "inline $string$* $classname$::$release_name$() {\n" + "inline std::string* $classname$::$release_name$() {\n" " // @@protoc_insertion_point(field_release:$full_name$)\n"); if (HasFieldPresence(descriptor_->file())) { @@ -294,7 +279,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { format( "}\n" - "inline void $classname$::set_allocated_$name$($string$* $name$) {\n" + "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" " if ($name$ != nullptr) {\n" " $set_hasbit$\n" " } else {\n" @@ -306,7 +291,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { "}\n"); if (options_.opensource_runtime) { format( - "inline $string$* $classname$::unsafe_arena_release_$name$() {\n" + "inline std::string* $classname$::unsafe_arena_release_$name$() {\n" " // " "@@protoc_insertion_point(field_unsafe_arena_release:$full_name$)\n" " $DCHK$(GetArenaNoVirtual() != nullptr);\n" @@ -315,7 +300,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " GetArenaNoVirtual());\n" "}\n" "inline void $classname$::unsafe_arena_set_allocated_$name$(\n" - " $string$* $name$) {\n" + " std::string* $name$) {\n" " $DCHK$(GetArenaNoVirtual() != nullptr);\n" " if ($name$ != nullptr) {\n" " $set_hasbit$\n" @@ -331,23 +316,21 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { } else { // No-arena case. format( - "inline const $string$& $classname$::$name$() const {\n" + "inline const std::string& $classname$::$name$() const {\n" " // @@protoc_insertion_point(field_get:$full_name$)\n" " return $name$_.GetNoArena();\n" "}\n" - "inline void $classname$::set_$name$(const $string$& value) {\n" + "inline void $classname$::set_$name$(const std::string& value) {\n" " $set_hasbit$\n" " $name$_.SetNoArena($default_variable$, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" - "#if LANG_CXX11\n" - "inline void $classname$::set_$name$($string$&& value) {\n" + "inline void $classname$::set_$name$(std::string&& value) {\n" " $set_hasbit$\n" " $name$_.SetNoArena(\n" " $default_variable$, ::std::move(value));\n" " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" - "#endif\n" "inline void $classname$::set_$name$(const char* value) {\n" " $null_check$" " $set_hasbit$\n" @@ -360,15 +343,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $set_hasbit$\n" " $name$_.SetNoArena($default_variable$, value);\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" - "}\n" - "#ifdef HAS_GLOBAL_STRING\n" - "inline void $classname$::set_$name$(const ::std::string& value) {\n" - " $set_hasbit$\n" - " $name$_.SetNoArena($default_variable$,\n" - " ::StringPiece(value.data(), value.size()));\n" - " // @@protoc_insertion_point(field_set_std_string:$full_name$)\n" - "}\n" - "#endif\n"); + "}\n"); } format( "inline " @@ -379,12 +354,12 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $string_piece$(reinterpret_cast(value), size));\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline $string$* $classname$::mutable_$name$() {\n" + "inline std::string* $classname$::mutable_$name$() {\n" " $set_hasbit$\n" " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $name$_.MutableNoArena($default_variable$);\n" "}\n" - "inline $string$* $classname$::$release_name$() {\n" + "inline std::string* $classname$::$release_name$() {\n" " // @@protoc_insertion_point(field_release:$full_name$)\n"); if (HasFieldPresence(descriptor_->file())) { @@ -402,7 +377,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { format( "}\n" - "inline void $classname$::set_allocated_$name$($string$* $name$) {\n" + "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" " if ($name$ != nullptr) {\n" " $set_hasbit$\n" " } else {\n" @@ -420,7 +395,7 @@ GenerateNonInlineAccessorDefinitions(io::Printer* printer) const { if (!descriptor_->default_value_string().empty()) { // Initialized in GenerateDefaultInstanceAllocator. format( - "::$proto_ns$::internal::ExplicitlyConstructed<$string$> " + "::$proto_ns$::internal::ExplicitlyConstructed " "$classname$::$default_variable_name$;\n"); } } @@ -599,7 +574,7 @@ GenerateDefaultInstanceAllocator(io::Printer* printer) const { format( "$ns$::$classname$::$default_variable_name$.DefaultConstruct();\n" "*$ns$::$classname$::$default_variable_name$.get_mutable() = " - "$string$($default$, $default_length$);\n" + "std::string($default$, $default_length$);\n" "::$proto_ns$::internal::OnShutdownDestroyString(\n" " $ns$::$classname$::$default_variable_name$.get_mutable());\n"); } @@ -609,17 +584,17 @@ void StringFieldGenerator:: GenerateMergeFromCodedStream(io::Printer* printer) const { Formatter format(printer, variables_); // The google3 version of proto2 has ArenaStrings and parses into them - // directly, but for the open-source release, we always parse into ::std::string + // directly, but for the open-source release, we always parse into std::string // instances. Note that for lite, we do similarly to the open source release - // and use ::std::string, not ArenaString. + // and use std::string, not ArenaString. if (!options_.opensource_runtime && !inlined_ && SupportsArenas(descriptor_) && !lite_) { // If arena != NULL, the current string is either an ArenaString (no - // destructor necessary) or a materialized ::std::string (and is on the Arena's - // destructor list). No call to ArenaStringPtr::Destroy is needed. + // destructor necessary) or a materialized std::string (and is on the + // Arena's destructor list). No call to ArenaStringPtr::Destroy is needed. format( "if (arena != nullptr) {\n" - " ::$proto_ns$::internal::TaggedPtr<$string$> str =\n" + " ::$proto_ns$::internal::TaggedPtr str =\n" " ::$proto_ns$::internal::ReadArenaString(input, arena);\n" " DO_(!str.IsNull());\n" " $set_hasbit_io$\n" @@ -707,14 +682,14 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { Formatter format(printer, variables_); if (SupportsArenas(descriptor_)) { format( - "inline const $string$& $classname$::$name$() const {\n" + "inline const std::string& $classname$::$name$() const {\n" " // @@protoc_insertion_point(field_get:$full_name$)\n" " if (has_$name$()) {\n" " return $field_member$.Get();\n" " }\n" " return *$default_variable$;\n" "}\n" - "inline void $classname$::set_$name$(const $string$& value) {\n" + "inline void $classname$::set_$name$(const std::string& value) {\n" " if (!has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" @@ -724,8 +699,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" - "#if LANG_CXX11\n" - "inline void $classname$::set_$name$($string$&& value) {\n" + "inline void $classname$::set_$name$(std::string&& value) {\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" " if (!has_$name$()) {\n" " clear_$oneof_name$();\n" @@ -736,7 +710,6 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $default_variable$, ::std::move(value), GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" - "#endif\n" "inline void $classname$::set_$name$(const char* value) {\n" " $null_check$" " if (!has_$name$()) {\n" @@ -759,20 +732,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $field_member$.Set$lite$($default_variable$, value,\n" " GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" - "}\n" - "#ifdef HAS_GLOBAL_STRING\n" - "inline void $classname$::set_$name$(const ::std::string& value) {\n" - " if (!has_$name$()) {\n" - " clear_$oneof_name$();\n" - " set_has_$name$();\n" - " $field_member$.UnsafeSetDefault($default_variable$);\n" - " }\n" - " $field_member$.Set$lite$($default_variable$,\n" - " ::StringPiece(value.data(), value.size()), " - "GetArenaNoVirtual());\n" - " // @@protoc_insertion_point(field_set_std_string:$full_name$)\n" - "}\n" - "#endif\n"); + "}\n"); } format( "inline " @@ -789,7 +749,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline $string$* $classname$::mutable_$name$() {\n" + "inline std::string* $classname$::mutable_$name$() {\n" " if (!has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" @@ -799,7 +759,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " GetArenaNoVirtual());\n" " // @@protoc_insertion_point(field_mutable:$full_name$)\n" "}\n" - "inline $string$* $classname$::$release_name$() {\n" + "inline std::string* $classname$::$release_name$() {\n" " // @@protoc_insertion_point(field_release:$full_name$)\n" " if (has_$name$()) {\n" " clear_has_$oneof_name$();\n" @@ -809,7 +769,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " return nullptr;\n" " }\n" "}\n" - "inline void $classname$::set_allocated_$name$($string$* $name$) {\n" + "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" " if (has_$oneof_name$()) {\n" " clear_$oneof_name$();\n" " }\n" @@ -821,7 +781,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { "}\n"); if (options_.opensource_runtime) { format( - "inline $string$* $classname$::unsafe_arena_release_$name$() {\n" + "inline std::string* $classname$::unsafe_arena_release_$name$() {\n" " // " "@@protoc_insertion_point(field_unsafe_arena_release:$full_name$)\n" " $DCHK$(GetArenaNoVirtual() != nullptr);\n" @@ -834,7 +794,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " }\n" "}\n" "inline void $classname$::unsafe_arena_set_allocated_$name$(" - "$string$* $name$) {\n" + "std::string* $name$) {\n" " $DCHK$(GetArenaNoVirtual() != nullptr);\n" " if (!has_$name$()) {\n" " $field_member$.UnsafeSetDefault($default_variable$);\n" @@ -852,14 +812,14 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { } else { // No-arena case. format( - "inline const $string$& $classname$::$name$() const {\n" + "inline const std::string& $classname$::$name$() const {\n" " // @@protoc_insertion_point(field_get:$full_name$)\n" " if (has_$name$()) {\n" " return $field_member$.GetNoArena();\n" " }\n" " return *$default_variable$;\n" "}\n" - "inline void $classname$::set_$name$(const $string$& value) {\n" + "inline void $classname$::set_$name$(const std::string& value) {\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" " if (!has_$name$()) {\n" " clear_$oneof_name$();\n" @@ -869,8 +829,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $field_member$.SetNoArena($default_variable$, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" - "#if LANG_CXX11\n" - "inline void $classname$::set_$name$($string$&& value) {\n" + "inline void $classname$::set_$name$(std::string&& value) {\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" " if (!has_$name$()) {\n" " clear_$oneof_name$();\n" @@ -880,7 +839,6 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $field_member$.SetNoArena($default_variable$, ::std::move(value));\n" " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" "}\n" - "#endif\n" "inline void $classname$::set_$name$(const char* value) {\n" " $null_check$" " if (!has_$name$()) {\n" @@ -902,19 +860,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " }\n" " $field_member$.SetNoArena($default_variable$, value);\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" - "}\n" - "#ifdef HAS_GLOBAL_STRING\n" - "inline void $classname$::set_$name$(const ::std::string& value) {\n" - " if (!has_$name$()) {\n" - " clear_$oneof_name$();\n" - " set_has_$name$();\n" - " $field_member$.UnsafeSetDefault($default_variable$);\n" - " }\n" - " $field_member$.SetNoArena($default_variable$,\n" - " ::StringPiece(value.data(), value.size()));\n" - " // @@protoc_insertion_point(field_set_std_string:$full_name$)\n" - "}\n" - "#endif\n"); + "}\n"); } format( "inline " @@ -929,7 +875,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " reinterpret_cast(value), size));\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline $string$* $classname$::mutable_$name$() {\n" + "inline std::string* $classname$::mutable_$name$() {\n" " if (!has_$name$()) {\n" " clear_$oneof_name$();\n" " set_has_$name$();\n" @@ -938,7 +884,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $field_member$.MutableNoArena($default_variable$);\n" "}\n" - "inline $string$* $classname$::$release_name$() {\n" + "inline std::string* $classname$::$release_name$() {\n" " // @@protoc_insertion_point(field_release:$full_name$)\n" " if (has_$name$()) {\n" " clear_has_$oneof_name$();\n" @@ -947,7 +893,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " return nullptr;\n" " }\n" "}\n" - "inline void $classname$::set_allocated_$name$($string$* $name$) {\n" + "inline void $classname$::set_allocated_$name$(std::string* $name$) {\n" " if (has_$oneof_name$()) {\n" " clear_$oneof_name$();\n" " }\n" @@ -1005,8 +951,8 @@ GenerateMergeFromCodedStream(io::Printer* printer) const { // See above: ArenaString is not included in the open-source release. if (!options_.opensource_runtime && SupportsArenas(descriptor_) && !lite_) { // If has_$name$(), then the current string is either an ArenaString (no - // destructor necessary) or a materialized ::std::string (and is on the Arena's - // destructor list). No call to ArenaStringPtr::Destroy is needed. + // destructor necessary) or a materialized std::string (and is on the + // Arena's destructor list). No call to ArenaStringPtr::Destroy is needed. format( "if (arena != nullptr) {\n" " clear_$oneof_name$();\n" @@ -1014,7 +960,7 @@ GenerateMergeFromCodedStream(io::Printer* printer) const { " $field_member$.UnsafeSetDefault($default_variable$);\n" " set_has_$name$();\n" " }\n" - " ::$proto_ns$::internal::TaggedPtr<$string$> new_value =\n" + " ::$proto_ns$::internal::TaggedPtr new_value =\n" " ::$proto_ns$::internal::ReadArenaString(input, arena);\n" " DO_(!new_value.IsNull());\n" " $field_member$.UnsafeSetTaggedPointer(new_value);\n" @@ -1050,7 +996,7 @@ RepeatedStringFieldGenerator::~RepeatedStringFieldGenerator() {} void RepeatedStringFieldGenerator:: GeneratePrivateMembers(io::Printer* printer) const { Formatter format(printer, variables_); - format("::$proto_ns$::RepeatedPtrField<$string$> $name$_;\n"); + format("::$proto_ns$::RepeatedPtrField $name$_;\n"); } void RepeatedStringFieldGenerator:: @@ -1069,52 +1015,42 @@ GenerateAccessorDeclarations(io::Printer* printer) const { } format( - "$deprecated_attr$const $string$& ${1$$name$$}$(int index) const;\n" - "$deprecated_attr$$string$* ${1$mutable_$name$$}$(int index);\n" + "$deprecated_attr$const std::string& ${1$$name$$}$(int index) const;\n" + "$deprecated_attr$std::string* ${1$mutable_$name$$}$(int index);\n" "$deprecated_attr$void ${1$set_$name$$}$(int index, const " - "$string$& value);\n" - "#if LANG_CXX11\n" - "$deprecated_attr$void ${1$set_$name$$}$(int index, $string$&& value);\n" - "#endif\n" + "std::string& value);\n" + "$deprecated_attr$void ${1$set_$name$$}$(int index, std::string&& " + "value);\n" "$deprecated_attr$void ${1$set_$name$$}$(int index, const " "char* value);\n", descriptor_); if (!options_.opensource_runtime) { format( "$deprecated_attr$void ${1$set_$name$$}$(int index, " - "StringPiece value);\n" - "#ifdef HAS_GLOBAL_STRING\n" - "$deprecated_attr$void ${1$set_$name$$}$(int index, const " - "::std::string& value);\n" - "#endif\n", + "StringPiece value);\n", descriptor_); } format( "$deprecated_attr$void ${1$set_$name$$}$(" "int index, const $pointer_type$* value, size_t size);\n" - "$deprecated_attr$$string$* ${1$add_$name$$}$();\n" - "$deprecated_attr$void ${1$add_$name$$}$(const $string$& value);\n" - "#if LANG_CXX11\n" - "$deprecated_attr$void ${1$add_$name$$}$($string$&& value);\n" - "#endif\n" + "$deprecated_attr$std::string* ${1$add_$name$$}$();\n" + "$deprecated_attr$void ${1$add_$name$$}$(const std::string& value);\n" + "$deprecated_attr$void ${1$add_$name$$}$(std::string&& value);\n" "$deprecated_attr$void ${1$add_$name$$}$(const char* value);\n", descriptor_); if (!options_.opensource_runtime) { format( - "$deprecated_attr$void ${1$add_$name$$}$(StringPiece value);\n" - "#ifdef HAS_GLOBAL_STRING\n" - "$deprecated_attr$void ${1$add_$name$$}$(const ::std::string& value);\n" - "#endif\n", + "$deprecated_attr$void ${1$add_$name$$}$(StringPiece value);\n", descriptor_); } format( "$deprecated_attr$void ${1$add_$name$$}$(const $pointer_type$* " "value, size_t size)" ";\n" - "$deprecated_attr$const ::$proto_ns$::RepeatedPtrField<$string$>& " + "$deprecated_attr$const ::$proto_ns$::RepeatedPtrField& " "${1$$name$$}$() " "const;\n" - "$deprecated_attr$::$proto_ns$::RepeatedPtrField<$string$>* " + "$deprecated_attr$::$proto_ns$::RepeatedPtrField* " "${1$mutable_$name$$}$()" ";\n", descriptor_); @@ -1131,34 +1067,33 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { Formatter format(printer, variables_); if (options_.safe_boundary_check) { format( - "inline const $string$& $classname$::$name$(int index) const {\n" + "inline const std::string& $classname$::$name$(int index) const {\n" " // @@protoc_insertion_point(field_get:$full_name$)\n" " return $name$_.InternalCheckedGet(\n" " index, ::$proto_ns$::internal::GetEmptyStringAlreadyInited());\n" "}\n"); } else { format( - "inline const $string$& $classname$::$name$(int index) const {\n" + "inline const std::string& $classname$::$name$(int index) const {\n" " // @@protoc_insertion_point(field_get:$full_name$)\n" " return $name$_.Get(index);\n" "}\n"); } format( - "inline $string$* $classname$::mutable_$name$(int index) {\n" + "inline std::string* $classname$::mutable_$name$(int index) {\n" " // @@protoc_insertion_point(field_mutable:$full_name$)\n" " return $name$_.Mutable(index);\n" "}\n" - "inline void $classname$::set_$name$(int index, const $string$& value) " + "inline void $classname$::set_$name$(int index, const std::string& " + "value) " "{\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" " $name$_.Mutable(index)->assign(value);\n" "}\n" - "#if LANG_CXX11\n" - "inline void $classname$::set_$name$(int index, $string$&& value) {\n" + "inline void $classname$::set_$name$(int index, std::string&& value) {\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" " $name$_.Mutable(index)->assign(std::move(value));\n" "}\n" - "#endif\n" "inline void $classname$::set_$name$(int index, const char* value) {\n" " $null_check$" " $name$_.Mutable(index)->assign(value);\n" @@ -1170,14 +1105,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { "$classname$::set_$name$(int index, StringPiece value) {\n" " $name$_.Mutable(index)->assign(value.data(), value.size());\n" " // @@protoc_insertion_point(field_set_string_piece:$full_name$)\n" - "}\n" - "#ifdef HAS_GLOBAL_STRING\n" - "inline void " - "$classname$::set_$name$(int index, const std::string& value) {\n" - " $name$_.Mutable(index)->assign(value.data(), value.size());\n" - " // @@protoc_insertion_point(field_set_std_string:$full_name$)\n" - "}\n" - "#endif\n"); + "}\n"); } format( "inline void " @@ -1187,20 +1115,18 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " reinterpret_cast(value), size);\n" " // @@protoc_insertion_point(field_set_pointer:$full_name$)\n" "}\n" - "inline $string$* $classname$::add_$name$() {\n" + "inline std::string* $classname$::add_$name$() {\n" " // @@protoc_insertion_point(field_add_mutable:$full_name$)\n" " return $name$_.Add();\n" "}\n" - "inline void $classname$::add_$name$(const $string$& value) {\n" + "inline void $classname$::add_$name$(const std::string& value) {\n" " $name$_.Add()->assign(value);\n" " // @@protoc_insertion_point(field_add:$full_name$)\n" "}\n" - "#if LANG_CXX11\n" - "inline void $classname$::add_$name$($string$&& value) {\n" + "inline void $classname$::add_$name$(std::string&& value) {\n" " $name$_.Add(std::move(value));\n" " // @@protoc_insertion_point(field_add:$full_name$)\n" "}\n" - "#endif\n" "inline void $classname$::add_$name$(const char* value) {\n" " $null_check$" " $name$_.Add()->assign(value);\n" @@ -1211,13 +1137,7 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { "inline void $classname$::add_$name$(StringPiece value) {\n" " $name$_.Add()->assign(value.data(), value.size());\n" " // @@protoc_insertion_point(field_add_string_piece:$full_name$)\n" - "}\n" - "#ifdef HAS_GLOBAL_STRING\n" - "inline void $classname$::add_$name$(const ::std::string& value) {\n" - " $name$_.Add()->assign(value.data(), value.size());\n" - " // @@protoc_insertion_point(field_add_std_string:$full_name$)\n" - "}\n" - "#endif\n"); + "}\n"); } format( "inline void " @@ -1225,12 +1145,12 @@ GenerateInlineAccessorDefinitions(io::Printer* printer) const { " $name$_.Add()->assign(reinterpret_cast(value), size);\n" " // @@protoc_insertion_point(field_add_pointer:$full_name$)\n" "}\n" - "inline const ::$proto_ns$::RepeatedPtrField<$string$>&\n" + "inline const ::$proto_ns$::RepeatedPtrField&\n" "$classname$::$name$() const {\n" " // @@protoc_insertion_point(field_list:$full_name$)\n" " return $name$_;\n" "}\n" - "inline ::$proto_ns$::RepeatedPtrField<$string$>*\n" + "inline ::$proto_ns$::RepeatedPtrField*\n" "$classname$::mutable_$name$() {\n" " // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" " return &$name$_;\n" diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.inc b/src/google/protobuf/compiler/cpp/cpp_unittest.inc index e6aded7b12..6917a2379e 100644 --- a/src/google/protobuf/compiler/cpp/cpp_unittest.inc +++ b/src/google/protobuf/compiler/cpp/cpp_unittest.inc @@ -94,11 +94,11 @@ class MockErrorCollector : public MultiFileErrorCollector { MockErrorCollector() {} ~MockErrorCollector() {} - string text_; + std::string text_; // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, int line, int column, - const string& message) { + void AddError(const std::string& filename, int line, int column, + const std::string& message) { strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, column, message); } @@ -142,7 +142,7 @@ TEST(GENERATED_DESCRIPTOR_TEST_NAME, IdenticalDescriptors) { // limit for string literal size TEST(GENERATED_DESCRIPTOR_TEST_NAME, EnormousDescriptor) { const Descriptor* generated_descriptor = - TestEnormousDescriptor::descriptor(); + ::protobuf_unittest::TestEnormousDescriptor::descriptor(); EXPECT_TRUE(generated_descriptor != NULL); } @@ -241,8 +241,8 @@ TEST(GENERATED_MESSAGE_TEST_NAME, MutableStringDefault) { TEST(GENERATED_MESSAGE_TEST_NAME, StringDefaults) { UNITTEST::TestExtremeDefaultValues message; // Check if '\000' can be used in default string value. - EXPECT_EQ(string("hel\000lo", 6), message.string_with_zero()); - EXPECT_EQ(string("wor\000ld", 6), message.bytes_with_zero()); + EXPECT_EQ(std::string("hel\000lo", 6), message.string_with_zero()); + EXPECT_EQ(std::string("wor\000ld", 6), message.bytes_with_zero()); } TEST(GENERATED_MESSAGE_TEST_NAME, ReleaseString) { @@ -256,7 +256,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, ReleaseString) { message.set_default_string("blah"); EXPECT_TRUE(message.has_default_string()); - std::unique_ptr str(message.release_default_string()); + std::unique_ptr str(message.release_default_string()); EXPECT_FALSE(message.has_default_string()); ASSERT_TRUE(str != NULL); EXPECT_EQ("blah", *str); @@ -290,7 +290,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, SetAllocatedString) { UNITTEST::TestAllTypes message; EXPECT_FALSE(message.has_optional_string()); - const string kHello("hello"); + const std::string kHello("hello"); message.set_optional_string(kHello); EXPECT_TRUE(message.has_optional_string()); @@ -298,7 +298,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, SetAllocatedString) { EXPECT_FALSE(message.has_optional_string()); EXPECT_EQ("", message.optional_string()); - message.set_allocated_optional_string(new string(kHello)); + message.set_allocated_optional_string(new std::string(kHello)); EXPECT_TRUE(message.has_optional_string()); EXPECT_EQ(kHello, message.optional_string()); } @@ -402,70 +402,68 @@ TEST(GENERATED_MESSAGE_TEST_NAME, StringCharStarLength) { EXPECT_EQ("wx", message.repeated_string(0)); } -#if LANG_CXX11 TEST(GENERATED_MESSAGE_TEST_NAME, StringMove) { // Verify that we trigger the move behavior on a scalar setter. protobuf_unittest_no_arena::TestAllTypes message; { - string tmp(32, 'a'); + std::string tmp(32, 'a'); const char* old_data = tmp.data(); message.set_optional_string(std::move(tmp)); const char* new_data = message.optional_string().data(); EXPECT_EQ(old_data, new_data); - EXPECT_EQ(string(32, 'a'), message.optional_string()); + EXPECT_EQ(std::string(32, 'a'), message.optional_string()); - string tmp2(32, 'b'); + std::string tmp2(32, 'b'); old_data = tmp2.data(); message.set_optional_string(std::move(tmp2)); new_data = message.optional_string().data(); EXPECT_EQ(old_data, new_data); - EXPECT_EQ(string(32, 'b'), message.optional_string()); + EXPECT_EQ(std::string(32, 'b'), message.optional_string()); } // Verify that we trigger the move behavior on a oneof setter. { - string tmp(32, 'a'); + std::string tmp(32, 'a'); const char* old_data = tmp.data(); message.set_oneof_string(std::move(tmp)); const char* new_data = message.oneof_string().data(); EXPECT_EQ(old_data, new_data); - EXPECT_EQ(string(32, 'a'), message.oneof_string()); + EXPECT_EQ(std::string(32, 'a'), message.oneof_string()); - string tmp2(32, 'b'); + std::string tmp2(32, 'b'); old_data = tmp2.data(); message.set_oneof_string(std::move(tmp2)); new_data = message.oneof_string().data(); EXPECT_EQ(old_data, new_data); - EXPECT_EQ(string(32, 'b'), message.oneof_string()); + EXPECT_EQ(std::string(32, 'b'), message.oneof_string()); } // Verify that we trigger the move behavior on a repeated setter. { - string tmp(32, 'a'); + std::string tmp(32, 'a'); const char* old_data = tmp.data(); message.add_repeated_string(std::move(tmp)); const char* new_data = message.repeated_string(0).data(); EXPECT_EQ(old_data, new_data); - EXPECT_EQ(string(32, 'a'), message.repeated_string(0)); + EXPECT_EQ(std::string(32, 'a'), message.repeated_string(0)); - string tmp2(32, 'b'); + std::string tmp2(32, 'b'); old_data = tmp2.data(); message.set_repeated_string(0, std::move(tmp2)); new_data = message.repeated_string(0).data(); EXPECT_EQ(old_data, new_data); - EXPECT_EQ(string(32, 'b'), message.repeated_string(0)); + EXPECT_EQ(std::string(32, 'b'), message.repeated_string(0)); } } -#endif TEST(GENERATED_MESSAGE_TEST_NAME, CopyFrom) { @@ -666,7 +664,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, UpcastCopyFrom) { TestUtil::SetAllFields(&message1); - const Message* source = ::google::protobuf::implicit_cast(&message1); + const Message* source = implicit_cast(&message1); message2.CopyFrom(*source); TestUtil::ExpectAllFieldsSet(message2); @@ -727,7 +725,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, NonEmptyMergeFrom) { // Test the generated SerializeWithCachedSizesToArray(), TEST(GENERATED_MESSAGE_TEST_NAME, SerializationToArray) { UNITTEST::TestAllTypes message1, message2; - string data; + std::string data; TestUtil::SetAllFields(&message1); int size = message1.ByteSizeLong(); data.resize(size); @@ -741,7 +739,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, SerializationToArray) { TEST(GENERATED_MESSAGE_TEST_NAME, PackedFieldsSerializationToArray) { UNITTEST::TestPackedTypes packed_message1, packed_message2; - string packed_data; + std::string packed_data; TestUtil::SetPackedFields(&packed_message1); int packed_size = packed_message1.ByteSizeLong(); packed_data.resize(packed_size); @@ -758,7 +756,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, SerializationToStream) { UNITTEST::TestAllTypes message1, message2; TestUtil::SetAllFields(&message1); int size = message1.ByteSizeLong(); - string data; + std::string data; data.resize(size); { // Allow the output stream to buffer only one byte at a time. @@ -777,7 +775,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, PackedFieldsSerializationToStream) { UNITTEST::TestPackedTypes message1, message2; TestUtil::SetPackedFields(&message1); int size = message1.ByteSizeLong(); - string data; + std::string data; data.resize(size); { // Allow the output stream to buffer only one byte at a time. @@ -844,7 +842,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, ForeignNested) { TEST(GENERATED_MESSAGE_TEST_NAME, ReallyLargeTagNumber) { // Test that really large tag numbers don't break anything. UNITTEST::TestReallyLargeTagNumber message1, message2; - string data; + std::string data; // For the most part, if this compiles and runs then we're probably good. // (The most likely cause for failure would be if something were attempting @@ -927,7 +925,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, TestEmbedOptimizedForSize) { UNITTEST::TestEmbedOptimizedForSize message, message2; message.mutable_optional_message()->set_i(1); message.add_repeated_message()->mutable_msg()->set_c(2); - string data; + std::string data; message.SerializeToString(&data); ASSERT_TRUE(message2.ParseFromString(data)); EXPECT_EQ(1, message2.optional_message().i()); @@ -956,7 +954,7 @@ TEST(GENERATED_MESSAGE_TEST_NAME, TestSpaceUsed) { // Setting a string to a value larger than the string object itself should // increase SpaceUsedLong(), because it cannot store the value internally. - message1.set_optional_string(string(sizeof(string) + 1, 'x')); + message1.set_optional_string(std::string(sizeof(std::string) + 1, 'x')); int min_expected_increase = message1.optional_string().capacity(); EXPECT_LE(empty_message_size + min_expected_increase, message1.SpaceUsedLong()); @@ -986,14 +984,14 @@ TEST(GENERATED_MESSAGE_TEST_NAME, TestOneofSpaceUsed) { // Setting a string in oneof to a small value should only increase // SpaceUsedLong() by the size of a string object. message1.set_foo_string("abc"); - EXPECT_LE(empty_message_size + sizeof(string), message1.SpaceUsedLong()); + EXPECT_LE(empty_message_size + sizeof(std::string), message1.SpaceUsedLong()); // Setting a string in oneof to a value larger than the string object itself // should increase SpaceUsedLong(), because it cannot store the value // internally. - message1.set_foo_string(string(sizeof(string) + 1, 'x')); - int min_expected_increase = message1.foo_string().capacity() + - sizeof(string); + message1.set_foo_string(std::string(sizeof(std::string) + 1, 'x')); + int min_expected_increase = + message1.foo_string().capacity() + sizeof(std::string); EXPECT_LE(empty_message_size + min_expected_increase, message1.SpaceUsedLong()); @@ -1038,10 +1036,10 @@ TEST(GENERATED_MESSAGE_TEST_NAME, ExtensionConstantValues) { } TEST(GENERATED_MESSAGE_TEST_NAME, ParseFromTruncated) { - const string long_string = string(128, 'q'); + const std::string long_string = std::string(128, 'q'); FileDescriptorProto p; p.add_extension()->set_name(long_string); - const string msg = p.SerializeAsString(); + const std::string msg = p.SerializeAsString(); int successful_count = 0; for (int i = 0; i <= msg.size(); i++) { if (p.ParseFromArray(msg.c_str(), i)) { @@ -1244,7 +1242,7 @@ class GENERATED_SERVICE_TEST_NAME : public testing::Test { // --------------------------------------------------------------- bool called_; - string method_; + std::string method_; RpcController* controller_; const Message* request_; Message* response_; @@ -1304,14 +1302,14 @@ class GENERATED_SERVICE_TEST_NAME : public testing::Test { ADD_FAILURE() << "Failed() not expected during this test."; return false; } - string ErrorText() const { + std::string ErrorText() const { ADD_FAILURE() << "ErrorText() not expected during this test."; return ""; } void StartCancel() { ADD_FAILURE() << "StartCancel() not expected during this test."; } - void SetFailed(const string& reason) { + void SetFailed(const std::string& reason) { ADD_FAILURE() << "SetFailed() not expected during this test."; } bool IsCanceled() const { @@ -1471,7 +1469,7 @@ TEST_F(GENERATED_SERVICE_TEST_NAME, NotImplemented) { public: ExpectUnimplementedController() : called_(false) {} - void SetFailed(const string& reason) { + void SetFailed(const std::string& reason) { EXPECT_FALSE(called_); called_ = true; EXPECT_EQ("Method Foo() not implemented.", reason); @@ -1621,7 +1619,7 @@ TEST_F(OneofTest, SetString) { message.clear_foo_string(); EXPECT_FALSE(message.has_foo_string()); - message.set_foo_string(string("bar")); + message.set_foo_string(std::string("bar")); EXPECT_TRUE(message.has_foo_string()); EXPECT_EQ(message.foo_string(), "bar"); message.clear_foo_string(); @@ -1657,7 +1655,7 @@ TEST_F(OneofTest, ReleaseString) { message.set_foo_string("blah"); EXPECT_TRUE(message.has_foo_string()); - std::unique_ptr str(message.release_foo_string()); + std::unique_ptr str(message.release_foo_string()); EXPECT_FALSE(message.has_foo_string()); ASSERT_TRUE(str != NULL); EXPECT_EQ("blah", *str); @@ -1671,7 +1669,7 @@ TEST_F(OneofTest, SetAllocatedString) { UNITTEST::TestOneof2 message; EXPECT_FALSE(message.has_foo_string()); - const string kHello("hello"); + const std::string kHello("hello"); message.set_foo_string(kHello); EXPECT_TRUE(message.has_foo_string()); @@ -1679,7 +1677,7 @@ TEST_F(OneofTest, SetAllocatedString) { EXPECT_FALSE(message.has_foo_string()); EXPECT_EQ("", message.foo_string()); - message.set_allocated_foo_string(new string(kHello)); + message.set_allocated_foo_string(new std::string(kHello)); EXPECT_TRUE(message.has_foo_string()); EXPECT_EQ(kHello, message.foo_string()); } @@ -1873,7 +1871,7 @@ TEST_F(OneofTest, UpcastCopyFrom) { message1.mutable_foogroup()->set_a(123); EXPECT_TRUE(message1.has_foogroup()); - const Message* source = ::google::protobuf::implicit_cast(&message1); + const Message* source = implicit_cast(&message1); message2.CopyFrom(*source); EXPECT_TRUE(message2.has_foogroup()); @@ -1888,21 +1886,21 @@ TEST_F(OneofTest, SerializationToArray) { // Primitive type { UNITTEST::TestOneof2 message1, message2; - string data; - message1.set_foo_int(123); - int size = message1.ByteSizeLong(); - data.resize(size); - uint8* start = reinterpret_cast(::google::protobuf::string_as_array(&data)); - uint8* end = message1.SerializeWithCachedSizesToArray(start); - EXPECT_EQ(size, end - start); - EXPECT_TRUE(message2.ParseFromString(data)); - EXPECT_EQ(message2.foo_int(), 123); +std::string data; +message1.set_foo_int(123); +int size = message1.ByteSizeLong(); +data.resize(size); +uint8* start = reinterpret_cast(::google::protobuf::string_as_array(&data)); +uint8* end = message1.SerializeWithCachedSizesToArray(start); +EXPECT_EQ(size, end - start); +EXPECT_TRUE(message2.ParseFromString(data)); +EXPECT_EQ(message2.foo_int(), 123); } // String { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.set_foo_string("foo"); int size = message1.ByteSizeLong(); data.resize(size); @@ -1917,7 +1915,7 @@ TEST_F(OneofTest, SerializationToArray) { // Bytes { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.set_foo_bytes("qux"); int size = message1.ByteSizeLong(); data.resize(size); @@ -1931,7 +1929,7 @@ TEST_F(OneofTest, SerializationToArray) { // Enum { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.set_foo_enum(UNITTEST::TestOneof2::FOO); int size = message1.ByteSizeLong(); data.resize(size); @@ -1945,7 +1943,7 @@ TEST_F(OneofTest, SerializationToArray) { // Message { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.mutable_foo_message()->set_qux_int(234); int size = message1.ByteSizeLong(); data.resize(size); @@ -1959,7 +1957,7 @@ TEST_F(OneofTest, SerializationToArray) { // Group { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.mutable_foogroup()->set_a(345); int size = message1.ByteSizeLong(); data.resize(size); @@ -1981,19 +1979,19 @@ TEST_F(OneofTest, SerializationToStream) { // Primitive type { UNITTEST::TestOneof2 message1, message2; - string data; - message1.set_foo_int(123); - int size = message1.ByteSizeLong(); - data.resize(size); +std::string data; +message1.set_foo_int(123); +int size = message1.ByteSizeLong(); +data.resize(size); - { - // Allow the output stream to buffer only one byte at a time. - io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&data), size, 1); - io::CodedOutputStream output_stream(&array_stream); - message1.SerializeWithCachedSizes(&output_stream); - EXPECT_FALSE(output_stream.HadError()); - EXPECT_EQ(size, output_stream.ByteCount()); - } +{ + // Allow the output stream to buffer only one byte at a time. + io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&data), size, 1); + io::CodedOutputStream output_stream(&array_stream); + message1.SerializeWithCachedSizes(&output_stream); + EXPECT_FALSE(output_stream.HadError()); + EXPECT_EQ(size, output_stream.ByteCount()); +} EXPECT_TRUE(message2.ParseFromString(data)); EXPECT_EQ(message2.foo_int(), 123); @@ -2002,7 +2000,7 @@ TEST_F(OneofTest, SerializationToStream) { // String { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.set_foo_string("foo"); int size = message1.ByteSizeLong(); data.resize(size); @@ -2024,7 +2022,7 @@ TEST_F(OneofTest, SerializationToStream) { // Bytes { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.set_foo_bytes("qux"); int size = message1.ByteSizeLong(); data.resize(size); @@ -2045,7 +2043,7 @@ TEST_F(OneofTest, SerializationToStream) { // Enum { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.set_foo_enum(UNITTEST::TestOneof2::FOO); int size = message1.ByteSizeLong(); data.resize(size); @@ -2066,7 +2064,7 @@ TEST_F(OneofTest, SerializationToStream) { // Message { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.mutable_foo_message()->set_qux_int(234); int size = message1.ByteSizeLong(); data.resize(size); @@ -2087,7 +2085,7 @@ TEST_F(OneofTest, SerializationToStream) { // Group { UNITTEST::TestOneof2 message1, message2; - string data; + std::string data; message1.mutable_foogroup()->set_a(345); int size = message1.ByteSizeLong(); data.resize(size); @@ -2153,12 +2151,12 @@ TEST(HELPERS_TEST_NAME, TestSCC) { UNITTEST::TestMutualRecursionA a; MessageSCCAnalyzer scc_analyzer((Options())); const SCC* scc = scc_analyzer.GetSCC(a.GetDescriptor()); - std::vector names; + std::vector names; names.reserve(scc->descriptors.size()); for (int i = 0; i < scc->descriptors.size(); i++) { names.push_back(scc->descriptors[i]->full_name()); } - string package = a.GetDescriptor()->file()->package(); + std::string package = a.GetDescriptor()->file()->package(); ASSERT_EQ(names.size(), 4); std::sort(names.begin(), names.end()); EXPECT_EQ(names[0], package + ".TestMutualRecursionA"); @@ -2226,16 +2224,19 @@ namespace cpp_unittest { TEST_F(GENERATED_SERVICE_TEST_NAME, NoGenericServices) { // Verify that non-services in unittest_no_generic_services.proto were // generated. - no_generic_services_test::TestMessage message; + ::protobuf_unittest::no_generic_services_test::TestMessage message; message.set_a(1); - message.SetExtension(no_generic_services_test::test_extension, 123); - no_generic_services_test::TestEnum e = no_generic_services_test::FOO; + message.SetExtension( + ::protobuf_unittest::no_generic_services_test::test_extension, 123); + ::protobuf_unittest::no_generic_services_test::TestEnum e = + ::protobuf_unittest::no_generic_services_test::FOO; EXPECT_EQ(e, 1); // Verify that a ServiceDescriptor is generated for the service even if the // class itself is not. const FileDescriptor* file = - no_generic_services_test::TestMessage::descriptor()->file(); + ::google::protobuf::unittest::no_generic_services_test::TestMessage::descriptor() + ->file(); ASSERT_EQ(1, file->service_count()); EXPECT_EQ("TestService", file->service(0)->name()); diff --git a/src/google/protobuf/compiler/cpp/metadata_test.cc b/src/google/protobuf/compiler/cpp/metadata_test.cc index 77636fe982..3cdda93f14 100644 --- a/src/google/protobuf/compiler/cpp/metadata_test.cc +++ b/src/google/protobuf/compiler/cpp/metadata_test.cc @@ -56,14 +56,14 @@ class CppMetadataTest : public ::testing::Test { // code from the previously added file with name `filename`. Returns true on // success. If pb_h is non-null, expects a .pb.h and a .pb.h.meta (copied to // pb_h and pb_h_info respecfively); similarly for proto_h and proto_h_info. - bool CaptureMetadata(const string& filename, FileDescriptorProto* file, - string* pb_h, GeneratedCodeInfo* pb_h_info, - string* proto_h, GeneratedCodeInfo* proto_h_info, - string* pb_cc) { + bool CaptureMetadata(const std::string& filename, FileDescriptorProto* file, + std::string* pb_h, GeneratedCodeInfo* pb_h_info, + std::string* proto_h, GeneratedCodeInfo* proto_h_info, + std::string* pb_cc) { CommandLineInterface cli; CppGenerator cpp_generator; cli.RegisterGenerator("--cpp_out", &cpp_generator, ""); - string cpp_out = + std::string cpp_out = "--cpp_out=annotate_headers=true," "annotation_pragma_name=pragma_name," "annotation_guard_name=guard_name:" + @@ -76,7 +76,7 @@ class CppMetadataTest : public ::testing::Test { return result; } - string output_base = TestTempDir() + "/" + StripProto(filename); + std::string output_base = TestTempDir() + "/" + StripProto(filename); if (pb_cc != NULL) { GOOGLE_CHECK_OK( @@ -112,7 +112,7 @@ const char kSmallTestFile[] = TEST_F(CppMetadataTest, CapturesEnumNames) { FileDescriptorProto file; GeneratedCodeInfo info; - string pb_h; + std::string pb_h; atu::AddFile("test.proto", kSmallTestFile); EXPECT_TRUE( CaptureMetadata("test.proto", &file, &pb_h, &info, NULL, NULL, NULL)); @@ -129,19 +129,19 @@ TEST_F(CppMetadataTest, CapturesEnumNames) { TEST_F(CppMetadataTest, AddsPragma) { FileDescriptorProto file; GeneratedCodeInfo info; - string pb_h; + std::string pb_h; atu::AddFile("test.proto", kSmallTestFile); EXPECT_TRUE( CaptureMetadata("test.proto", &file, &pb_h, &info, NULL, NULL, NULL)); EXPECT_TRUE(pb_h.find("#ifdef guard_name") != string::npos); EXPECT_TRUE(pb_h.find("#pragma pragma_name \"test.pb.h.meta\"") != - string::npos); + std::string::npos); } TEST_F(CppMetadataTest, CapturesMessageNames) { FileDescriptorProto file; GeneratedCodeInfo info; - string pb_h; + std::string pb_h; atu::AddFile("test.proto", kSmallTestFile); EXPECT_TRUE( CaptureMetadata("test.proto", &file, &pb_h, &info, NULL, NULL, NULL)); diff --git a/src/google/protobuf/compiler/csharp/csharp_generator.h b/src/google/protobuf/compiler/csharp/csharp_generator.h index dc7319b196..1ed36ab5c5 100644 --- a/src/google/protobuf/compiler/csharp/csharp_generator.h +++ b/src/google/protobuf/compiler/csharp/csharp_generator.h @@ -49,7 +49,7 @@ namespace csharp { // it to support C# output, you can do so by registering an instance of this // CodeGenerator with the CommandLineInterface in your main() function. class PROTOC_EXPORT Generator - : public google::protobuf::compiler::CodeGenerator { + : public PROTOBUF_NAMESPACE_ID::compiler::CodeGenerator { public: virtual bool Generate( const FileDescriptor* file, diff --git a/src/google/protobuf/compiler/importer.cc b/src/google/protobuf/compiler/importer.cc index 9ea544de1d..54ddfb83c6 100644 --- a/src/google/protobuf/compiler/importer.cc +++ b/src/google/protobuf/compiler/importer.cc @@ -73,7 +73,7 @@ using google::protobuf::internal::win32::open; // Returns true if the text looks like a Windows-style absolute path, starting // with a drive letter. Example: "C:\foo". TODO(kenton): Share this with // copy in command_line_interface.cc? -static bool IsWindowsAbsolutePath(const string& text) { +static bool IsWindowsAbsolutePath(const std::string& text) { #if defined(_WIN32) || defined(__CYGWIN__) return text.size() >= 3 && text[1] == ':' && isalpha(text[0]) && @@ -93,17 +93,17 @@ MultiFileErrorCollector::~MultiFileErrorCollector() {} class SourceTreeDescriptorDatabase::SingleFileErrorCollector : public io::ErrorCollector { public: - SingleFileErrorCollector(const string& filename, + SingleFileErrorCollector(const std::string& filename, MultiFileErrorCollector* multi_file_error_collector) - : filename_(filename), - multi_file_error_collector_(multi_file_error_collector), - had_errors_(false) {} + : filename_(filename), + multi_file_error_collector_(multi_file_error_collector), + had_errors_(false) {} ~SingleFileErrorCollector() {} bool had_errors() { return had_errors_; } // implements ErrorCollector --------------------------------------- - void AddError(int line, int column, const string& message) override { + void AddError(int line, int column, const std::string& message) override { if (multi_file_error_collector_ != NULL) { multi_file_error_collector_->AddError(filename_, line, column, message); } @@ -111,7 +111,7 @@ class SourceTreeDescriptorDatabase::SingleFileErrorCollector } private: - string filename_; + std::string filename_; MultiFileErrorCollector* multi_file_error_collector_; bool had_errors_; }; @@ -136,8 +136,8 @@ SourceTreeDescriptorDatabase::SourceTreeDescriptorDatabase( SourceTreeDescriptorDatabase::~SourceTreeDescriptorDatabase() {} -bool SourceTreeDescriptorDatabase::FindFileByName( - const string& filename, FileDescriptorProto* output) { +bool SourceTreeDescriptorDatabase::FindFileByName(const std::string& filename, + FileDescriptorProto* output) { std::unique_ptr input(source_tree_->Open(filename)); if (input == NULL) { if (fallback_database_ != nullptr && @@ -170,12 +170,12 @@ bool SourceTreeDescriptorDatabase::FindFileByName( } bool SourceTreeDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, FileDescriptorProto* output) { + const std::string& symbol_name, FileDescriptorProto* output) { return false; } bool SourceTreeDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, int field_number, + const std::string& containing_type, int field_number, FileDescriptorProto* output) { return false; } @@ -190,11 +190,9 @@ SourceTreeDescriptorDatabase::ValidationErrorCollector:: ~ValidationErrorCollector() {} void SourceTreeDescriptorDatabase::ValidationErrorCollector::AddError( - const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message) { + const std::string& filename, const std::string& element_name, + const Message* descriptor, ErrorLocation location, + const std::string& message) { if (owner_->error_collector_ == NULL) return; int line, column; @@ -203,11 +201,9 @@ void SourceTreeDescriptorDatabase::ValidationErrorCollector::AddError( } void SourceTreeDescriptorDatabase::ValidationErrorCollector::AddWarning( - const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message) { + const std::string& filename, const std::string& element_name, + const Message* descriptor, ErrorLocation location, + const std::string& message) { if (owner_->error_collector_ == NULL) return; int line, column; @@ -227,11 +223,11 @@ Importer::Importer(SourceTree* source_tree, Importer::~Importer() {} -const FileDescriptor* Importer::Import(const string& filename) { +const FileDescriptor* Importer::Import(const std::string& filename) { return pool_.FindFileByName(filename); } -void Importer::AddUnusedImportTrackFile(const string& file_name) { +void Importer::AddUnusedImportTrackFile(const std::string& file_name) { pool_.AddUnusedImportTrackFile(file_name); } @@ -244,15 +240,13 @@ void Importer::ClearUnusedImportTrackFiles() { SourceTree::~SourceTree() {} -string SourceTree::GetLastErrorMessage() { - return "File not found."; -} +std::string SourceTree::GetLastErrorMessage() { return "File not found."; } DiskSourceTree::DiskSourceTree() {} DiskSourceTree::~DiskSourceTree() {} -static inline char LastChar(const string& str) { +static inline char LastChar(const std::string& str) { return str[str.size() - 1]; } @@ -275,7 +269,7 @@ static inline char LastChar(const string& str) { // then if foo/bar is a symbolic link, foo/bar/baz.proto will canonicalize // to a path which does not appear to be under foo, and thus the compiler // will complain that baz.proto is not inside the --proto_path. -static string CanonicalizePath(string path) { +static std::string CanonicalizePath(std::string path) { #ifdef _WIN32 // The Win32 API accepts forward slashes as a path delimiter even though // backslashes are standard. Let's avoid confusion and use only forward @@ -288,8 +282,8 @@ static string CanonicalizePath(string path) { } #endif - std::vector canonical_parts; - std::vector parts = Split( + std::vector canonical_parts; + std::vector parts = Split( path, "/", true); // Note: Removes empty parts. for (int i = 0; i < parts.size(); i++) { if (parts[i] == ".") { @@ -298,7 +292,7 @@ static string CanonicalizePath(string path) { canonical_parts.push_back(parts[i]); } } - string result = Join(canonical_parts, "/"); + std::string result = Join(canonical_parts, "/"); if (!path.empty() && path[0] == '/') { // Restore leading slash. result = '/' + result; @@ -311,7 +305,7 @@ static string CanonicalizePath(string path) { return result; } -static inline bool ContainsParentReference(const string& path) { +static inline bool ContainsParentReference(const std::string& path) { return path == ".." || HasPrefixString(path, "../") || HasSuffixString(path, "/..") || path.find("/../") != string::npos; } @@ -333,10 +327,9 @@ static inline bool ContainsParentReference(const string& path) { // assert(!ApplyMapping("foo/bar", "baz", "qux", &result)); // assert(!ApplyMapping("foo/bar", "baz", "qux", &result)); // assert(!ApplyMapping("foobar", "foo", "baz", &result)); -static bool ApplyMapping(const string& filename, - const string& old_prefix, - const string& new_prefix, - string* result) { +static bool ApplyMapping(const std::string& filename, + const std::string& old_prefix, + const std::string& new_prefix, std::string* result) { if (old_prefix.empty()) { // old_prefix matches any relative path. if (ContainsParentReference(filename)) { @@ -372,7 +365,7 @@ static bool ApplyMapping(const string& filename, if (after_prefix_start != -1) { // Yep. So the prefixes are directories and the filename is a file // inside them. - string after_prefix = filename.substr(after_prefix_start); + std::string after_prefix = filename.substr(after_prefix_start); if (ContainsParentReference(after_prefix)) { // We do not allow the file name to use "..". return false; @@ -388,18 +381,17 @@ static bool ApplyMapping(const string& filename, return false; } -void DiskSourceTree::MapPath(const string& virtual_path, - const string& disk_path) { +void DiskSourceTree::MapPath(const std::string& virtual_path, + const std::string& disk_path) { mappings_.push_back(Mapping(virtual_path, CanonicalizePath(disk_path))); } DiskSourceTree::DiskFileToVirtualFileResult -DiskSourceTree::DiskFileToVirtualFile( - const string& disk_file, - string* virtual_file, - string* shadowing_disk_file) { +DiskSourceTree::DiskFileToVirtualFile(const std::string& disk_file, + std::string* virtual_file, + std::string* shadowing_disk_file) { int mapping_index = -1; - string canonical_disk_file = CanonicalizePath(disk_file); + std::string canonical_disk_file = CanonicalizePath(disk_file); for (int i = 0; i < mappings_.size(); i++) { // Apply the mapping in reverse. @@ -439,24 +431,23 @@ DiskSourceTree::DiskFileToVirtualFile( return SUCCESS; } -bool DiskSourceTree::VirtualFileToDiskFile(const string& virtual_file, - string* disk_file) { +bool DiskSourceTree::VirtualFileToDiskFile(const std::string& virtual_file, + std::string* disk_file) { std::unique_ptr stream( OpenVirtualFile(virtual_file, disk_file)); return stream != NULL; } -io::ZeroCopyInputStream* DiskSourceTree::Open(const string& filename) { +io::ZeroCopyInputStream* DiskSourceTree::Open(const std::string& filename) { return OpenVirtualFile(filename, NULL); } -string DiskSourceTree::GetLastErrorMessage() { +std::string DiskSourceTree::GetLastErrorMessage() { return last_error_message_; } io::ZeroCopyInputStream* DiskSourceTree::OpenVirtualFile( - const string& virtual_file, - string* disk_file) { + const std::string& virtual_file, std::string* disk_file) { if (virtual_file != CanonicalizePath(virtual_file) || ContainsParentReference(virtual_file)) { // We do not allow importing of paths containing things like ".." or @@ -468,7 +459,7 @@ io::ZeroCopyInputStream* DiskSourceTree::OpenVirtualFile( } for (int i = 0; i < mappings_.size(); i++) { - string temp_disk_file; + std::string temp_disk_file; if (ApplyMapping(virtual_file, mappings_[i].virtual_path, mappings_[i].disk_path, &temp_disk_file)) { io::ZeroCopyInputStream* stream = OpenDiskFile(temp_disk_file); @@ -492,7 +483,7 @@ io::ZeroCopyInputStream* DiskSourceTree::OpenVirtualFile( } io::ZeroCopyInputStream* DiskSourceTree::OpenDiskFile( - const string& filename) { + const std::string& filename) { int file_descriptor; do { file_descriptor = open(filename.c_str(), O_RDONLY); diff --git a/src/google/protobuf/compiler/importer.h b/src/google/protobuf/compiler/importer.h index cdd05ed541..5f7ed3961f 100644 --- a/src/google/protobuf/compiler/importer.h +++ b/src/google/protobuf/compiler/importer.h @@ -129,8 +129,9 @@ class PROTOBUF_EXPORT SourceTreeDescriptorDatabase : public DescriptorDatabase { const Message* descriptor, ErrorLocation location, const std::string& message) override; - void AddWarning(const std::string& filename, const std::string& element_name, - const Message* descriptor, ErrorLocation location, + void AddWarning(const std::string& filename, + const std::string& element_name, const Message* descriptor, + ErrorLocation location, const std::string& message) override; private: @@ -288,15 +289,15 @@ class PROTOBUF_EXPORT DiskSourceTree : public SourceTree { // it is not useful. // * NO_MAPPING: Indicates that no mapping was found which contains this // file. - DiskFileToVirtualFileResult - DiskFileToVirtualFile(const std::string& disk_file, - std::string* virtual_file, - std::string* shadowing_disk_file); + DiskFileToVirtualFileResult DiskFileToVirtualFile( + const std::string& disk_file, std::string* virtual_file, + std::string* shadowing_disk_file); // Given a virtual path, find the path to the file on disk. // Return true and update disk_file with the on-disk path if the file exists. // Return false and leave disk_file untouched if the file doesn't exist. - bool VirtualFileToDiskFile(const std::string& virtual_file, std::string* disk_file); + bool VirtualFileToDiskFile(const std::string& virtual_file, + std::string* disk_file); // implements SourceTree ------------------------------------------- io::ZeroCopyInputStream* Open(const std::string& filename) override; @@ -310,7 +311,7 @@ class PROTOBUF_EXPORT DiskSourceTree : public SourceTree { inline Mapping(const std::string& virtual_path_param, const std::string& disk_path_param) - : virtual_path(virtual_path_param), disk_path(disk_path_param) {} + : virtual_path(virtual_path_param), disk_path(disk_path_param) {} }; std::vector mappings_; std::string last_error_message_; diff --git a/src/google/protobuf/compiler/importer_unittest.cc b/src/google/protobuf/compiler/importer_unittest.cc index 5108809df7..355fccd30d 100644 --- a/src/google/protobuf/compiler/importer_unittest.cc +++ b/src/google/protobuf/compiler/importer_unittest.cc @@ -56,7 +56,7 @@ namespace compiler { namespace { -bool FileExists(const string& path) { +bool FileExists(const std::string& path) { return File::Exists(path); } @@ -68,18 +68,18 @@ class MockErrorCollector : public MultiFileErrorCollector { MockErrorCollector() {} ~MockErrorCollector() {} - string text_; - string warning_text_; + std::string text_; + std::string warning_text_; // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, int line, int column, - const string& message) { + void AddError(const std::string& filename, int line, int column, + const std::string& message) { strings::SubstituteAndAppend(&text_, "$0:$1:$2: $3\n", filename, line, column, message); } - void AddWarning(const string& filename, int line, int column, - const string& message) { + void AddWarning(const std::string& filename, int line, int column, + const std::string& message) { strings::SubstituteAndAppend(&warning_text_, "$0:$1:$2: $3\n", filename, line, column, message); } @@ -93,12 +93,12 @@ class MockSourceTree : public SourceTree { MockSourceTree() {} ~MockSourceTree() {} - void AddFile(const string& name, const char* contents) { + void AddFile(const std::string& name, const char* contents) { files_[name] = contents; } // implements SourceTree ------------------------------------------- - io::ZeroCopyInputStream* Open(const string& filename) { + io::ZeroCopyInputStream* Open(const std::string& filename) { const char* contents = FindPtrOrNull(files_, filename); if (contents == NULL) { return NULL; @@ -107,12 +107,10 @@ class MockSourceTree : public SourceTree { } } - string GetLastErrorMessage() { - return "File not found."; - } + std::string GetLastErrorMessage() { return "File not found."; } private: - std::unordered_map files_; + std::unordered_map files_; }; // =================================================================== @@ -122,13 +120,13 @@ class ImporterTest : public testing::Test { ImporterTest() : importer_(&source_tree_, &error_collector_) {} - void AddFile(const string& filename, const char* text) { + void AddFile(const std::string& filename, const char* text) { source_tree_.AddFile(filename, text); } // Return the collected error text - string error() const { return error_collector_.text_; } - string warning() const { return error_collector_.warning_text_; } + std::string error() const { return error_collector_.text_; } + std::string warning() const { return error_collector_.warning_text_; } MockErrorCollector error_collector_; MockSourceTree source_tree_; @@ -255,22 +253,22 @@ class DiskSourceTreeTest : public testing::Test { } } - void AddFile(const string& filename, const char* contents) { + void AddFile(const std::string& filename, const char* contents) { GOOGLE_CHECK_OK(File::SetContents(filename, contents, true)); } - void AddSubdir(const string& dirname) { + void AddSubdir(const std::string& dirname) { GOOGLE_CHECK_OK(File::CreateDir(dirname, 0777)); } - void ExpectFileContents(const string& filename, + void ExpectFileContents(const std::string& filename, const char* expected_contents) { std::unique_ptr input(source_tree_.Open(filename)); ASSERT_FALSE(input == NULL); // Read all the data from the file. - string file_contents; + std::string file_contents; const void* data; int size; while (input->Next(&data, &size)) { @@ -280,8 +278,8 @@ class DiskSourceTreeTest : public testing::Test { EXPECT_EQ(expected_contents, file_contents); } - void ExpectCannotOpenFile(const string& filename, - const string& error_message) { + void ExpectCannotOpenFile(const std::string& filename, + const std::string& error_message) { std::unique_ptr input(source_tree_.Open(filename)); EXPECT_TRUE(input == NULL); EXPECT_EQ(error_message, source_tree_.GetLastErrorMessage()); @@ -290,7 +288,7 @@ class DiskSourceTreeTest : public testing::Test { DiskSourceTree source_tree_; // Paths of two on-disk directories to use during the test. - std::vector dirnames_; + std::vector dirnames_; }; TEST_F(DiskSourceTreeTest, MapRoot) { @@ -394,8 +392,8 @@ TEST_F(DiskSourceTreeTest, DiskFileToVirtualFile) { source_tree_.MapPath("bar", dirnames_[0]); source_tree_.MapPath("bar", dirnames_[1]); - string virtual_file; - string shadowing_disk_file; + std::string virtual_file; + std::string shadowing_disk_file; EXPECT_EQ(DiskSourceTree::NO_MAPPING, source_tree_.DiskFileToVirtualFile( @@ -428,8 +426,8 @@ TEST_F(DiskSourceTreeTest, DiskFileToVirtualFileCanonicalization) { source_tree_.MapPath("", "/qux"); source_tree_.MapPath("dir5", "/quux/"); - string virtual_file; - string shadowing_disk_file; + std::string virtual_file; + std::string shadowing_disk_file; // "../.." should not be considered to be under "..". EXPECT_EQ(DiskSourceTree::NO_MAPPING, @@ -495,14 +493,14 @@ TEST_F(DiskSourceTreeTest, VirtualFileToDiskFile) { source_tree_.MapPath("bar", dirnames_[1]); // Existent files, shadowed and non-shadowed case. - string disk_file; + std::string disk_file; EXPECT_TRUE(source_tree_.VirtualFileToDiskFile("bar/foo", &disk_file)); EXPECT_EQ(dirnames_[0] + "/foo", disk_file); EXPECT_TRUE(source_tree_.VirtualFileToDiskFile("bar/quux", &disk_file)); EXPECT_EQ(dirnames_[1] + "/quux", disk_file); // Nonexistent file in existent directory and vice versa. - string not_touched = "not touched"; + std::string not_touched = "not touched"; EXPECT_FALSE(source_tree_.VirtualFileToDiskFile("bar/baz", ¬_touched)); EXPECT_EQ("not touched", not_touched); EXPECT_FALSE(source_tree_.VirtualFileToDiskFile("baz/foo", ¬_touched)); diff --git a/src/google/protobuf/compiler/java/java_context.cc b/src/google/protobuf/compiler/java/java_context.cc index db795ed198..8c8ab83088 100644 --- a/src/google/protobuf/compiler/java/java_context.cc +++ b/src/google/protobuf/compiler/java/java_context.cc @@ -59,9 +59,9 @@ namespace { // Whether two fields have conflicting accessors (assuming name1 and name2 // are different). name1 and name2 are field1 and field2's camel-case name // respectively. -bool IsConflicting(const FieldDescriptor* field1, const string& name1, - const FieldDescriptor* field2, const string& name2, - string* info) { +bool IsConflicting(const FieldDescriptor* field1, const std::string& name1, + const FieldDescriptor* field2, const std::string& name2, + std::string* info) { if (field1->is_repeated()) { if (field2->is_repeated()) { // Both fields are repeated. @@ -129,13 +129,13 @@ void Context::InitializeFieldGeneratorInfoForFields( // Find out all fields that conflict with some other field in the same // message. std::vector is_conflict(fields.size()); - std::vector conflict_reason(fields.size()); + std::vector conflict_reason(fields.size()); for (int i = 0; i < fields.size(); ++i) { const FieldDescriptor* field = fields[i]; - const string& name = UnderscoresToCapitalizedCamelCase(field); + const std::string& name = UnderscoresToCapitalizedCamelCase(field); for (int j = i + 1; j < fields.size(); ++j) { const FieldDescriptor* other = fields[j]; - const string& other_name = UnderscoresToCapitalizedCamelCase(other); + const std::string& other_name = UnderscoresToCapitalizedCamelCase(other); if (name == other_name) { is_conflict[i] = is_conflict[j] = true; conflict_reason[i] = conflict_reason[j] = diff --git a/src/google/protobuf/compiler/java/java_doc_comment.cc b/src/google/protobuf/compiler/java/java_doc_comment.cc index 59c04ad412..280b052dd6 100644 --- a/src/google/protobuf/compiler/java/java_doc_comment.cc +++ b/src/google/protobuf/compiler/java/java_doc_comment.cc @@ -44,13 +44,13 @@ namespace protobuf { namespace compiler { namespace java { -string EscapeJavadoc(const string& input) { - string result; +std::string EscapeJavadoc(const std::string& input) { + std::string result; result.reserve(input.size() * 2); char prev = '*'; - for (string::size_type i = 0; i < input.size(); i++) { + for (std::string::size_type i = 0; i < input.size(); i++) { char c = input[i]; switch (c) { case '*': @@ -104,8 +104,9 @@ string EscapeJavadoc(const string& input) { static void WriteDocCommentBodyForLocation( io::Printer* printer, const SourceLocation& location) { - string comments = location.leading_comments.empty() ? - location.trailing_comments : location.leading_comments; + std::string comments = location.leading_comments.empty() + ? location.trailing_comments + : location.leading_comments; if (!comments.empty()) { // TODO(kenton): Ideally we should parse the comment text as Markdown and // write it back as HTML, but this requires a Markdown parser. For now @@ -115,7 +116,7 @@ static void WriteDocCommentBodyForLocation( // HTML-escape them so that they don't accidentally close the doc comment. comments = EscapeJavadoc(comments); - std::vector lines = Split(comments, "\n"); + std::vector lines = Split(comments, "\n"); while (!lines.empty() && lines.back().empty()) { lines.pop_back(); } @@ -146,11 +147,11 @@ static void WriteDocCommentBody( } } -static string FirstLineOf(const string& value) { - string result = value; +static std::string FirstLineOf(const std::string& value) { + std::string result = value; - string::size_type pos = result.find_first_of('\n'); - if (pos != string::npos) { + std::string::size_type pos = result.find_first_of('\n'); + if (pos != std::string::npos) { result.erase(pos); } diff --git a/src/google/protobuf/compiler/java/java_enum.cc b/src/google/protobuf/compiler/java/java_enum.cc index 9436aa6633..cab34cac54 100644 --- a/src/google/protobuf/compiler/java/java_enum.cc +++ b/src/google/protobuf/compiler/java/java_enum.cc @@ -85,7 +85,7 @@ void EnumGenerator::Generate(io::Printer* printer) { printer->Indent(); bool ordinal_is_index = true; - string index_text = "ordinal()"; + std::string index_text = "ordinal()"; for (int i = 0; i < canonical_values_.size(); i++) { if (canonical_values_[i]->index() != i) { ordinal_is_index = false; @@ -95,7 +95,7 @@ void EnumGenerator::Generate(io::Printer* printer) { } for (int i = 0; i < canonical_values_.size(); i++) { - std::map vars; + std::map vars; vars["name"] = canonical_values_[i]->name(); vars["index"] = StrCat(canonical_values_[i]->index()); vars["number"] = StrCat(canonical_values_[i]->number()); @@ -129,7 +129,7 @@ void EnumGenerator::Generate(io::Printer* printer) { // ----------------------------------------------------------------- for (int i = 0; i < aliases_.size(); i++) { - std::map vars; + std::map vars; vars["classname"] = descriptor_->name(); vars["name"] = aliases_[i].value->name(); vars["canonical_name"] = aliases_[i].canonical_value->name(); @@ -140,7 +140,7 @@ void EnumGenerator::Generate(io::Printer* printer) { } for (int i = 0; i < descriptor_->value_count(); i++) { - std::map vars; + std::map vars; vars["name"] = descriptor_->value(i)->name(); vars["number"] = StrCat(descriptor_->value(i)->number()); vars["{"] = ""; diff --git a/src/google/protobuf/compiler/java/java_enum_field.cc b/src/google/protobuf/compiler/java/java_enum_field.cc index 6517e5b0a1..c30a82346b 100644 --- a/src/google/protobuf/compiler/java/java_enum_field.cc +++ b/src/google/protobuf/compiler/java/java_enum_field.cc @@ -54,12 +54,10 @@ namespace java { namespace { -void SetEnumVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - const FieldGeneratorInfo* info, +void SetEnumVariables(const FieldDescriptor* descriptor, int messageBitIndex, + int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); (*variables)["type"] = @@ -369,7 +367,7 @@ GenerateHashCode(io::Printer* printer) const { "hash = (53 * hash) + $name$_;\n"); } -string ImmutableEnumFieldGenerator::GetBoxedType() const { +std::string ImmutableEnumFieldGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->enum_type()); } @@ -996,7 +994,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutableEnumFieldGenerator::GetBoxedType() const { +std::string RepeatedImmutableEnumFieldGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->enum_type()); } diff --git a/src/google/protobuf/compiler/java/java_enum_field_lite.cc b/src/google/protobuf/compiler/java/java_enum_field_lite.cc index 458bf3d90b..1f4317d0e1 100644 --- a/src/google/protobuf/compiler/java/java_enum_field_lite.cc +++ b/src/google/protobuf/compiler/java/java_enum_field_lite.cc @@ -54,12 +54,10 @@ namespace java { namespace { -void SetEnumVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - const FieldGeneratorInfo* info, +void SetEnumVariables(const FieldDescriptor* descriptor, int messageBitIndex, + int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); (*variables)["type"] = @@ -352,7 +350,7 @@ GenerateHashCode(io::Printer* printer) const { "hash = (53 * hash) + $name$_;\n"); } -string ImmutableEnumFieldLiteGenerator::GetBoxedType() const { +std::string ImmutableEnumFieldLiteGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->enum_type()); } @@ -999,7 +997,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutableEnumFieldLiteGenerator::GetBoxedType() const { +std::string RepeatedImmutableEnumFieldLiteGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->enum_type()); } diff --git a/src/google/protobuf/compiler/java/java_enum_lite.cc b/src/google/protobuf/compiler/java/java_enum_lite.cc index 9db138373f..8e414290f6 100644 --- a/src/google/protobuf/compiler/java/java_enum_lite.cc +++ b/src/google/protobuf/compiler/java/java_enum_lite.cc @@ -86,7 +86,7 @@ void EnumLiteGenerator::Generate(io::Printer* printer) { printer->Indent(); for (int i = 0; i < canonical_values_.size(); i++) { - std::map vars; + std::map vars; vars["name"] = canonical_values_[i]->name(); vars["number"] = StrCat(canonical_values_[i]->number()); WriteEnumValueDocComment(printer, canonical_values_[i]); @@ -110,7 +110,7 @@ void EnumLiteGenerator::Generate(io::Printer* printer) { // ----------------------------------------------------------------- for (int i = 0; i < aliases_.size(); i++) { - std::map vars; + std::map vars; vars["classname"] = descriptor_->name(); vars["name"] = aliases_[i].value->name(); vars["canonical_name"] = aliases_[i].canonical_value->name(); @@ -121,7 +121,7 @@ void EnumLiteGenerator::Generate(io::Printer* printer) { } for (int i = 0; i < descriptor_->value_count(); i++) { - std::map vars; + std::map vars; vars["name"] = descriptor_->value(i)->name(); vars["number"] = StrCat(descriptor_->value(i)->number()); vars["{"] = ""; diff --git a/src/google/protobuf/compiler/java/java_extension.cc b/src/google/protobuf/compiler/java/java_extension.cc index cc1921d5a4..955520cead 100644 --- a/src/google/protobuf/compiler/java/java_extension.cc +++ b/src/google/protobuf/compiler/java/java_extension.cc @@ -63,9 +63,10 @@ ImmutableExtensionGenerator::~ImmutableExtensionGenerator() {} // Initializes the vars referenced in the generated code templates. void ExtensionGenerator::InitTemplateVars( - const FieldDescriptor* descriptor, const string& scope, bool immutable, - ClassNameResolver* name_resolver, std::map* vars_pointer) { - std::map &vars = *vars_pointer; + const FieldDescriptor* descriptor, const std::string& scope, bool immutable, + ClassNameResolver* name_resolver, + std::map* vars_pointer) { + std::map& vars = *vars_pointer; vars["scope"] = scope; vars["name"] = UnderscoresToCamelCase(descriptor); vars["containing_type"] = @@ -81,7 +82,7 @@ void ExtensionGenerator::InitTemplateVars( vars["prototype"] = "null"; JavaType java_type = GetJavaType(descriptor); - string singular_type; + std::string singular_type; switch (java_type) { case JAVATYPE_MESSAGE: singular_type = name_resolver->GetClassName(descriptor->message_type(), @@ -109,7 +110,7 @@ void ExtensionGenerator::InitTemplateVars( } void ImmutableExtensionGenerator::Generate(io::Printer* printer) { - std::map vars; + std::map vars; const bool kUseImmutableNames = true; InitTemplateVars(descriptor_, scope_, kUseImmutableNames, name_resolver_, &vars); diff --git a/src/google/protobuf/compiler/java/java_extension.h b/src/google/protobuf/compiler/java/java_extension.h index 1f11324c49..a8eb1ae27c 100644 --- a/src/google/protobuf/compiler/java/java_extension.h +++ b/src/google/protobuf/compiler/java/java_extension.h @@ -79,10 +79,10 @@ class ExtensionGenerator { virtual int GenerateRegistrationCode(io::Printer* printer) = 0; protected: - static void InitTemplateVars(const FieldDescriptor* descriptor, - const std::string& scope, bool immutable, - ClassNameResolver* name_resolver, - std::map* vars_pointer); + static void InitTemplateVars( + const FieldDescriptor* descriptor, const std::string& scope, + bool immutable, ClassNameResolver* name_resolver, + std::map* vars_pointer); private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); diff --git a/src/google/protobuf/compiler/java/java_extension_lite.cc b/src/google/protobuf/compiler/java/java_extension_lite.cc index 70ce8e7d1f..ca0c162697 100644 --- a/src/google/protobuf/compiler/java/java_extension_lite.cc +++ b/src/google/protobuf/compiler/java/java_extension_lite.cc @@ -57,7 +57,7 @@ ImmutableExtensionLiteGenerator::ImmutableExtensionLiteGenerator( ImmutableExtensionLiteGenerator::~ImmutableExtensionLiteGenerator() {} void ImmutableExtensionLiteGenerator::Generate(io::Printer* printer) { - std::map vars; + std::map vars; const bool kUseImmutableNames = true; InitTemplateVars(descriptor_, scope_, kUseImmutableNames, name_resolver_, &vars); diff --git a/src/google/protobuf/compiler/java/java_field.cc b/src/google/protobuf/compiler/java/java_field.cc index 9574c151a2..a18f02fb53 100644 --- a/src/google/protobuf/compiler/java/java_field.cc +++ b/src/google/protobuf/compiler/java/java_field.cc @@ -248,7 +248,7 @@ FieldGeneratorMap::~FieldGeneratorMap() {} void SetCommonFieldVariables(const FieldDescriptor* descriptor, const FieldGeneratorInfo* info, - std::map* variables) { + std::map* variables) { (*variables)["field_name"] = descriptor->name(); (*variables)["name"] = info->name; (*variables)["classname"] = descriptor->containing_type()->name(); @@ -266,7 +266,7 @@ void SetCommonFieldVariables(const FieldDescriptor* descriptor, void SetCommonOneofVariables(const FieldDescriptor* descriptor, const OneofGeneratorInfo* info, - std::map* variables) { + std::map* variables) { (*variables)["oneof_name"] = info->name; (*variables)["oneof_capitalized_name"] = info->capitalized_name; (*variables)["oneof_index"] = @@ -279,9 +279,9 @@ void SetCommonOneofVariables(const FieldDescriptor* descriptor, info->name + "Case_ == " + StrCat(descriptor->number()); } -void PrintExtraFieldInfo(const std::map& variables, +void PrintExtraFieldInfo(const std::map& variables, io::Printer* printer) { - const std::map::const_iterator it = + const std::map::const_iterator it = variables.find("disambiguated_reason"); if (it != variables.end() && !it->second.empty()) { printer->Print( diff --git a/src/google/protobuf/compiler/java/java_file.cc b/src/google/protobuf/compiler/java/java_file.cc index d345ca9041..e963035967 100644 --- a/src/google/protobuf/compiler/java/java_file.cc +++ b/src/google/protobuf/compiler/java/java_file.cc @@ -120,7 +120,7 @@ bool CollectExtensions(const Message& message, void CollectExtensions(const FileDescriptorProto& file_proto, const DescriptorPool& alternate_pool, FieldDescriptorSet* extensions, - const string& file_data) { + const std::string& file_data) { if (!CollectExtensions(file_proto, extensions)) { // There are unknown fields in the file_proto, which are probably // extensions. We need to parse the data into a dynamic message based on the @@ -208,12 +208,13 @@ FileGenerator::FileGenerator(const FileDescriptor* file, const Options& options, FileGenerator::~FileGenerator() {} -bool FileGenerator::Validate(string* error) { +bool FileGenerator::Validate(std::string* error) { // Check that no class name matches the file's class name. This is a common // problem that leads to Java compile errors that can be hard to understand. // It's especially bad when using the java_multiple_files, since we would // end up overwriting the outer class with one of the inner ones. - if (name_resolver_->HasConflictingClassName(file_, classname_)) { + if (name_resolver_->HasConflictingClassName(file_, classname_, + NameEquality::EXACT_EQUAL)) { error->assign(file_->name()); error->append( ": Cannot generate Java output because the file's outer class name, \""); @@ -224,6 +225,20 @@ bool FileGenerator::Validate(string* error) { "option to specify a different outer class name for the .proto file."); return false; } + // Similar to the check above, but ignore the case this time. This is not a + // problem on Linux, but will lead to Java compile errors on Windows / Mac + // because filenames are case-insensitive on those platforms. + if (name_resolver_->HasConflictingClassName( + file_, classname_, NameEquality::EQUAL_IGNORE_CASE)) { + GOOGLE_LOG(WARNING) + << file_->name() << ": The file's outer class name, \"" << classname_ + << "\", matches the name of one of the types declared inside it when " + << "case is ignored. This can cause compilation issues on Windows / " + << "MacOS. Please either rename the type or use the " + << "java_outer_classname option to specify a different outer class " + << "name for the .proto file to be safe."; + } + // Print a warning if optimize_for = LITE_RUNTIME is used. if (file_->options().optimize_for() == FileOptions::LITE_RUNTIME) { GOOGLE_LOG(WARNING) @@ -430,7 +445,7 @@ void FileGenerator::GenerateDescriptorInitializationCodeForImmutable( // reflections to find all extension fields FileDescriptorProto file_proto; file_->CopyTo(&file_proto); - string file_data; + std::string file_data; file_proto.SerializeToString(&file_data); FieldDescriptorSet extensions; CollectExtensions(file_proto, *file_->pool(), &extensions, file_data); @@ -461,7 +476,7 @@ void FileGenerator::GenerateDescriptorInitializationCodeForImmutable( // Force descriptor initialization of all dependencies. for (int i = 0; i < file_->dependency_count(); i++) { if (ShouldIncludeDependency(file_->dependency(i), true)) { - string dependency = + std::string dependency = name_resolver_->GetImmutableClassName(file_->dependency(i)); printer->Print( "$dependency$.getDescriptor();\n", @@ -501,7 +516,7 @@ void FileGenerator::GenerateDescriptorInitializationCodeForMutable(io::Printer* // custom options are only represented with immutable messages. FileDescriptorProto file_proto; file_->CopyTo(&file_proto); - string file_data; + std::string file_data; file_proto.SerializeToString(&file_data); FieldDescriptorSet extensions; CollectExtensions(file_proto, *file_->pool(), &extensions, file_data); @@ -530,7 +545,7 @@ void FileGenerator::GenerateDescriptorInitializationCodeForMutable(io::Printer* FieldDescriptorSet::iterator it; for (it = extensions.begin(); it != extensions.end(); it++) { const FieldDescriptor* field = *it; - string scope; + std::string scope; if (field->extension_scope() != NULL) { scope = name_resolver_->GetMutableClassName(field->extension_scope()) + ".getDescriptor()"; @@ -566,8 +581,8 @@ void FileGenerator::GenerateDescriptorInitializationCodeForMutable(io::Printer* // Force descriptor initialization of all dependencies. for (int i = 0; i < file_->dependency_count(); i++) { if (ShouldIncludeDependency(file_->dependency(i), false)) { - string dependency = name_resolver_->GetMutableClassName( - file_->dependency(i)); + std::string dependency = + name_resolver_->GetMutableClassName(file_->dependency(i)); printer->Print( "$dependency$.getDescriptor();\n", "dependency", dependency); @@ -580,18 +595,17 @@ void FileGenerator::GenerateDescriptorInitializationCodeForMutable(io::Printer* } template -static void GenerateSibling(const string& package_dir, - const string& java_package, - const DescriptorClass* descriptor, - GeneratorContext* context, - std::vector* file_list, bool annotate_code, - std::vector* annotation_list, - const string& name_suffix, - GeneratorClass* generator, - void (GeneratorClass::*pfn)(io::Printer* printer)) { - string filename = package_dir + descriptor->name() + name_suffix + ".java"; +static void GenerateSibling( + const std::string& package_dir, const std::string& java_package, + const DescriptorClass* descriptor, GeneratorContext* context, + std::vector* file_list, bool annotate_code, + std::vector* annotation_list, const std::string& name_suffix, + GeneratorClass* generator, + void (GeneratorClass::*pfn)(io::Printer* printer)) { + std::string filename = + package_dir + descriptor->name() + name_suffix + ".java"; file_list->push_back(filename); - string info_full_path = filename + ".pb.meta"; + std::string info_full_path = filename + ".pb.meta"; GeneratedCodeInfo annotations; io::AnnotationProtoCollector annotation_collector( &annotations); @@ -622,10 +636,10 @@ static void GenerateSibling(const string& package_dir, } } -void FileGenerator::GenerateSiblings(const string& package_dir, - GeneratorContext* context, - std::vector* file_list, - std::vector* annotation_list) { +void FileGenerator::GenerateSiblings( + const std::string& package_dir, GeneratorContext* context, + std::vector* file_list, + std::vector* annotation_list) { if (MultipleJavaFiles(file_, immutable_api_)) { for (int i = 0; i < file_->enum_type_count(); i++) { if (HasDescriptorMethods(file_, context_->EnforceLite())) { diff --git a/src/google/protobuf/compiler/java/java_generator.cc b/src/google/protobuf/compiler/java/java_generator.cc index fd2591dabe..78bb6dc2ae 100644 --- a/src/google/protobuf/compiler/java/java_generator.cc +++ b/src/google/protobuf/compiler/java/java_generator.cc @@ -59,14 +59,13 @@ JavaGenerator::JavaGenerator() {} JavaGenerator::~JavaGenerator() {} bool JavaGenerator::Generate(const FileDescriptor* file, - const string& parameter, + const std::string& parameter, GeneratorContext* context, - string* error) const { + std::string* error) const { // ----------------------------------------------------------------- // parse generator options - - std::vector > options; + std::vector > options; ParseGeneratorParameter(parameter, &options); Options file_options; @@ -105,8 +104,8 @@ bool JavaGenerator::Generate(const FileDescriptor* file, // ----------------------------------------------------------------- - std::vector all_files; - std::vector all_annotations; + std::vector all_files; + std::vector all_annotations; std::vector file_generators; @@ -131,13 +130,13 @@ bool JavaGenerator::Generate(const FileDescriptor* file, for (int i = 0; i < file_generators.size(); ++i) { FileGenerator* file_generator = file_generators[i]; - string package_dir = JavaPackageToDir(file_generator->java_package()); + std::string package_dir = JavaPackageToDir(file_generator->java_package()); - string java_filename = package_dir; + std::string java_filename = package_dir; java_filename += file_generator->classname(); java_filename += ".java"; all_files.push_back(java_filename); - string info_full_path = java_filename + ".pb.meta"; + std::string info_full_path = java_filename + ".pb.meta"; if (file_options.annotate_code) { all_annotations.push_back(info_full_path); } diff --git a/src/google/protobuf/compiler/java/java_generator.h b/src/google/protobuf/compiler/java/java_generator.h index 21873581a7..be63ac49e2 100644 --- a/src/google/protobuf/compiler/java/java_generator.h +++ b/src/google/protobuf/compiler/java/java_generator.h @@ -57,10 +57,8 @@ class PROTOC_EXPORT JavaGenerator : public CodeGenerator { ~JavaGenerator(); // implements CodeGenerator ---------------------------------------- - bool Generate(const FileDescriptor* file, - const std::string& parameter, - GeneratorContext* context, - std::string* error) const; + bool Generate(const FileDescriptor* file, const std::string& parameter, + GeneratorContext* context, std::string* error) const; private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JavaGenerator); diff --git a/src/google/protobuf/compiler/java/java_helpers.cc b/src/google/protobuf/compiler/java/java_helpers.cc index 97ad0533e7..fa9e69348e 100644 --- a/src/google/protobuf/compiler/java/java_helpers.cc +++ b/src/google/protobuf/compiler/java/java_helpers.cc @@ -78,7 +78,7 @@ const char* kForbiddenWordList[] = { const int kDefaultLookUpStartFieldNumber = 40; -bool IsForbidden(const string& field_name) { +bool IsForbidden(const std::string& field_name) { for (int i = 0; i < GOOGLE_ARRAYSIZE(kForbiddenWordList); ++i) { if (field_name == kForbiddenWordList[i]) { return true; @@ -87,8 +87,8 @@ bool IsForbidden(const string& field_name) { return false; } -string FieldName(const FieldDescriptor* field) { - string field_name; +std::string FieldName(const FieldDescriptor* field) { + std::string field_name; // Groups are hacky: The name of the field is just the lower-cased name // of the group type. In Java, though, we would like to retain the original // capitalization of the type name. @@ -123,11 +123,11 @@ bool ShouldUseTable(int lo, int hi, int number_of_fields) { } // namespace void PrintGeneratedAnnotation(io::Printer* printer, char delimiter, - const string& annotation_file) { + const std::string& annotation_file) { if (annotation_file.empty()) { return; } - string ptemplate = + std::string ptemplate = "@javax.annotation.Generated(value=\"protoc\", comments=\"annotations:"; ptemplate.push_back(delimiter); ptemplate.append("annotation_file"); @@ -138,10 +138,9 @@ void PrintGeneratedAnnotation(io::Printer* printer, char delimiter, void PrintEnumVerifierLogic(io::Printer* printer, const FieldDescriptor* descriptor, - const std::map& variables, + const std::map& variables, const char* var_name, - const char* terminating_string, - bool enforce_lite) { + const char* terminating_string, bool enforce_lite) { std::string enum_verifier_string = (descriptor->enum_type()->file()->options().optimize_for() == FileOptions::LITE_RUNTIME) || enforce_lite @@ -159,8 +158,9 @@ void PrintEnumVerifierLogic(io::Printer* printer, StrCat(enum_verifier_string, terminating_string).c_str()); } -string UnderscoresToCamelCase(const string& input, bool cap_next_letter) { - string result; +std::string UnderscoresToCamelCase(const std::string& input, + bool cap_next_letter) { + std::string result; // Note: I distrust ctype.h due to locales. for (int i = 0; i < input.size(); i++) { if ('a' <= input[i] && input[i] <= 'z') { @@ -194,35 +194,35 @@ string UnderscoresToCamelCase(const string& input, bool cap_next_letter) { return result; } -string UnderscoresToCamelCase(const FieldDescriptor* field) { +std::string UnderscoresToCamelCase(const FieldDescriptor* field) { return UnderscoresToCamelCase(FieldName(field), false); } -string UnderscoresToCapitalizedCamelCase(const FieldDescriptor* field) { +std::string UnderscoresToCapitalizedCamelCase(const FieldDescriptor* field) { return UnderscoresToCamelCase(FieldName(field), true); } -string CapitalizedFieldName(const FieldDescriptor* field) { +std::string CapitalizedFieldName(const FieldDescriptor* field) { return UnderscoresToCapitalizedCamelCase(field); } -string UnderscoresToCamelCase(const MethodDescriptor* method) { +std::string UnderscoresToCamelCase(const MethodDescriptor* method) { return UnderscoresToCamelCase(method->name(), false); } -string UniqueFileScopeIdentifier(const Descriptor* descriptor) { +std::string UniqueFileScopeIdentifier(const Descriptor* descriptor) { return "static_" + StringReplace(descriptor->full_name(), ".", "_", true); } -string CamelCaseFieldName(const FieldDescriptor* field) { - string fieldName = UnderscoresToCamelCase(field); +std::string CamelCaseFieldName(const FieldDescriptor* field) { + std::string fieldName = UnderscoresToCamelCase(field); if ('0' <= fieldName[0] && fieldName[0] <= '9') { return '_' + fieldName; } return fieldName; } -string StripProto(const string& filename) { +std::string StripProto(const std::string& filename) { if (HasSuffixString(filename, ".protodevel")) { return StripSuffixString(filename, ".protodevel"); } else { @@ -230,13 +230,13 @@ string StripProto(const string& filename) { } } -string FileClassName(const FileDescriptor* file, bool immutable) { +std::string FileClassName(const FileDescriptor* file, bool immutable) { ClassNameResolver name_resolver; return name_resolver.GetFileClassName(file, immutable); } -string FileJavaPackage(const FileDescriptor* file, bool immutable) { - string result; +std::string FileJavaPackage(const FileDescriptor* file, bool immutable) { + std::string result; if (file->options().has_java_package()) { result = file->options().java_package(); @@ -251,22 +251,21 @@ string FileJavaPackage(const FileDescriptor* file, bool immutable) { return result; } -string FileJavaPackage(const FileDescriptor* file) { +std::string FileJavaPackage(const FileDescriptor* file) { return FileJavaPackage(file, true /* immutable */); } -string JavaPackageToDir(string package_name) { - string package_dir = - StringReplace(package_name, ".", "/", true); +std::string JavaPackageToDir(std::string package_name) { + std::string package_dir = StringReplace(package_name, ".", "/", true); if (!package_dir.empty()) package_dir += "/"; return package_dir; } // TODO(xiaofeng): This function is only kept for it's publicly referenced. // It should be removed after mutable API up-integration. -string ToJavaName(const string& full_name, - const FileDescriptor* file) { - string result; +std::string ToJavaName(const std::string& full_name, + const FileDescriptor* file) { + std::string result; if (file->options().java_multiple_files()) { result = FileJavaPackage(file); } else { @@ -285,48 +284,48 @@ string ToJavaName(const string& full_name, return result; } -string ClassName(const Descriptor* descriptor) { +std::string ClassName(const Descriptor* descriptor) { ClassNameResolver name_resolver; return name_resolver.GetClassName(descriptor, true); } -string ClassName(const EnumDescriptor* descriptor) { +std::string ClassName(const EnumDescriptor* descriptor) { ClassNameResolver name_resolver; return name_resolver.GetClassName(descriptor, true); } -string ClassName(const ServiceDescriptor* descriptor) { +std::string ClassName(const ServiceDescriptor* descriptor) { ClassNameResolver name_resolver; return name_resolver.GetClassName(descriptor, true); } -string ClassName(const FileDescriptor* descriptor) { +std::string ClassName(const FileDescriptor* descriptor) { ClassNameResolver name_resolver; return name_resolver.GetClassName(descriptor, true); } -string ExtraMessageInterfaces(const Descriptor* descriptor) { - string interfaces = "// @@protoc_insertion_point(message_implements:" - + descriptor->full_name() + ")"; +std::string ExtraMessageInterfaces(const Descriptor* descriptor) { + std::string interfaces = "// @@protoc_insertion_point(message_implements:" + + descriptor->full_name() + ")"; return interfaces; } -string ExtraBuilderInterfaces(const Descriptor* descriptor) { - string interfaces = "// @@protoc_insertion_point(builder_implements:" - + descriptor->full_name() + ")"; +std::string ExtraBuilderInterfaces(const Descriptor* descriptor) { + std::string interfaces = "// @@protoc_insertion_point(builder_implements:" + + descriptor->full_name() + ")"; return interfaces; } -string ExtraMessageOrBuilderInterfaces(const Descriptor* descriptor) { - string interfaces = "// @@protoc_insertion_point(interface_extends:" - + descriptor->full_name() + ")"; +std::string ExtraMessageOrBuilderInterfaces(const Descriptor* descriptor) { + std::string interfaces = "// @@protoc_insertion_point(interface_extends:" + + descriptor->full_name() + ")"; return interfaces; } -string FieldConstantName(const FieldDescriptor *field) { - string name = field->name() + "_FIELD_NUMBER"; +std::string FieldConstantName(const FieldDescriptor* field) { + std::string name = field->name() + "_FIELD_NUMBER"; UpperString(&name); return name; } @@ -459,7 +458,7 @@ const char* FieldTypeName(FieldDescriptor::Type field_type) { return NULL; } -bool AllAscii(const string& text) { +bool AllAscii(const std::string& text) { for (int i = 0; i < text.size(); i++) { if ((text[i] & 0x80) != 0) { return false; @@ -468,8 +467,8 @@ bool AllAscii(const string& text) { return true; } -string DefaultValue(const FieldDescriptor* field, bool immutable, - ClassNameResolver* name_resolver) { +std::string DefaultValue(const FieldDescriptor* field, bool immutable, + ClassNameResolver* name_resolver) { // Switch on CppType since we need to know which default_value_* method // of FieldDescriptor to call. switch (field->cpp_type()) { @@ -622,69 +621,69 @@ const char* bit_masks[] = { "0x80000000", }; -string GetBitFieldName(int index) { - string varName = "bitField"; +std::string GetBitFieldName(int index) { + std::string varName = "bitField"; varName += StrCat(index); varName += "_"; return varName; } -string GetBitFieldNameForBit(int bitIndex) { +std::string GetBitFieldNameForBit(int bitIndex) { return GetBitFieldName(bitIndex / 32); } namespace { -string GenerateGetBitInternal(const string& prefix, int bitIndex) { - string varName = prefix + GetBitFieldNameForBit(bitIndex); +std::string GenerateGetBitInternal(const std::string& prefix, int bitIndex) { + std::string varName = prefix + GetBitFieldNameForBit(bitIndex); int bitInVarIndex = bitIndex % 32; - string mask = bit_masks[bitInVarIndex]; - string result = "((" + varName + " & " + mask + ") != 0)"; + std::string mask = bit_masks[bitInVarIndex]; + std::string result = "((" + varName + " & " + mask + ") != 0)"; return result; } -string GenerateSetBitInternal(const string& prefix, int bitIndex) { - string varName = prefix + GetBitFieldNameForBit(bitIndex); +std::string GenerateSetBitInternal(const std::string& prefix, int bitIndex) { + std::string varName = prefix + GetBitFieldNameForBit(bitIndex); int bitInVarIndex = bitIndex % 32; - string mask = bit_masks[bitInVarIndex]; - string result = varName + " |= " + mask; + std::string mask = bit_masks[bitInVarIndex]; + std::string result = varName + " |= " + mask; return result; } } // namespace -string GenerateGetBit(int bitIndex) { +std::string GenerateGetBit(int bitIndex) { return GenerateGetBitInternal("", bitIndex); } -string GenerateSetBit(int bitIndex) { +std::string GenerateSetBit(int bitIndex) { return GenerateSetBitInternal("", bitIndex); } -string GenerateClearBit(int bitIndex) { - string varName = GetBitFieldNameForBit(bitIndex); +std::string GenerateClearBit(int bitIndex) { + std::string varName = GetBitFieldNameForBit(bitIndex); int bitInVarIndex = bitIndex % 32; - string mask = bit_masks[bitInVarIndex]; - string result = varName + " = (" + varName + " & ~" + mask + ")"; + std::string mask = bit_masks[bitInVarIndex]; + std::string result = varName + " = (" + varName + " & ~" + mask + ")"; return result; } -string GenerateGetBitFromLocal(int bitIndex) { +std::string GenerateGetBitFromLocal(int bitIndex) { return GenerateGetBitInternal("from_", bitIndex); } -string GenerateSetBitToLocal(int bitIndex) { +std::string GenerateSetBitToLocal(int bitIndex) { return GenerateSetBitInternal("to_", bitIndex); } -string GenerateGetBitMutableLocal(int bitIndex) { +std::string GenerateGetBitMutableLocal(int bitIndex) { return GenerateGetBitInternal("mutable_", bitIndex); } -string GenerateSetBitMutableLocal(int bitIndex) { +std::string GenerateSetBitMutableLocal(int bitIndex) { return GenerateSetBitInternal("mutable_", bitIndex); } @@ -947,7 +946,7 @@ int GetExperimentalJavaFieldType(const FieldDescriptor* field) { } // Escape a UTF-16 character to be embedded in a Java string. -void EscapeUtf16ToString(uint16 code, string* output) { +void EscapeUtf16ToString(uint16 code, std::string* output) { if (code == '\t') { output->append("\\t"); } else if (code == '\b') { diff --git a/src/google/protobuf/compiler/java/java_helpers.h b/src/google/protobuf/compiler/java/java_helpers.h index 93caa3dc9e..eb65c3f3de 100644 --- a/src/google/protobuf/compiler/java/java_helpers.h +++ b/src/google/protobuf/compiler/java/java_helpers.h @@ -68,12 +68,12 @@ void PrintEnumVerifierLogic(io::Printer* printer, const FieldDescriptor* descriptor, const std::map& variables, const char* var_name, - const char* terminating_string, - bool enforce_lite); + const char* terminating_string, bool enforce_lite); // Converts a name to camel-case. If cap_first_letter is true, capitalize the // first letter. -std::string UnderscoresToCamelCase(const std::string& name, bool cap_first_letter); +std::string UnderscoresToCamelCase(const std::string& name, + bool cap_first_letter); // Converts the field's name to camel-case, e.g. "foo_bar_baz" becomes // "fooBarBaz" or "FooBarBaz", respectively. std::string UnderscoresToCamelCase(const FieldDescriptor* field); @@ -114,7 +114,7 @@ std::string JavaPackageToDir(std::string package_name); // TODO(xiaofeng): this method is deprecated and should be removed in the // future. std::string ToJavaName(const std::string& full_name, - const FileDescriptor* file); + const FileDescriptor* file); // TODO(xiaofeng): the following methods are kept for they are exposed // publicly in //net/proto2/compiler/java/public/names.h. They return @@ -179,7 +179,8 @@ inline bool IsOwnFile(const ServiceDescriptor* descriptor, bool immutable) { // annotation data for that descriptor. `suffix` is usually empty, but may // (e.g.) be "OrBuilder" for some generated interfaces. template -std::string AnnotationFileName(const Descriptor* descriptor, const std::string& suffix) { +std::string AnnotationFileName(const Descriptor* descriptor, + const std::string& suffix) { return descriptor->name() + suffix + ".java.pb.meta"; } @@ -195,7 +196,7 @@ void MaybePrintGeneratedAnnotation(Context* context, io::Printer* printer, // Get the unqualified name that should be used for a field's field // number constant. -std::string FieldConstantName(const FieldDescriptor *field); +std::string FieldConstantName(const FieldDescriptor* field); // Returns the type of the FieldDescriptor. // This does nothing interesting for the open source release, but is used for @@ -230,9 +231,9 @@ const char* FieldTypeName(const FieldDescriptor::Type field_type); class ClassNameResolver; std::string DefaultValue(const FieldDescriptor* field, bool immutable, - ClassNameResolver* name_resolver); + ClassNameResolver* name_resolver); inline std::string ImmutableDefaultValue(const FieldDescriptor* field, - ClassNameResolver* name_resolver) { + ClassNameResolver* name_resolver) { return DefaultValue(field, true, name_resolver); } bool IsDefaultValueJavaDefault(const FieldDescriptor* field); diff --git a/src/google/protobuf/compiler/java/java_map_field.cc b/src/google/protobuf/compiler/java/java_map_field.cc index cfcb918d1a..a8b1074c45 100644 --- a/src/google/protobuf/compiler/java/java_map_field.cc +++ b/src/google/protobuf/compiler/java/java_map_field.cc @@ -57,9 +57,8 @@ const FieldDescriptor* ValueField(const FieldDescriptor* descriptor) { return message->FindFieldByName("value"); } -string TypeName(const FieldDescriptor* field, - ClassNameResolver* name_resolver, - bool boxed) { +std::string TypeName(const FieldDescriptor* field, + ClassNameResolver* name_resolver, bool boxed) { if (GetJavaType(field) == JAVATYPE_MESSAGE) { return name_resolver->GetImmutableClassName(field->message_type()); } else if (GetJavaType(field) == JAVATYPE_ENUM) { @@ -70,17 +69,15 @@ string TypeName(const FieldDescriptor* field, } } -string WireType(const FieldDescriptor* field) { +std::string WireType(const FieldDescriptor* field) { return "com.google.protobuf.WireFormat.FieldType." + - string(FieldTypeName(field->type())); + std::string(FieldTypeName(field->type())); } -void SetMessageVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - const FieldGeneratorInfo* info, +void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, + int builderBitIndex, const FieldGeneratorInfo* info, Context* context, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); ClassNameResolver* name_resolver = context->GetNameResolver(); @@ -92,7 +89,7 @@ void SetMessageVariables(const FieldDescriptor* descriptor, const JavaType valueJavaType = GetJavaType(value); (*variables)["key_type"] = TypeName(key, name_resolver, false); - string boxed_key_type = TypeName(key, name_resolver, true); + std::string boxed_key_type = TypeName(key, name_resolver, true); (*variables)["boxed_key_type"] = boxed_key_type; // Used for calling the serialization function. (*variables)["short_key_type"] = @@ -787,7 +784,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string ImmutableMapFieldGenerator::GetBoxedType() const { +std::string ImmutableMapFieldGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->message_type()); } diff --git a/src/google/protobuf/compiler/java/java_map_field_lite.cc b/src/google/protobuf/compiler/java/java_map_field_lite.cc index 569c38d789..c6ffa5bc21 100644 --- a/src/google/protobuf/compiler/java/java_map_field_lite.cc +++ b/src/google/protobuf/compiler/java/java_map_field_lite.cc @@ -57,9 +57,8 @@ const FieldDescriptor* ValueField(const FieldDescriptor* descriptor) { return message->FindFieldByName("value"); } -string TypeName(const FieldDescriptor* field, - ClassNameResolver* name_resolver, - bool boxed) { +std::string TypeName(const FieldDescriptor* field, + ClassNameResolver* name_resolver, bool boxed) { if (GetJavaType(field) == JAVATYPE_MESSAGE) { return name_resolver->GetImmutableClassName(field->message_type()); } else if (GetJavaType(field) == JAVATYPE_ENUM) { @@ -70,17 +69,15 @@ string TypeName(const FieldDescriptor* field, } } -string WireType(const FieldDescriptor* field) { +std::string WireType(const FieldDescriptor* field) { return "com.google.protobuf.WireFormat.FieldType." + - string(FieldTypeName(field->type())); + std::string(FieldTypeName(field->type())); } -void SetMessageVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - const FieldGeneratorInfo* info, +void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, + int builderBitIndex, const FieldGeneratorInfo* info, Context* context, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); ClassNameResolver* name_resolver = context->GetNameResolver(); @@ -900,7 +897,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string ImmutableMapFieldLiteGenerator::GetBoxedType() const { +std::string ImmutableMapFieldLiteGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->message_type()); } diff --git a/src/google/protobuf/compiler/java/java_message.cc b/src/google/protobuf/compiler/java/java_message.cc index d28934aace..39b5d7cc06 100644 --- a/src/google/protobuf/compiler/java/java_message.cc +++ b/src/google/protobuf/compiler/java/java_message.cc @@ -66,8 +66,8 @@ using internal::WireFormat; using internal::WireFormatLite; namespace { -string MapValueImmutableClassdName(const Descriptor* descriptor, - ClassNameResolver* name_resolver) { +std::string MapValueImmutableClassdName(const Descriptor* descriptor, + ClassNameResolver* name_resolver) { const FieldDescriptor* value_field = descriptor->FindFieldByName("value"); GOOGLE_CHECK_EQ(FieldDescriptor::TYPE_MESSAGE, value_field->type()); return name_resolver->GetImmutableClassName(value_field->message_type()); @@ -103,7 +103,7 @@ void ImmutableMessageGenerator::GenerateStaticVariables( // the outermost class in the file. This way, they will be initialized in // a deterministic order. - std::map vars; + std::map vars; vars["identifier"] = UniqueFileScopeIdentifier(descriptor_); vars["index"] = StrCat(descriptor_->index()); vars["classname"] = name_resolver_->GetImmutableClassName(descriptor_); @@ -147,7 +147,7 @@ void ImmutableMessageGenerator::GenerateStaticVariables( int ImmutableMessageGenerator::GenerateStaticVariableInitializers( io::Printer* printer) { int bytecode_estimate = 0; - std::map vars; + std::map vars; vars["identifier"] = UniqueFileScopeIdentifier(descriptor_); vars["index"] = StrCat(descriptor_->index()); vars["classname"] = name_resolver_->GetImmutableClassName(descriptor_); @@ -184,7 +184,7 @@ int ImmutableMessageGenerator::GenerateStaticVariableInitializers( void ImmutableMessageGenerator:: GenerateFieldAccessorTable(io::Printer* printer, int* bytecode_estimate) { - std::map vars; + std::map vars; vars["identifier"] = UniqueFileScopeIdentifier(descriptor_); if (MultipleJavaFiles(descriptor_->file(), /* immutable = */ true)) { // We can only make these package-private since the classes that use them @@ -296,7 +296,7 @@ void ImmutableMessageGenerator::GenerateInterface(io::Printer* printer) { void ImmutableMessageGenerator::Generate(io::Printer* printer) { bool is_own_file = IsOwnFile(descriptor_, /* immutable = */ true); - std::map variables; + std::map variables; variables["static"] = is_own_file ? " " : " static "; variables["classname"] = descriptor_->name(); variables["extra_interfaces"] = ExtraMessageInterfaces(descriptor_); @@ -309,7 +309,7 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) { /* immutable = */ true); // The builder_type stores the super type name of the nested Builder class. - string builder_type; + std::string builder_type; if (descriptor_->extension_range_count() > 0) { printer->Print( variables, @@ -405,7 +405,7 @@ void ImmutableMessageGenerator::Generate(io::Printer* printer) { } // oneof - std::map vars; + std::map vars; for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { vars["oneof_name"] = context_->GetOneofGeneratorInfo( descriptor_->oneof_decl(i))->name; diff --git a/src/google/protobuf/compiler/java/java_message_builder.cc b/src/google/protobuf/compiler/java/java_message_builder.cc index b78f1e7834..2ba77a2219 100644 --- a/src/google/protobuf/compiler/java/java_message_builder.cc +++ b/src/google/protobuf/compiler/java/java_message_builder.cc @@ -61,8 +61,8 @@ namespace compiler { namespace java { namespace { -string MapValueImmutableClassdName(const Descriptor* descriptor, - ClassNameResolver* name_resolver) { +std::string MapValueImmutableClassdName(const Descriptor* descriptor, + ClassNameResolver* name_resolver) { const FieldDescriptor* value_field = descriptor->FindFieldByName("value"); GOOGLE_CHECK_EQ(FieldDescriptor::TYPE_MESSAGE, value_field->type()); return name_resolver->GetImmutableClassName(value_field->message_type()); @@ -115,7 +115,7 @@ Generate(io::Printer* printer) { } // oneof - std::map vars; + std::map vars; for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { vars["oneof_name"] = context_->GetOneofGeneratorInfo( descriptor_->oneof_decl(i))->name; diff --git a/src/google/protobuf/compiler/java/java_message_builder_lite.cc b/src/google/protobuf/compiler/java/java_message_builder_lite.cc index 641f66a6c3..0e2de150c2 100644 --- a/src/google/protobuf/compiler/java/java_message_builder_lite.cc +++ b/src/google/protobuf/compiler/java/java_message_builder_lite.cc @@ -89,7 +89,7 @@ Generate(io::Printer* printer) { GenerateCommonBuilderMethods(printer); // oneof - std::map vars; + std::map vars; for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { vars["oneof_name"] = context_->GetOneofGeneratorInfo( descriptor_->oneof_decl(i))->name; diff --git a/src/google/protobuf/compiler/java/java_message_field.cc b/src/google/protobuf/compiler/java/java_message_field.cc index d79b8c4b61..011cc5602f 100644 --- a/src/google/protobuf/compiler/java/java_message_field.cc +++ b/src/google/protobuf/compiler/java/java_message_field.cc @@ -51,12 +51,10 @@ namespace java { namespace { -void SetMessageVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - const FieldGeneratorInfo* info, +void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, + int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); (*variables)["type"] = @@ -517,7 +515,7 @@ GenerateHashCode(io::Printer* printer) const { "hash = (53 * hash) + get$capitalized_name$().hashCode();\n"); } -string ImmutableMessageFieldGenerator::GetBoxedType() const { +std::string ImmutableMessageFieldGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->message_type()); } @@ -1320,7 +1318,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutableMessageFieldGenerator::GetBoxedType() const { +std::string RepeatedImmutableMessageFieldGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->message_type()); } diff --git a/src/google/protobuf/compiler/java/java_message_field_lite.cc b/src/google/protobuf/compiler/java/java_message_field_lite.cc index 850120333f..c992ed399c 100644 --- a/src/google/protobuf/compiler/java/java_message_field_lite.cc +++ b/src/google/protobuf/compiler/java/java_message_field_lite.cc @@ -52,12 +52,10 @@ namespace java { namespace { -void SetMessageVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, - const FieldGeneratorInfo* info, +void SetMessageVariables(const FieldDescriptor* descriptor, int messageBitIndex, + int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); (*variables)["type"] = @@ -375,7 +373,7 @@ GenerateHashCode(io::Printer* printer) const { "hash = (53 * hash) + get$capitalized_name$().hashCode();\n"); } -string ImmutableMessageFieldLiteGenerator::GetBoxedType() const { +std::string ImmutableMessageFieldLiteGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->message_type()); } @@ -976,7 +974,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutableMessageFieldLiteGenerator::GetBoxedType() const { +std::string RepeatedImmutableMessageFieldLiteGenerator::GetBoxedType() const { return name_resolver_->GetImmutableClassName(descriptor_->message_type()); } diff --git a/src/google/protobuf/compiler/java/java_message_lite.cc b/src/google/protobuf/compiler/java/java_message_lite.cc index abc5101fec..c6d39915a0 100644 --- a/src/google/protobuf/compiler/java/java_message_lite.cc +++ b/src/google/protobuf/compiler/java/java_message_lite.cc @@ -74,8 +74,8 @@ bool EnableExperimentalRuntimeForLite() { #endif // !PROTOBUF_EXPERIMENT } -string MapValueImmutableClassdName(const Descriptor* descriptor, - ClassNameResolver* name_resolver) { +std::string MapValueImmutableClassdName(const Descriptor* descriptor, + ClassNameResolver* name_resolver) { const FieldDescriptor* value_field = descriptor->FindFieldByName("value"); GOOGLE_CHECK_EQ(FieldDescriptor::TYPE_MESSAGE, value_field->type()); return name_resolver->GetImmutableClassName(value_field->message_type()); @@ -175,7 +175,7 @@ void ImmutableMessageLiteGenerator::GenerateInterface(io::Printer* printer) { void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { bool is_own_file = IsOwnFile(descriptor_, /* immutable = */ true); - std::map variables; + std::map variables; variables["static"] = is_own_file ? " " : " static "; variables["classname"] = descriptor_->name(); variables["extra_interfaces"] = ExtraMessageInterfaces(descriptor_); @@ -188,7 +188,7 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { // The builder_type stores the super type name of the nested Builder class. - string builder_type; + std::string builder_type; if (descriptor_->extension_range_count() > 0) { printer->Print(variables, "$deprecation$public $static$final class $classname$ extends\n" @@ -241,7 +241,7 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) { } // oneof - std::map vars; + std::map vars; for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { const OneofDescriptor* oneof = descriptor_->oneof_decl(i); vars["oneof_name"] = context_->GetOneofGeneratorInfo(oneof)->name; diff --git a/src/google/protobuf/compiler/java/java_name_resolver.cc b/src/google/protobuf/compiler/java/java_name_resolver.cc index 1673b4ee76..f8e4b3a39a 100644 --- a/src/google/protobuf/compiler/java/java_name_resolver.cc +++ b/src/google/protobuf/compiler/java/java_name_resolver.cc @@ -37,6 +37,7 @@ #include #include + namespace google { namespace protobuf { namespace compiler { @@ -52,8 +53,8 @@ const char* kOuterClassNameSuffix = "OuterClass"; // Full name : foo.Bar.Baz // Package name: foo // After strip : Bar.Baz -string StripPackageName(const string& full_name, - const FileDescriptor* file) { +std::string StripPackageName(const std::string& full_name, + const FileDescriptor* file) { if (file->package().empty()) { return full_name; } else { @@ -63,15 +64,15 @@ string StripPackageName(const string& full_name, } // Get the name of a message's Java class without package name prefix. -string ClassNameWithoutPackage(const Descriptor* descriptor, - bool immutable) { +std::string ClassNameWithoutPackage(const Descriptor* descriptor, + bool immutable) { return StripPackageName(descriptor->full_name(), descriptor->file()); } // Get the name of an enum's Java class without package name prefix. -string ClassNameWithoutPackage(const EnumDescriptor* descriptor, - bool immutable) { +std::string ClassNameWithoutPackage(const EnumDescriptor* descriptor, + bool immutable) { // Doesn't append "Mutable" for enum type's name. const Descriptor* message_descriptor = descriptor->containing_type(); if (message_descriptor == NULL) { @@ -83,26 +84,42 @@ string ClassNameWithoutPackage(const EnumDescriptor* descriptor, } // Get the name of a service's Java class without package name prefix. -string ClassNameWithoutPackage(const ServiceDescriptor* descriptor, - bool immutable) { - string full_name = StripPackageName(descriptor->full_name(), - descriptor->file()); +std::string ClassNameWithoutPackage(const ServiceDescriptor* descriptor, + bool immutable) { + std::string full_name = + StripPackageName(descriptor->full_name(), descriptor->file()); // We don't allow nested service definitions. - GOOGLE_CHECK(full_name.find('.') == string::npos); + GOOGLE_CHECK(full_name.find('.') == std::string::npos); return full_name; } +// Return true if a and b are equals (case insensitive). +NameEquality CheckNameEquality(const string& a, const string& b) { + if (ToUpper(a) == ToUpper(b)) { + if (a == b) { + return NameEquality::EXACT_EQUAL; + } + return NameEquality::EQUAL_IGNORE_CASE; + } + return NameEquality::NO_MATCH; +} + // Check whether a given message or its nested types has the given class name. bool MessageHasConflictingClassName(const Descriptor* message, - const string& classname) { - if (message->name() == classname) return true; + const std::string& classname, + NameEquality equality_mode) { + if (CheckNameEquality(message->name(), classname) == equality_mode) { + return true; + } for (int i = 0; i < message->nested_type_count(); ++i) { - if (MessageHasConflictingClassName(message->nested_type(i), classname)) { + if (MessageHasConflictingClassName(message->nested_type(i), classname, + equality_mode)) { return true; } } for (int i = 0; i < message->enum_type_count(); ++i) { - if (message->enum_type(i)->name() == classname) { + if (CheckNameEquality(message->enum_type(i)->name(), classname) == + equality_mode) { return true; } } @@ -117,11 +134,11 @@ ClassNameResolver::ClassNameResolver() { ClassNameResolver::~ClassNameResolver() { } -string ClassNameResolver::GetFileDefaultImmutableClassName( +std::string ClassNameResolver::GetFileDefaultImmutableClassName( const FileDescriptor* file) { - string basename; - string::size_type last_slash = file->name().find_last_of('/'); - if (last_slash == string::npos) { + std::string basename; + std::string::size_type last_slash = file->name().find_last_of('/'); + if (last_slash == std::string::npos) { basename = file->name(); } else { basename = file->name().substr(last_slash + 1); @@ -129,15 +146,16 @@ string ClassNameResolver::GetFileDefaultImmutableClassName( return UnderscoresToCamelCase(StripProto(basename), true); } -string ClassNameResolver::GetFileImmutableClassName( +std::string ClassNameResolver::GetFileImmutableClassName( const FileDescriptor* file) { - string& class_name = file_immutable_outer_class_names_[file]; + std::string& class_name = file_immutable_outer_class_names_[file]; if (class_name.empty()) { if (file->options().has_java_outer_classname()) { class_name = file->options().java_outer_classname(); } else { class_name = GetFileDefaultImmutableClassName(file); - if (HasConflictingClassName(file, class_name)) { + if (HasConflictingClassName(file, class_name, + NameEquality::EXACT_EQUAL)) { class_name += kOuterClassNameSuffix; } } @@ -145,8 +163,8 @@ string ClassNameResolver::GetFileImmutableClassName( return class_name; } -string ClassNameResolver::GetFileClassName(const FileDescriptor* file, - bool immutable) { +std::string ClassNameResolver::GetFileClassName(const FileDescriptor* file, + bool immutable) { if (immutable) { return GetFileImmutableClassName(file); } else { @@ -157,33 +175,37 @@ string ClassNameResolver::GetFileClassName(const FileDescriptor* file, // Check whether there is any type defined in the proto file that has // the given class name. bool ClassNameResolver::HasConflictingClassName( - const FileDescriptor* file, const string& classname) { + const FileDescriptor* file, const std::string& classname, + NameEquality equality_mode) { for (int i = 0; i < file->enum_type_count(); i++) { - if (file->enum_type(i)->name() == classname) { + if (CheckNameEquality(file->enum_type(i)->name(), classname) == + equality_mode) { return true; } } for (int i = 0; i < file->service_count(); i++) { - if (file->service(i)->name() == classname) { + if (CheckNameEquality(file->service(i)->name(), classname) == + equality_mode) { return true; } } for (int i = 0; i < file->message_type_count(); i++) { - if (MessageHasConflictingClassName(file->message_type(i), classname)) { + if (MessageHasConflictingClassName(file->message_type(i), classname, + equality_mode)) { return true; } } return false; } -string ClassNameResolver::GetDescriptorClassName( +std::string ClassNameResolver::GetDescriptorClassName( const FileDescriptor* descriptor) { return GetFileImmutableClassName(descriptor); } -string ClassNameResolver::GetClassName(const FileDescriptor* descriptor, - bool immutable) { - string result = FileJavaPackage(descriptor, immutable); +std::string ClassNameResolver::GetClassName(const FileDescriptor* descriptor, + bool immutable) { + std::string result = FileJavaPackage(descriptor, immutable); if (!result.empty()) result += '.'; result += GetFileClassName(descriptor, immutable); return result; @@ -191,11 +213,10 @@ string ClassNameResolver::GetClassName(const FileDescriptor* descriptor, // Get the full name of a Java class by prepending the Java package name // or outer class name. -string ClassNameResolver::GetClassFullName(const string& name_without_package, - const FileDescriptor* file, - bool immutable, - bool multiple_files) { - string result; +std::string ClassNameResolver::GetClassFullName( + const std::string& name_without_package, const FileDescriptor* file, + bool immutable, bool multiple_files) { + std::string result; if (multiple_files) { result = FileJavaPackage(file, immutable); } else { @@ -208,33 +229,32 @@ string ClassNameResolver::GetClassFullName(const string& name_without_package, return result; } -string ClassNameResolver::GetClassName(const Descriptor* descriptor, - bool immutable) { +std::string ClassNameResolver::GetClassName(const Descriptor* descriptor, + bool immutable) { return GetClassFullName(ClassNameWithoutPackage(descriptor, immutable), descriptor->file(), immutable, MultipleJavaFiles(descriptor->file(), immutable)); } -string ClassNameResolver::GetClassName(const EnumDescriptor* descriptor, - bool immutable) { +std::string ClassNameResolver::GetClassName(const EnumDescriptor* descriptor, + bool immutable) { return GetClassFullName(ClassNameWithoutPackage(descriptor, immutable), descriptor->file(), immutable, MultipleJavaFiles(descriptor->file(), immutable)); } -string ClassNameResolver::GetClassName(const ServiceDescriptor* descriptor, - bool immutable) { +std::string ClassNameResolver::GetClassName(const ServiceDescriptor* descriptor, + bool immutable) { return GetClassFullName(ClassNameWithoutPackage(descriptor, immutable), descriptor->file(), immutable, MultipleJavaFiles(descriptor->file(), immutable)); } // Get the Java Class style full name of a message. -string ClassNameResolver::GetJavaClassFullName( - const string& name_without_package, - const FileDescriptor* file, +std::string ClassNameResolver::GetJavaClassFullName( + const std::string& name_without_package, const FileDescriptor* file, bool immutable) { - string result; + std::string result; if (MultipleJavaFiles(file, immutable)) { result = FileJavaPackage(file, immutable); if (!result.empty()) result += '.'; @@ -246,21 +266,20 @@ string ClassNameResolver::GetJavaClassFullName( return result; } -string ClassNameResolver::GetExtensionIdentifierName( +std::string ClassNameResolver::GetExtensionIdentifierName( const FieldDescriptor* descriptor, bool immutable) { return GetClassName(descriptor->containing_type(), immutable) + "." + descriptor->name(); } - -string ClassNameResolver::GetJavaImmutableClassName( +std::string ClassNameResolver::GetJavaImmutableClassName( const Descriptor* descriptor) { return GetJavaClassFullName( ClassNameWithoutPackage(descriptor, true), descriptor->file(), true); } -string ClassNameResolver::GetJavaImmutableClassName( +std::string ClassNameResolver::GetJavaImmutableClassName( const EnumDescriptor* descriptor) { return GetJavaClassFullName( ClassNameWithoutPackage(descriptor, true), diff --git a/src/google/protobuf/compiler/java/java_name_resolver.h b/src/google/protobuf/compiler/java/java_name_resolver.h index aa19f0072b..89bcb59741 100644 --- a/src/google/protobuf/compiler/java/java_name_resolver.h +++ b/src/google/protobuf/compiler/java/java_name_resolver.h @@ -47,6 +47,9 @@ class ServiceDescriptor; namespace compiler { namespace java { +// Indicates how closely the two class names match. +enum NameEquality { NO_MATCH, EXACT_EQUAL, EQUAL_IGNORE_CASE }; + // Used to get the Java class related names for a given descriptor. It caches // the results to avoid redundant calculation across multiple name queries. // Thread-safety note: This class is *not* thread-safe. @@ -66,7 +69,8 @@ class ClassNameResolver { // Check whether there is any type defined in the proto file that has // the given class name. bool HasConflictingClassName(const FileDescriptor* file, - const std::string& classname); + const std::string& classname, + NameEquality equality_mode); // Gets the name of the outer class that holds descriptor information. // Descriptors are shared between immutable messages and mutable messages. @@ -80,18 +84,18 @@ class ClassNameResolver { std::string GetClassName(const ServiceDescriptor* descriptor, bool immutable); std::string GetClassName(const FileDescriptor* descriptor, bool immutable); - template + template std::string GetImmutableClassName(const DescriptorType* descriptor) { return GetClassName(descriptor, true); } - template + template std::string GetMutableClassName(const DescriptorType* descriptor) { return GetClassName(descriptor, false); } // Gets the fully qualified name of an extension identifier. std::string GetExtensionIdentifierName(const FieldDescriptor* descriptor, - bool immutable); + bool immutable); // Gets the fully qualified name for generated classes in Java convention. // Nested classes will be separated using '$' instead of '.' @@ -103,16 +107,14 @@ class ClassNameResolver { // Get the full name of a Java class by prepending the Java package name // or outer class name. std::string GetClassFullName(const std::string& name_without_package, - const FileDescriptor* file, - bool immutable, - bool multiple_files); + const FileDescriptor* file, bool immutable, + bool multiple_files); // Get the Java Class style full name of a message. - std::string GetJavaClassFullName( - const std::string& name_without_package, - const FileDescriptor* file, - bool immutable); + std::string GetJavaClassFullName(const std::string& name_without_package, + const FileDescriptor* file, bool immutable); // Caches the result to provide better performance. - std::map file_immutable_outer_class_names_; + std::map + file_immutable_outer_class_names_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ClassNameResolver); }; diff --git a/src/google/protobuf/compiler/java/java_plugin_unittest.cc b/src/google/protobuf/compiler/java/java_plugin_unittest.cc index 644d0685a3..b3e220f113 100644 --- a/src/google/protobuf/compiler/java/java_plugin_unittest.cc +++ b/src/google/protobuf/compiler/java/java_plugin_unittest.cc @@ -58,10 +58,9 @@ class TestGenerator : public CodeGenerator { ~TestGenerator() {} virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { - string filename = "Test.java"; + const std::string& parameter, GeneratorContext* context, + std::string* error) const { + std::string filename = "Test.java"; TryInsert(filename, "outer_class_scope", context); TryInsert(filename, "class_scope:foo.Bar", context); TryInsert(filename, "class_scope:foo.Bar.Baz", context); @@ -71,7 +70,8 @@ class TestGenerator : public CodeGenerator { return true; } - void TryInsert(const string& filename, const string& insertion_point, + void TryInsert(const std::string& filename, + const std::string& insertion_point, GeneratorContext* context) const { std::unique_ptr output( context->OpenForInsert(filename, insertion_point)); @@ -103,9 +103,9 @@ TEST(JavaPluginTest, PluginTest) { cli.RegisterGenerator("--java_out", &java_generator, ""); cli.RegisterGenerator("--test_out", &test_generator, ""); - string proto_path = "-I" + TestTempDir(); - string java_out = "--java_out=" + TestTempDir(); - string test_out = "--test_out=" + TestTempDir(); + std::string proto_path = "-I" + TestTempDir(); + std::string java_out = "--java_out=" + TestTempDir(); + std::string test_out = "--test_out=" + TestTempDir(); const char* argv[] = { "protoc", diff --git a/src/google/protobuf/compiler/java/java_primitive_field.cc b/src/google/protobuf/compiler/java/java_primitive_field.cc index 454e2ebf65..d26d43d16a 100644 --- a/src/google/protobuf/compiler/java/java_primitive_field.cc +++ b/src/google/protobuf/compiler/java/java_primitive_field.cc @@ -58,11 +58,10 @@ using internal::WireFormatLite; namespace { void SetPrimitiveVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, + int messageBitIndex, int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); JavaType javaType = GetJavaType(descriptor); @@ -75,7 +74,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, javaType == JAVATYPE_FLOAT || javaType == JAVATYPE_INT || javaType == JAVATYPE_LONG) { - string capitalized_type = UnderscoresToCamelCase( + std::string capitalized_type = UnderscoresToCamelCase( PrimitiveTypeName(javaType), /*cap_first_letter=*/true); (*variables)["field_list_type"] = "com.google.protobuf.Internal." + capitalized_type + "List"; @@ -467,7 +466,7 @@ GenerateHashCode(io::Printer* printer) const { } } -string ImmutablePrimitiveFieldGenerator::GetBoxedType() const { +std::string ImmutablePrimitiveFieldGenerator::GetBoxedType() const { return BoxedPrimitiveTypeName(GetJavaType(descriptor_)); } @@ -938,7 +937,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutablePrimitiveFieldGenerator::GetBoxedType() const { +std::string RepeatedImmutablePrimitiveFieldGenerator::GetBoxedType() const { return BoxedPrimitiveTypeName(GetJavaType(descriptor_)); } diff --git a/src/google/protobuf/compiler/java/java_primitive_field_lite.cc b/src/google/protobuf/compiler/java/java_primitive_field_lite.cc index 2dfa242c35..0fda38db05 100644 --- a/src/google/protobuf/compiler/java/java_primitive_field_lite.cc +++ b/src/google/protobuf/compiler/java/java_primitive_field_lite.cc @@ -58,11 +58,10 @@ using internal::WireFormatLite; namespace { void SetPrimitiveVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, + int messageBitIndex, int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); JavaType javaType = GetJavaType(descriptor); (*variables)["type"] = PrimitiveTypeName(javaType); @@ -77,8 +76,8 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, WireFormat::TagSize(descriptor->number(), GetType(descriptor))); (*variables)["required"] = descriptor->is_required() ? "true" : "false"; - string capitalized_type = UnderscoresToCamelCase(PrimitiveTypeName(javaType), - true /* cap_next_letter */); + std::string capitalized_type = UnderscoresToCamelCase( + PrimitiveTypeName(javaType), true /* cap_next_letter */); switch (javaType) { case JAVATYPE_INT: case JAVATYPE_LONG: @@ -460,7 +459,7 @@ GenerateHashCode(io::Printer* printer) const { } } -string ImmutablePrimitiveFieldLiteGenerator::GetBoxedType() const { +std::string ImmutablePrimitiveFieldLiteGenerator::GetBoxedType() const { return BoxedPrimitiveTypeName(GetJavaType(descriptor_)); } @@ -934,7 +933,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutablePrimitiveFieldLiteGenerator::GetBoxedType() const { +std::string RepeatedImmutablePrimitiveFieldLiteGenerator::GetBoxedType() const { return BoxedPrimitiveTypeName(GetJavaType(descriptor_)); } diff --git a/src/google/protobuf/compiler/java/java_service.cc b/src/google/protobuf/compiler/java/java_service.cc index 55c6eec4a1..c5983309ce 100644 --- a/src/google/protobuf/compiler/java/java_service.cc +++ b/src/google/protobuf/compiler/java/java_service.cc @@ -185,7 +185,8 @@ void ImmutableServiceGenerator::GenerateAbstractMethods(io::Printer* printer) { } } -string ImmutableServiceGenerator::GetOutput(const MethodDescriptor* method) { +std::string ImmutableServiceGenerator::GetOutput( + const MethodDescriptor* method) { return name_resolver_->GetImmutableClassName(method->output_type()); } @@ -209,7 +210,7 @@ void ImmutableServiceGenerator::GenerateCallMethod(io::Printer* printer) { for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); - std::map vars; + std::map vars; vars["index"] = StrCat(i); vars["method"] = UnderscoresToCamelCase(method); vars["input"] = name_resolver_->GetImmutableClassName( @@ -256,7 +257,7 @@ void ImmutableServiceGenerator::GenerateCallBlockingMethod( for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); - std::map vars; + std::map vars; vars["index"] = StrCat(i); vars["method"] = UnderscoresToCamelCase(method); vars["input"] = name_resolver_->GetImmutableClassName( @@ -302,7 +303,7 @@ void ImmutableServiceGenerator::GenerateGetPrototype(RequestOrResponse which, for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); - std::map vars; + std::map vars; vars["index"] = StrCat(i); vars["type"] = (which == REQUEST) @@ -356,7 +357,7 @@ void ImmutableServiceGenerator::GenerateStub(io::Printer* printer) { printer->Print(" {\n"); printer->Indent(); - std::map vars; + std::map vars; vars["index"] = StrCat(i); vars["output"] = GetOutput(method); printer->Print(vars, @@ -420,7 +421,7 @@ void ImmutableServiceGenerator::GenerateBlockingStub(io::Printer* printer) { printer->Print(" {\n"); printer->Indent(); - std::map vars; + std::map vars; vars["index"] = StrCat(i); vars["output"] = GetOutput(method); printer->Print(vars, @@ -443,7 +444,7 @@ void ImmutableServiceGenerator::GenerateBlockingStub(io::Printer* printer) { void ImmutableServiceGenerator::GenerateMethodSignature(io::Printer* printer, const MethodDescriptor* method, IsAbstract is_abstract) { - std::map vars; + std::map vars; vars["name"] = UnderscoresToCamelCase(method); vars["input"] = name_resolver_->GetImmutableClassName(method->input_type()); vars["output"] = GetOutput(method); @@ -458,7 +459,7 @@ void ImmutableServiceGenerator::GenerateMethodSignature(io::Printer* printer, void ImmutableServiceGenerator::GenerateBlockingMethodSignature( io::Printer* printer, const MethodDescriptor* method) { - std::map vars; + std::map vars; vars["method"] = UnderscoresToCamelCase(method); vars["input"] = name_resolver_->GetImmutableClassName(method->input_type()); vars["output"] = GetOutput(method); diff --git a/src/google/protobuf/compiler/java/java_shared_code_generator.cc b/src/google/protobuf/compiler/java/java_shared_code_generator.cc index 0cec20b97b..a7931f0568 100644 --- a/src/google/protobuf/compiler/java/java_shared_code_generator.cc +++ b/src/google/protobuf/compiler/java/java_shared_code_generator.cc @@ -55,16 +55,16 @@ SharedCodeGenerator::SharedCodeGenerator(const FileDescriptor* file, SharedCodeGenerator::~SharedCodeGenerator() { } -void SharedCodeGenerator::Generate(GeneratorContext* context, - std::vector* file_list, - std::vector* annotation_file_list) { - string java_package = FileJavaPackage(file_); - string package_dir = JavaPackageToDir(java_package); +void SharedCodeGenerator::Generate( + GeneratorContext* context, std::vector* file_list, + std::vector* annotation_file_list) { + std::string java_package = FileJavaPackage(file_); + std::string package_dir = JavaPackageToDir(java_package); if (HasDescriptorMethods(file_, options_.enforce_lite)) { // Generate descriptors. - string classname = name_resolver_->GetDescriptorClassName(file_); - string filename = package_dir + classname + ".java"; + std::string classname = name_resolver_->GetDescriptorClassName(file_); + std::string filename = package_dir + classname + ".java"; file_list->push_back(filename); std::unique_ptr output(context->Open(filename)); GeneratedCodeInfo annotations; @@ -73,8 +73,8 @@ void SharedCodeGenerator::Generate(GeneratorContext* context, std::unique_ptr printer( new io::Printer(output.get(), '$', options_.annotate_code ? &annotation_collector : NULL)); - string info_relative_path = classname + ".java.pb.meta"; - string info_full_path = filename + ".pb.meta"; + std::string info_relative_path = classname + ".java.pb.meta"; + std::string info_full_path = filename + ".pb.meta"; printer->Print( "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" "// source: $filename$\n" @@ -130,7 +130,7 @@ void SharedCodeGenerator::GenerateDescriptors(io::Printer* printer) { FileDescriptorProto file_proto; file_->CopyTo(&file_proto); - string file_data; + std::string file_data; file_proto.SerializeToString(&file_data); printer->Print( @@ -159,33 +159,15 @@ void SharedCodeGenerator::GenerateDescriptors(io::Printer* printer) { printer->Outdent(); printer->Print("\n};\n"); - // ----------------------------------------------------------------- - // Create the InternalDescriptorAssigner. - - printer->Print( - "com.google.protobuf.Descriptors.FileDescriptor." - "InternalDescriptorAssigner assigner =\n" - " new com.google.protobuf.Descriptors.FileDescriptor." - " InternalDescriptorAssigner() {\n" - " public com.google.protobuf.ExtensionRegistry assignDescriptors(\n" - " com.google.protobuf.Descriptors.FileDescriptor root) {\n" - " descriptor = root;\n" - // Custom options will be handled when immutable messages' outer class is - // loaded. Here we just return null and let custom options be unknown - // fields. - " return null;\n" - " }\n" - " };\n"); - // ----------------------------------------------------------------- // Find out all dependencies. - std::vector > dependencies; + std::vector > dependencies; for (int i = 0; i < file_->dependency_count(); i++) { - string filename = file_->dependency(i)->name(); - string package = FileJavaPackage(file_->dependency(i)); - string classname = name_resolver_->GetDescriptorClassName( - file_->dependency(i)); - string full_name; + std::string filename = file_->dependency(i)->name(); + std::string package = FileJavaPackage(file_->dependency(i)); + std::string classname = + name_resolver_->GetDescriptorClassName(file_->dependency(i)); + std::string full_name; if (package.empty()) { full_name = classname; } else { @@ -197,20 +179,20 @@ void SharedCodeGenerator::GenerateDescriptors(io::Printer* printer) { // ----------------------------------------------------------------- // Invoke internalBuildGeneratedFileFrom() to build the file. printer->Print( - "com.google.protobuf.Descriptors.FileDescriptor\n" + "descriptor = com.google.protobuf.Descriptors.FileDescriptor\n" " .internalBuildGeneratedFileFrom(descriptorData,\n"); printer->Print( " new com.google.protobuf.Descriptors.FileDescriptor[] {\n"); for (int i = 0; i < dependencies.size(); i++) { - const string& dependency = dependencies[i].second; + const std::string& dependency = dependencies[i].second; printer->Print( " $dependency$.getDescriptor(),\n", "dependency", dependency); } printer->Print( - " }, assigner);\n"); + " });\n"); } } // namespace java diff --git a/src/google/protobuf/compiler/java/java_string_field.cc b/src/google/protobuf/compiler/java/java_string_field.cc index ac4cf1fa3a..a20d7ef450 100644 --- a/src/google/protobuf/compiler/java/java_string_field.cc +++ b/src/google/protobuf/compiler/java/java_string_field.cc @@ -59,11 +59,10 @@ using internal::WireFormatLite; namespace { void SetPrimitiveVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, + int messageBitIndex, int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); (*variables)["empty_list"] = "com.google.protobuf.LazyStringArrayList.EMPTY"; @@ -464,7 +463,7 @@ GenerateHashCode(io::Printer* printer) const { "hash = (53 * hash) + get$capitalized_name$().hashCode();\n"); } -string ImmutableStringFieldGenerator::GetBoxedType() const { +std::string ImmutableStringFieldGenerator::GetBoxedType() const { return "java.lang.String"; } @@ -1030,7 +1029,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutableStringFieldGenerator::GetBoxedType() const { +std::string RepeatedImmutableStringFieldGenerator::GetBoxedType() const { return "String"; } diff --git a/src/google/protobuf/compiler/java/java_string_field_lite.cc b/src/google/protobuf/compiler/java/java_string_field_lite.cc index 42c56f2155..c1588728c1 100644 --- a/src/google/protobuf/compiler/java/java_string_field_lite.cc +++ b/src/google/protobuf/compiler/java/java_string_field_lite.cc @@ -59,11 +59,10 @@ using internal::WireFormatLite; namespace { void SetPrimitiveVariables(const FieldDescriptor* descriptor, - int messageBitIndex, - int builderBitIndex, + int messageBitIndex, int builderBitIndex, const FieldGeneratorInfo* info, ClassNameResolver* name_resolver, - std::map* variables) { + std::map* variables) { SetCommonFieldVariables(descriptor, info, variables); (*variables)["empty_list"] = @@ -392,7 +391,7 @@ GenerateHashCode(io::Printer* printer) const { "hash = (53 * hash) + get$capitalized_name$().hashCode();\n"); } -string ImmutableStringFieldLiteGenerator::GetBoxedType() const { +std::string ImmutableStringFieldLiteGenerator::GetBoxedType() const { return "java.lang.String"; } @@ -912,7 +911,7 @@ GenerateHashCode(io::Printer* printer) const { "}\n"); } -string RepeatedImmutableStringFieldLiteGenerator::GetBoxedType() const { +std::string RepeatedImmutableStringFieldLiteGenerator::GetBoxedType() const { return "java.lang.String"; } diff --git a/src/google/protobuf/compiler/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc index c513a6ef80..f3d8533d78 100644 --- a/src/google/protobuf/compiler/js/js_generator.cc +++ b/src/google/protobuf/compiler/js/js_generator.cc @@ -134,7 +134,7 @@ enum BytesMode { BYTES_U8, // Explicitly coerce to Uint8Array where needed. }; -bool IsReserved(const string& ident) { +bool IsReserved(const std::string& ident) { for (int i = 0; i < kNumKeyword; i++) { if (ident == kKeyword[i]) { return true; @@ -150,27 +150,29 @@ bool StrEndsWith(StringPiece sp, StringPiece x) { // Returns a copy of |filename| with any trailing ".protodevel" or ".proto // suffix stripped. // TODO(haberman): Unify with copy in compiler/cpp/internal/helpers.cc. -string StripProto(const string& filename) { +std::string StripProto(const std::string& filename) { const char* suffix = StrEndsWith(filename, ".protodevel") ? ".protodevel" : ".proto"; return StripSuffixString(filename, suffix); } -string GetSnakeFilename(const string& filename) { - string snake_name = filename; +std::string GetSnakeFilename(const std::string& filename) { + std::string snake_name = filename; ReplaceCharacters(&snake_name, "/", '_'); return snake_name; } // Given a filename like foo/bar/baz.proto, returns the corresponding JavaScript // file foo/bar/baz.js. -string GetJSFilename(const GeneratorOptions& options, const string& filename) { +std::string GetJSFilename(const GeneratorOptions& options, + const std::string& filename) { return StripProto(filename) + options.GetFileNameExtension(); } // Given a filename like foo/bar/baz.proto, returns the root directory // path ../../ -string GetRootPath(const string& from_filename, const string& to_filename) { +string GetRootPath(const std::string& from_filename, + const std::string& to_filename) { if (to_filename.find("google/protobuf") == 0) { // Well-known types (.proto files in the google/protobuf directory) are // assumed to come from the 'google-protobuf' npm package. We may want to @@ -183,7 +185,7 @@ string GetRootPath(const string& from_filename, const string& to_filename) { if (slashes == 0) { return "./"; } - string result = ""; + std::string result = ""; for (size_t i = 0; i < slashes; i++) { result += "../"; } @@ -192,7 +194,7 @@ string GetRootPath(const string& from_filename, const string& to_filename) { // Returns the alias we assign to the module of the given .proto filename // when importing. -string ModuleAlias(const string& filename) { +std::string ModuleAlias(const std::string& filename) { // This scheme could technically cause problems if a file includes any 2 of: // foo/bar_baz.proto // foo_bar_baz.proto @@ -200,7 +202,7 @@ string ModuleAlias(const string& filename) { // // We'll worry about this problem if/when we actually see it. This name isn't // exposed to users so we can change it later if we need to. - string basename = StripProto(filename); + std::string basename = StripProto(filename); ReplaceCharacters(&basename, "-", '$'); ReplaceCharacters(&basename, "/", '_'); ReplaceCharacters(&basename, ".", '_'); @@ -209,8 +211,8 @@ string ModuleAlias(const string& filename) { // Returns the fully normalized JavaScript namespace for the given // file descriptor's package. -string GetNamespace(const GeneratorOptions& options, - const FileDescriptor* file) { +std::string GetNamespace(const GeneratorOptions& options, + const FileDescriptor* file) { if (!options.namespace_prefix.empty()) { return options.namespace_prefix; } else if (!file->package().empty()) { @@ -224,12 +226,12 @@ string GetNamespace(const GeneratorOptions& options, // nesting, for example ".OuterMessage.InnerMessage", or returns empty if // descriptor is null. This function does not handle namespacing, only message // nesting. -string GetNestedMessageName(const Descriptor* descriptor) { +std::string GetNestedMessageName(const Descriptor* descriptor) { if (descriptor == NULL) { return ""; } - string result = StripPrefixString(descriptor->full_name(), - descriptor->file()->package()); + std::string result = StripPrefixString( + descriptor->full_name(), descriptor->file()->package()); // Add a leading dot if one is not already present. if (!result.empty() && result[0] != '.') { result = "." + result; @@ -239,11 +241,11 @@ string GetNestedMessageName(const Descriptor* descriptor) { // Returns the path prefix for a message or enumeration that // lives under the given file and containing type. -string GetPrefix(const GeneratorOptions& options, - const FileDescriptor* file_descriptor, - const Descriptor* containing_type) { - string prefix = GetNamespace(options, file_descriptor) + - GetNestedMessageName(containing_type); +std::string GetPrefix(const GeneratorOptions& options, + const FileDescriptor* file_descriptor, + const Descriptor* containing_type) { + std::string prefix = GetNamespace(options, file_descriptor) + + GetNestedMessageName(containing_type); if (!prefix.empty()) { prefix += "."; } @@ -252,36 +254,36 @@ string GetPrefix(const GeneratorOptions& options, // Returns the fully normalized JavaScript path prefix for the given // message descriptor. -string GetMessagePathPrefix(const GeneratorOptions& options, - const Descriptor* descriptor) { +std::string GetMessagePathPrefix(const GeneratorOptions& options, + const Descriptor* descriptor) { return GetPrefix(options, descriptor->file(), descriptor->containing_type()); } // Returns the fully normalized JavaScript path for the given // message descriptor. -string GetMessagePath(const GeneratorOptions& options, - const Descriptor* descriptor) { +std::string GetMessagePath(const GeneratorOptions& options, + const Descriptor* descriptor) { return GetMessagePathPrefix(options, descriptor) + descriptor->name(); } // Returns the fully normalized JavaScript path prefix for the given // enumeration descriptor. -string GetEnumPathPrefix(const GeneratorOptions& options, - const EnumDescriptor* enum_descriptor) { +std::string GetEnumPathPrefix(const GeneratorOptions& options, + const EnumDescriptor* enum_descriptor) { return GetPrefix(options, enum_descriptor->file(), enum_descriptor->containing_type()); } // Returns the fully normalized JavaScript path for the given // enumeration descriptor. -string GetEnumPath(const GeneratorOptions& options, - const EnumDescriptor* enum_descriptor) { +std::string GetEnumPath(const GeneratorOptions& options, + const EnumDescriptor* enum_descriptor) { return GetEnumPathPrefix(options, enum_descriptor) + enum_descriptor->name(); } -string MaybeCrossFileRef(const GeneratorOptions& options, - const FileDescriptor* from_file, - const Descriptor* to_message) { +std::string MaybeCrossFileRef(const GeneratorOptions& options, + const FileDescriptor* from_file, + const Descriptor* to_message) { if ((options.import_style == GeneratorOptions::kImportCommonJs || options.import_style == GeneratorOptions::kImportCommonJsStrict) && from_file != to_message->file()) { @@ -296,8 +298,8 @@ string MaybeCrossFileRef(const GeneratorOptions& options, } } -string SubmessageTypeRef(const GeneratorOptions& options, - const FieldDescriptor* field) { +std::string SubmessageTypeRef(const GeneratorOptions& options, + const FieldDescriptor* field) { GOOGLE_CHECK(field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE); return MaybeCrossFileRef(options, field->file(), field->message_type()); } @@ -319,9 +321,9 @@ char ToLowerASCII(char c) { } } -std::vector ParseLowerUnderscore(const string& input) { - std::vector words; - string running = ""; +std::vector ParseLowerUnderscore(const std::string& input) { + std::vector words; + std::string running = ""; for (int i = 0; i < input.size(); i++) { if (input[i] == '_') { if (!running.empty()) { @@ -338,9 +340,9 @@ std::vector ParseLowerUnderscore(const string& input) { return words; } -std::vector ParseUpperCamel(const string& input) { - std::vector words; - string running = ""; +std::vector ParseUpperCamel(const std::string& input) { + std::vector words; + std::string running = ""; for (int i = 0; i < input.size(); i++) { if (input[i] >= 'A' && input[i] <= 'Z' && !running.empty()) { words.push_back(running); @@ -354,10 +356,10 @@ std::vector ParseUpperCamel(const string& input) { return words; } -string ToLowerCamel(const std::vector& words) { - string result; +std::string ToLowerCamel(const std::vector& words) { + std::string result; for (int i = 0; i < words.size(); i++) { - string word = words[i]; + std::string word = words[i]; if (i == 0 && (word[0] >= 'A' && word[0] <= 'Z')) { word[0] = (word[0] - 'A') + 'a'; } else if (i != 0 && (word[0] >= 'a' && word[0] <= 'z')) { @@ -368,10 +370,10 @@ string ToLowerCamel(const std::vector& words) { return result; } -string ToUpperCamel(const std::vector& words) { - string result; +std::string ToUpperCamel(const std::vector& words) { + std::string result; for (int i = 0; i < words.size(); i++) { - string word = words[i]; + std::string word = words[i]; if (word[0] >= 'a' && word[0] <= 'z') { word[0] = (word[0] - 'a') + 'A'; } @@ -383,8 +385,8 @@ string ToUpperCamel(const std::vector& words) { // Based on code from descriptor.cc (Thanks Kenton!) // Uppercases the entire string, turning ValueName into // VALUENAME. -string ToEnumCase(const string& input) { - string result; +std::string ToEnumCase(const std::string& input) { + std::string result; result.reserve(input.size()); for (int i = 0; i < input.size(); i++) { @@ -398,8 +400,8 @@ string ToEnumCase(const string& input) { return result; } -string ToLower(const string& input) { - string result; +std::string ToLower(const std::string& input) { + std::string result; result.reserve(input.size()); for (int i = 0; i < input.size(); i++) { @@ -422,9 +424,10 @@ string ToLower(const string& input) { // } // If "with_filename" equals true, the extension filename will be // "proto.a_test_extensions.js", otherwise will be "proto.a.js" -string GetExtensionFileName(const GeneratorOptions& options, - const FileDescriptor* file, bool with_filename) { - string snake_name = StripProto(GetSnakeFilename(file->name())); +std::string GetExtensionFileName(const GeneratorOptions& options, + const FileDescriptor* file, + bool with_filename) { + std::string snake_name = StripProto(GetSnakeFilename(file->name())); return options.output_dir + "/" + ToLower(GetNamespace(options, file)) + (with_filename ? ("_" + snake_name + "_extensions") : "") + options.GetFileNameExtension(); @@ -435,17 +438,17 @@ string GetExtensionFileName(const GeneratorOptions& options, // If the filename length is longer than 200, the filename will be the // SCC's proto filename with suffix "_long_sccs_(index)" (if with_package equals // true it still has package prefix) -string GetMessagesFileName( - const GeneratorOptions& options, const SCC* scc, bool with_package) { - static std::map* long_name_dict = - new std::map(); - string package_base = +std::string GetMessagesFileName(const GeneratorOptions& options, const SCC* scc, + bool with_package) { + static std::map* long_name_dict = + new std::map(); + std::string package_base = with_package - ? ToLower( - GetNamespace(options, scc->GetRepresentative()->file()) + "_") - : ""; - string filename_base = ""; - std::vector all_message_names; + ? ToLower(GetNamespace(options, scc->GetRepresentative()->file()) + + "_") + : ""; + std::string filename_base = ""; + std::vector all_message_names; for (auto one_desc : scc->descriptors) { if (one_desc->containing_type() == nullptr) { all_message_names.push_back(ToLower(one_desc->name())); @@ -461,7 +464,7 @@ string GetMessagesFileName( if (filename_base.size() + package_base.size() > 200) { if ((*long_name_dict).find(scc->GetRepresentative()) == (*long_name_dict).end()) { - string snake_name = StripProto( + std::string snake_name = StripProto( GetSnakeFilename(scc->GetRepresentative()->file()->name())); (*long_name_dict)[scc->GetRepresentative()] = StrCat(snake_name, "_long_sccs_", @@ -476,9 +479,8 @@ string GetMessagesFileName( // When we're generating one output file per type name, this is the filename // that a top-level enum should go in. // If with_package equals true, filename will have package prefix. -string GetEnumFileName(const GeneratorOptions& options, - const EnumDescriptor* desc, - bool with_package) { +std::string GetEnumFileName(const GeneratorOptions& options, + const EnumDescriptor* desc, bool with_package) { return options.output_dir + "/" + (with_package ? ToLower(GetNamespace(options, desc->file()) + "_") @@ -488,8 +490,8 @@ string GetEnumFileName(const GeneratorOptions& options, } // Returns the message/response ID, if set. -string GetMessageId(const Descriptor* desc) { - return string(); +std::string GetMessageId(const Descriptor* desc) { + return std::string(); } bool IgnoreExtensionField(const FieldDescriptor* field) { @@ -525,9 +527,10 @@ bool IgnoreOneof(const OneofDescriptor* oneof) { return true; } -string JSIdent(const GeneratorOptions& options, const FieldDescriptor* field, - bool is_upper_camel, bool is_map, bool drop_list) { - string result; +std::string JSIdent(const GeneratorOptions& options, + const FieldDescriptor* field, bool is_upper_camel, + bool is_map, bool drop_list) { + std::string result; if (field->type() == FieldDescriptor::TYPE_GROUP) { result = is_upper_camel ? ToUpperCamel(ParseUpperCamel(field->message_type()->name())) : @@ -547,19 +550,19 @@ string JSIdent(const GeneratorOptions& options, const FieldDescriptor* field, return result; } -string JSObjectFieldName(const GeneratorOptions& options, - const FieldDescriptor* field) { - string name = JSIdent(options, field, - /* is_upper_camel = */ false, - /* is_map = */ false, - /* drop_list = */ false); +std::string JSObjectFieldName(const GeneratorOptions& options, + const FieldDescriptor* field) { + std::string name = JSIdent(options, field, + /* is_upper_camel = */ false, + /* is_map = */ false, + /* drop_list = */ false); if (IsReserved(name)) { name = "pb_" + name; } return name; } -string JSByteGetterSuffix(BytesMode bytes_mode) { +std::string JSByteGetterSuffix(BytesMode bytes_mode) { switch (bytes_mode) { case BYTES_DEFAULT: return ""; @@ -575,15 +578,15 @@ string JSByteGetterSuffix(BytesMode bytes_mode) { // Returns the field name as a capitalized portion of a getter/setter method // name, e.g. MyField for .getMyField(). -string JSGetterName(const GeneratorOptions& options, - const FieldDescriptor* field, - BytesMode bytes_mode = BYTES_DEFAULT, - bool drop_list = false) { - string name = JSIdent(options, field, - /* is_upper_camel = */ true, - /* is_map = */ false, drop_list); +std::string JSGetterName(const GeneratorOptions& options, + const FieldDescriptor* field, + BytesMode bytes_mode = BYTES_DEFAULT, + bool drop_list = false) { + std::string name = JSIdent(options, field, + /* is_upper_camel = */ true, + /* is_map = */ false, drop_list); if (field->type() == FieldDescriptor::TYPE_BYTES) { - string suffix = JSByteGetterSuffix(bytes_mode); + std::string suffix = JSByteGetterSuffix(bytes_mode); if (!suffix.empty()) { name += "_as" + suffix; } @@ -596,14 +599,13 @@ string JSGetterName(const GeneratorOptions& options, } - -string JSOneofName(const OneofDescriptor* oneof) { +std::string JSOneofName(const OneofDescriptor* oneof) { return ToUpperCamel(ParseLowerUnderscore(oneof->name())); } // Returns the index corresponding to this field in the JSPB array (underlying // data storage array). -string JSFieldIndex(const FieldDescriptor* field) { +std::string JSFieldIndex(const FieldDescriptor* field) { // Determine whether this field is a member of a group. Group fields are a bit // wonky: their "containing type" is a message type created just for the // group, and that type's parent type has a field with the group-message type @@ -623,7 +625,7 @@ string JSFieldIndex(const FieldDescriptor* field) { return StrCat(field->number()); } -string JSOneofIndex(const OneofDescriptor* oneof) { +std::string JSOneofIndex(const OneofDescriptor* oneof) { int index = -1; for (int i = 0; i < oneof->containing_type()->oneof_decl_count(); i++) { const OneofDescriptor* o = oneof->containing_type()->oneof_decl(i); @@ -683,7 +685,7 @@ uint16 DecodeUTF8Codepoint(uint8* bytes, size_t* length) { // Returns false if |out| was truncated because |in| contained invalid UTF-8 or // codepoints outside the BMP. // TODO(b/115551870): Support codepoints outside the BMP. -bool EscapeJSString(const string& in, string* out) { +bool EscapeJSString(const std::string& in, std::string* out) { size_t decoded = 0; for (size_t i = 0; i < in.size(); i += decoded) { uint16 codepoint = 0; @@ -731,10 +733,10 @@ bool EscapeJSString(const string& in, string* out) { return true; } -string EscapeBase64(const string& in) { +std::string EscapeBase64(const std::string& in) { static const char* kAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - string result; + std::string result; for (size_t i = 0; i < in.size(); i += 3) { int value = (in[i] << 16) | @@ -760,7 +762,7 @@ string EscapeBase64(const string& in) { // Post-process the result of SimpleFtoa/SimpleDtoa to *exactly* match the // original codegen's formatting (which is just .toString() on java.lang.Double // or java.lang.Float). -string PostProcessFloat(string result) { +std::string PostProcessFloat(std::string result) { // If inf, -inf or nan, replace with +Infinity, -Infinity or NaN. if (result == "inf") { return "Infinity"; @@ -774,13 +776,13 @@ string PostProcessFloat(string result) { // ensure that the mantissa (portion prior to the "e") has at least one // fractional digit (after the decimal point), and (iii) strip any unnecessary // leading zeroes and/or '+' signs from the exponent. - string::size_type exp_pos = result.find('e'); - if (exp_pos != string::npos) { - string mantissa = result.substr(0, exp_pos); - string exponent = result.substr(exp_pos + 1); + std::string::size_type exp_pos = result.find('e'); + if (exp_pos != std::string::npos) { + std::string mantissa = result.substr(0, exp_pos); + std::string exponent = result.substr(exp_pos + 1); // Add ".0" to mantissa if no fractional part exists. - if (mantissa.find('.') == string::npos) { + if (mantissa.find('.') == std::string::npos) { mantissa += ".0"; } @@ -803,20 +805,20 @@ string PostProcessFloat(string result) { // Otherwise, this is an ordinary decimal number. Append ".0" if result has no // decimal/fractional part in order to match output of original codegen. - if (result.find('.') == string::npos) { + if (result.find('.') == std::string::npos) { result += ".0"; } return result; } -string FloatToString(float value) { - string result = SimpleFtoa(value); +std::string FloatToString(float value) { + std::string result = SimpleFtoa(value); return PostProcessFloat(result); } -string DoubleToString(double value) { - string result = SimpleDtoa(value); +std::string DoubleToString(double value) { + std::string result = SimpleDtoa(value); return PostProcessFloat(result); } @@ -834,11 +836,12 @@ bool IsIntegralFieldWithStringJSType(const FieldDescriptor* field) { } } -string MaybeNumberString(const FieldDescriptor* field, const string& orig) { +std::string MaybeNumberString(const FieldDescriptor* field, + const std::string& orig) { return IsIntegralFieldWithStringJSType(field) ? ("\"" + orig + "\"") : orig; } -string JSFieldDefault(const FieldDescriptor* field) { +std::string JSFieldDefault(const FieldDescriptor* field) { if (field->is_repeated()) { return "[]"; } @@ -872,7 +875,7 @@ string JSFieldDefault(const FieldDescriptor* field) { return DoubleToString(field->default_value_double()); case FieldDescriptor::CPPTYPE_STRING: if (field->type() == FieldDescriptor::TYPE_STRING) { - string out; + std::string out; bool is_valid = EscapeJSString(field->default_value_string(), &out); if (!is_valid) { // TODO(b/115551870): Decide whether this should be a hard error. @@ -891,8 +894,8 @@ string JSFieldDefault(const FieldDescriptor* field) { return ""; } -string ProtoTypeName(const GeneratorOptions& options, - const FieldDescriptor* field) { +std::string ProtoTypeName(const GeneratorOptions& options, + const FieldDescriptor* field) { switch (field->type()) { case FieldDescriptor::TYPE_BOOL: return "bool"; @@ -935,13 +938,13 @@ string ProtoTypeName(const GeneratorOptions& options, } } -string JSIntegerTypeName(const FieldDescriptor* field) { +std::string JSIntegerTypeName(const FieldDescriptor* field) { return IsIntegralFieldWithStringJSType(field) ? "string" : "number"; } -string JSStringTypeName(const GeneratorOptions& options, - const FieldDescriptor* field, - BytesMode bytes_mode) { +std::string JSStringTypeName(const GeneratorOptions& options, + const FieldDescriptor* field, + BytesMode bytes_mode) { if (field->type() == FieldDescriptor::TYPE_BYTES) { switch (bytes_mode) { case BYTES_DEFAULT: @@ -957,9 +960,8 @@ string JSStringTypeName(const GeneratorOptions& options, return "string"; } -string JSTypeName(const GeneratorOptions& options, - const FieldDescriptor* field, - BytesMode bytes_mode) { +std::string JSTypeName(const GeneratorOptions& options, + const FieldDescriptor* field, BytesMode bytes_mode) { switch (field->cpp_type()) { case FieldDescriptor::CPPTYPE_BOOL: return "boolean"; @@ -993,8 +995,8 @@ bool UseBrokenPresenceSemantics(const GeneratorOptions& options, } // Returns true for fields that return "null" from accessors when they are -// unset. This should normally only be true for non-repeated submessages, but -// we have legacy users who relied on old behavior where accessors behaved this +// unset. This should normally only be true for non-repeated submessages, but we +// have legacy users who relied on old behavior where accessors behaved this // way. bool ReturnsNullWhenUnset(const GeneratorOptions& options, const FieldDescriptor* field) { @@ -1053,19 +1055,18 @@ bool SetterAcceptsNull(const GeneratorOptions& options, // Returns types which are known to by non-nullable by default. // The style guide requires that we omit "!" in this case. -bool IsPrimitive(const string& type) { +bool IsPrimitive(const std::string& type) { return type == "undefined" || type == "string" || type == "number" || type == "boolean"; } -string JSFieldTypeAnnotation(const GeneratorOptions& options, - const FieldDescriptor* field, - bool is_setter_argument, - bool force_present, - bool singular_if_not_packed, - BytesMode bytes_mode = BYTES_DEFAULT, - bool force_singular = false) { - string jstype = JSTypeName(options, field, bytes_mode); +std::string JSFieldTypeAnnotation(const GeneratorOptions& options, + const FieldDescriptor* field, + bool is_setter_argument, bool force_present, + bool singular_if_not_packed, + BytesMode bytes_mode = BYTES_DEFAULT, + bool force_singular = false) { + std::string jstype = JSTypeName(options, field, bytes_mode); if (!force_singular && field->is_repeated() && (field->is_packed() || !singular_if_not_packed)) { @@ -1108,17 +1109,17 @@ string JSFieldTypeAnnotation(const GeneratorOptions& options, return jstype; } -string JSBinaryReaderMethodType(const FieldDescriptor* field) { - string name = field->type_name(); +std::string JSBinaryReaderMethodType(const FieldDescriptor* field) { + std::string name = field->type_name(); if (name[0] >= 'a' && name[0] <= 'z') { name[0] = (name[0] - 'a') + 'A'; } return IsIntegralFieldWithStringJSType(field) ? (name + "String") : name; } -string JSBinaryReadWriteMethodName(const FieldDescriptor* field, - bool is_writer) { - string name = JSBinaryReaderMethodType(field); +std::string JSBinaryReadWriteMethodName(const FieldDescriptor* field, + bool is_writer) { + std::string name = JSBinaryReaderMethodType(field); if (field->is_packed()) { name = "Packed" + name; } else if (is_writer && field->is_repeated()) { @@ -1127,14 +1128,14 @@ string JSBinaryReadWriteMethodName(const FieldDescriptor* field, return name; } -string JSBinaryReaderMethodName(const GeneratorOptions& options, - const FieldDescriptor* field) { +std::string JSBinaryReaderMethodName(const GeneratorOptions& options, + const FieldDescriptor* field) { return "jspb.BinaryReader.prototype.read" + JSBinaryReadWriteMethodName(field, /* is_writer = */ false); } -string JSBinaryWriterMethodName(const GeneratorOptions& options, - const FieldDescriptor* field) { +std::string JSBinaryWriterMethodName(const GeneratorOptions& options, + const FieldDescriptor* field) { if (field->containing_type() && field->containing_type()->options().message_set_wire_format()) { return "jspb.BinaryWriter.prototype.writeMessageSet"; @@ -1143,11 +1144,11 @@ string JSBinaryWriterMethodName(const GeneratorOptions& options, JSBinaryReadWriteMethodName(field, /* is_writer = */ true); } -string JSReturnClause(const FieldDescriptor* desc) { +std::string JSReturnClause(const FieldDescriptor* desc) { return ""; } -string JSTypeTag(const FieldDescriptor* desc) { +std::string JSTypeTag(const FieldDescriptor* desc) { switch (desc->type()) { case FieldDescriptor::TYPE_DOUBLE: case FieldDescriptor::TYPE_FLOAT: @@ -1181,8 +1182,8 @@ string JSTypeTag(const FieldDescriptor* desc) { return ""; } -string JSReturnDoc(const GeneratorOptions& options, - const FieldDescriptor* desc) { +std::string JSReturnDoc(const GeneratorOptions& options, + const FieldDescriptor* desc) { return ""; } @@ -1198,8 +1199,8 @@ bool HasRepeatedFields(const GeneratorOptions& options, static const char* kRepeatedFieldArrayName = ".repeatedFields_"; -string RepeatedFieldsArrayName(const GeneratorOptions& options, - const Descriptor* desc) { +std::string RepeatedFieldsArrayName(const GeneratorOptions& options, + const Descriptor* desc) { return HasRepeatedFields(options, desc) ? (GetMessagePath(options, desc) + kRepeatedFieldArrayName) : "null"; @@ -1216,16 +1217,16 @@ bool HasOneofFields(const Descriptor* desc) { static const char* kOneofGroupArrayName = ".oneofGroups_"; -string OneofFieldsArrayName(const GeneratorOptions& options, - const Descriptor* desc) { +std::string OneofFieldsArrayName(const GeneratorOptions& options, + const Descriptor* desc) { return HasOneofFields(desc) ? (GetMessagePath(options, desc) + kOneofGroupArrayName) : "null"; } -string RepeatedFieldNumberList(const GeneratorOptions& options, - const Descriptor* desc) { - std::vector numbers; +std::string RepeatedFieldNumberList(const GeneratorOptions& options, + const Descriptor* desc) { + std::vector numbers; for (int i = 0; i < desc->field_count(); i++) { if (desc->field(i)->is_repeated() && !desc->field(i)->is_map()) { numbers.push_back(JSFieldIndex(desc->field(i))); @@ -1234,16 +1235,16 @@ string RepeatedFieldNumberList(const GeneratorOptions& options, return "[" + Join(numbers, ",") + "]"; } -string OneofGroupList(const Descriptor* desc) { +std::string OneofGroupList(const Descriptor* desc) { // List of arrays (one per oneof), each of which is a list of field indices - std::vector oneof_entries; + std::vector oneof_entries; for (int i = 0; i < desc->oneof_decl_count(); i++) { const OneofDescriptor* oneof = desc->oneof_decl(i); if (IgnoreOneof(oneof)) { continue; } - std::vector oneof_fields; + std::vector oneof_fields; for (int j = 0; j < oneof->field_count(); j++) { if (IgnoreField(oneof->field(j))) { continue; @@ -1255,21 +1256,22 @@ string OneofGroupList(const Descriptor* desc) { return "[" + Join(oneof_entries, ",") + "]"; } -string JSOneofArray(const GeneratorOptions& options, - const FieldDescriptor* field) { +std::string JSOneofArray(const GeneratorOptions& options, + const FieldDescriptor* field) { return OneofFieldsArrayName(options, field->containing_type()) + "[" + JSOneofIndex(field->containing_oneof()) + "]"; } -string RelativeTypeName(const FieldDescriptor* field) { +std::string RelativeTypeName(const FieldDescriptor* field) { assert(field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM || field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE); // For a field with an enum or message type, compute a name relative to the // path name of the message type containing this field. - string package = field->file()->package(); - string containing_type = field->containing_type()->full_name() + "."; - string type = (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) ? - field->enum_type()->full_name() : field->message_type()->full_name(); + std::string package = field->file()->package(); + std::string containing_type = field->containing_type()->full_name() + "."; + std::string type = (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) + ? field->enum_type()->full_name() + : field->message_type()->full_name(); // |prefix| is advanced as we find separators '.' past the common package // prefix that yield common prefixes in the containing type's name and this @@ -1287,9 +1289,9 @@ string RelativeTypeName(const FieldDescriptor* field) { return type.substr(prefix); } -string JSExtensionsObjectName(const GeneratorOptions& options, - const FileDescriptor* from_file, - const Descriptor* desc) { +std::string JSExtensionsObjectName(const GeneratorOptions& options, + const FileDescriptor* from_file, + const Descriptor* desc) { if (desc->full_name() == "google.protobuf.bridge.MessageSet") { // TODO(haberman): fix this for the kImportCommonJs case. return "jspb.Message.messageSetExtensions"; @@ -1311,13 +1313,13 @@ const FieldDescriptor* MapFieldValue(const FieldDescriptor* field) { return field->message_type()->FindFieldByNumber(kMapValueField); } -string FieldDefinition(const GeneratorOptions& options, - const FieldDescriptor* field) { +std::string FieldDefinition(const GeneratorOptions& options, + const FieldDescriptor* field) { if (field->is_map()) { const FieldDescriptor* key_field = MapFieldKey(field); const FieldDescriptor* value_field = MapFieldValue(field); - string key_type = ProtoTypeName(options, key_field); - string value_type; + std::string key_type = ProtoTypeName(options, key_field); + std::string value_type; if (value_field->type() == FieldDescriptor::TYPE_ENUM || value_field->type() == FieldDescriptor::TYPE_MESSAGE) { value_type = RelativeTypeName(value_field); @@ -1330,9 +1332,10 @@ string FieldDefinition(const GeneratorOptions& options, field->name().c_str(), field->number()); } else { - string qualifier = field->is_repeated() ? "repeated" : - (field->is_optional() ? "optional" : "required"); - string type, name; + std::string qualifier = + field->is_repeated() ? "repeated" + : (field->is_optional() ? "optional" : "required"); + std::string type, name; if (field->type() == FieldDescriptor::TYPE_ENUM || field->type() == FieldDescriptor::TYPE_MESSAGE) { type = RelativeTypeName(field); @@ -1352,15 +1355,8 @@ string FieldDefinition(const GeneratorOptions& options, } } -string FieldComments(const FieldDescriptor* field, BytesMode bytes_mode) { - string comments; - if (field->cpp_type() == FieldDescriptor::CPPTYPE_BOOL) { - comments += - " * Note that Boolean fields may be set to 0/1 when serialized from " - "a Java server.\n" - " * You should avoid comparisons like {@code val === true/false} in " - "those cases.\n"; - } +std::string FieldComments(const FieldDescriptor* field, BytesMode bytes_mode) { + std::string comments; if (field->type() == FieldDescriptor::TYPE_BYTES && bytes_mode == BYTES_U8) { comments += " * Note that Uint8Array is not supported on all browsers.\n" @@ -1432,7 +1428,7 @@ bool IsExtendable(const Descriptor* desc) { // Returns the max index in the underlying data storage array beyond which the // extension object is used. -string GetPivot(const Descriptor* desc) { +std::string GetPivot(const Descriptor* desc) { static const int kDefaultPivot = 500; // Find the max field number @@ -1491,9 +1487,8 @@ class FileDeduplicator { // contains extra information) // desc: The Descriptor or SCC pointer or EnumDescriptor. // error: The returned error information. - bool AddFile( - const std::pair filenames, - const void* desc, string* error) { + bool AddFile(const std::pair filenames, + const void* desc, std::string* error) { if (descs_by_shortname_.find(filenames.first) != descs_by_shortname_.end()) { if (error_on_conflict_) { @@ -1513,18 +1508,18 @@ class FileDeduplicator { return true; } - void GetAllowedMap(std::map* allowed_set) { + void GetAllowedMap(std::map* allowed_set) { *allowed_set = allowed_descs_actual_name_; } private: bool error_on_conflict_; // The map that restores all the descs that are using short name as filename. - std::map descs_by_shortname_; + std::map descs_by_shortname_; // The final actual filename map. - std::map allowed_descs_actual_name_; + std::map allowed_descs_actual_name_; // The full name map. - std::map allowed_descs_full_name_; + std::map allowed_descs_full_name_; }; void DepthFirstSearch(const FileDescriptor* file, @@ -1611,9 +1606,9 @@ struct DepsGenerator { bool GenerateJspbAllowedMap(const GeneratorOptions& options, const std::vector& files, - std::map* allowed_set, + std::map* allowed_set, SCCAnalyzer* analyzer, - string* error) { + std::string* error) { std::vector files_ordered; GenerateJspbFileOrder(files, &files_ordered); @@ -1674,9 +1669,9 @@ bool GenerateJspbAllowedMap(const GeneratorOptions& options, void EmbedCodeAnnotations(const GeneratedCodeInfo& annotations, io::Printer* printer) { // Serialize annotations proto into base64 string. - string meta_content; + std::string meta_content; annotations.SerializeToString(&meta_content); - string meta_64; + std::string meta_64; Base64Escape(meta_content, &meta_64); // Print base64 encoded annotations at the end of output file in @@ -1709,7 +1704,7 @@ void Generator::GenerateHeader(const GeneratorOptions& options, void Generator::FindProvidesForFile(const GeneratorOptions& options, io::Printer* printer, const FileDescriptor* file, - std::set* provided) const { + std::set* provided) const { for (int i = 0; i < file->message_type_count(); i++) { FindProvidesForMessage(options, printer, file->message_type(i), provided); } @@ -1721,7 +1716,7 @@ void Generator::FindProvidesForFile(const GeneratorOptions& options, void Generator::FindProvides(const GeneratorOptions& options, io::Printer* printer, const std::vector& files, - std::set* provided) const { + std::set* provided) const { for (int i = 0; i < files.size(); i++) { FindProvidesForFile(options, printer, files[i], provided); } @@ -1729,16 +1724,15 @@ void Generator::FindProvides(const GeneratorOptions& options, printer->Print("\n"); } -void Generator::FindProvidesForMessage( - const GeneratorOptions& options, - io::Printer* printer, - const Descriptor* desc, - std::set* provided) const { +void Generator::FindProvidesForMessage(const GeneratorOptions& options, + io::Printer* printer, + const Descriptor* desc, + std::set* provided) const { if (IgnoreMessage(desc)) { return; } - string name = GetMessagePath(options, desc); + std::string name = GetMessagePath(options, desc); provided->insert(name); for (int i = 0; i < desc->enum_type_count(); i++) { @@ -1754,16 +1748,15 @@ void Generator::FindProvidesForMessage( void Generator::FindProvidesForEnum(const GeneratorOptions& options, io::Printer* printer, const EnumDescriptor* enumdesc, - std::set* provided) const { - string name = GetEnumPath(options, enumdesc); + std::set* provided) const { + std::string name = GetEnumPath(options, enumdesc); provided->insert(name); } void Generator::FindProvidesForFields( - const GeneratorOptions& options, - io::Printer* printer, + const GeneratorOptions& options, io::Printer* printer, const std::vector& fields, - std::set* provided) const { + std::set* provided) const { for (int i = 0; i < fields.size(); i++) { const FieldDescriptor* field = fields[i]; @@ -1771,16 +1764,16 @@ void Generator::FindProvidesForFields( continue; } - string name = GetNamespace(options, field->file()) + "." + - JSObjectFieldName(options, field); + std::string name = GetNamespace(options, field->file()) + "." + + JSObjectFieldName(options, field); provided->insert(name); } } void Generator::GenerateProvides(const GeneratorOptions& options, io::Printer* printer, - std::set* provided) const { - for (std::set::iterator it = provided->begin(); + std::set* provided) const { + for (std::set::iterator it = provided->begin(); it != provided->end(); ++it) { if (options.import_style == GeneratorOptions::kImportClosure) { printer->Print("goog.provide('$name$');\n", "name", *it); @@ -1795,7 +1788,7 @@ void Generator::GenerateProvides(const GeneratorOptions& options, // Do not use global scope in strict mode if (options.import_style == GeneratorOptions::kImportCommonJsStrict) { - string namespaceObject = *it; + std::string namespaceObject = *it; // Remove "proto." from the namespace object GOOGLE_CHECK_EQ(0, namespaceObject.compare(0, 6, "proto.")); namespaceObject.erase(0, 6); @@ -1811,9 +1804,9 @@ void Generator::GenerateProvides(const GeneratorOptions& options, void Generator::GenerateRequiresForSCC(const GeneratorOptions& options, io::Printer* printer, const SCC* scc, - std::set* provided) const { - std::set required; - std::set forwards; + std::set* provided) const { + std::set required; + std::set forwards; bool have_message = false; bool has_extension = false; bool has_map = false; @@ -1835,11 +1828,11 @@ void Generator::GenerateRequiresForSCC(const GeneratorOptions& options, void Generator::GenerateRequiresForLibrary( const GeneratorOptions& options, io::Printer* printer, const std::vector& files, - std::set* provided) const { + std::set* provided) const { GOOGLE_CHECK_EQ(options.import_style, GeneratorOptions::kImportClosure); // For Closure imports we need to import every message type individually. - std::set required; - std::set forwards; + std::set required; + std::set forwards; bool have_extensions = false; bool have_map = false; bool have_message = false; @@ -1884,9 +1877,9 @@ void Generator::GenerateRequiresForLibrary( void Generator::GenerateRequiresForExtensions( const GeneratorOptions& options, io::Printer* printer, const std::vector& fields, - std::set* provided) const { - std::set required; - std::set forwards; + std::set* provided) const { + std::set required; + std::set forwards; for (int i = 0; i < fields.size(); i++) { const FieldDescriptor* field = fields[i]; if (IgnoreField(field)) { @@ -1903,9 +1896,9 @@ void Generator::GenerateRequiresForExtensions( void Generator::GenerateRequiresImpl(const GeneratorOptions& options, io::Printer* printer, - std::set* required, - std::set* forwards, - std::set* provided, + std::set* required, + std::set* forwards, + std::set* provided, bool require_jspb, bool require_extension, bool require_map) const { if (require_jspb) { @@ -1921,7 +1914,7 @@ void Generator::GenerateRequiresImpl(const GeneratorOptions& options, required->insert("jspb.Map"); } - std::set::iterator it; + std::set::iterator it; for (it = required->begin(); it != required->end(); ++it) { if (provided->find(*it) != provided->end()) { continue; @@ -1945,13 +1938,11 @@ bool NamespaceOnly(const Descriptor* desc) { return false; } -void Generator::FindRequiresForMessage( - const GeneratorOptions& options, - const Descriptor* desc, - std::set* required, - std::set* forwards, - bool* have_message) const { - +void Generator::FindRequiresForMessage(const GeneratorOptions& options, + const Descriptor* desc, + std::set* required, + std::set* forwards, + bool* have_message) const { if (!NamespaceOnly(desc)) { *have_message = true; @@ -1980,8 +1971,8 @@ void Generator::FindRequiresForMessage( void Generator::FindRequiresForField(const GeneratorOptions& options, const FieldDescriptor* field, - std::set* required, - std::set* forwards) const { + std::set* required, + std::set* forwards) const { if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM && // N.B.: file-level extensions with enum type do *not* create // dependencies, as per original codegen. @@ -1998,14 +1989,13 @@ void Generator::FindRequiresForField(const GeneratorOptions& options, } } -void Generator::FindRequiresForExtension(const GeneratorOptions& options, - const FieldDescriptor* field, - std::set* required, - std::set* forwards) const { - if (field->containing_type()->full_name() != "google.protobuf.bridge.MessageSet") { - required->insert(GetMessagePath(options, field->containing_type())); - } - FindRequiresForField(options, field, required, forwards); +void Generator::FindRequiresForExtension( + const GeneratorOptions& options, const FieldDescriptor* field, + std::set* required, std::set* forwards) const { + if (field->containing_type()->full_name() != "google.protobuf.bridge.MessageSet") { + required->insert(GetMessagePath(options, field->containing_type())); + } + FindRequiresForField(options, field, required, forwards); } void Generator::GenerateTestOnly(const GeneratorOptions& options, @@ -2096,7 +2086,7 @@ void Generator::GenerateClassConstructor(const GeneratorOptions& options, "classprefix", GetMessagePathPrefix(options, desc), "classname", desc->name()); printer->Annotate("classname", desc); - string message_id = GetMessageId(desc); + std::string message_id = GetMessageId(desc); printer->Print( " jspb.Message.initialize(this, opt_data, $messageId$, $pivot$, " "$rptfields$, $oneoffields$);\n", @@ -2328,45 +2318,51 @@ void Generator::GenerateFieldValueExpression(io::Printer* printer, const char *obj_reference, const FieldDescriptor* field, bool use_default) const { - bool is_float_or_double = + const bool is_float_or_double = field->cpp_type() == FieldDescriptor::CPPTYPE_FLOAT || field->cpp_type() == FieldDescriptor::CPPTYPE_DOUBLE; - if (use_default) { - if (is_float_or_double) { - // Coerce "Nan" and "Infinity" to actual float values. - // - // This will change null to 0, but that doesn't matter since we're getting - // with a default. - printer->Print("+"); - } - + const bool is_boolean = field->cpp_type() == FieldDescriptor::CPPTYPE_BOOL; + + const string with_default = use_default ? "WithDefault" : ""; + const string default_arg = + use_default ? StrCat(", ", JSFieldDefault(field)) : ""; + const string cardinality = field->is_repeated() ? "Repeated" : ""; + string type = ""; + if (is_float_or_double) { + type = "FloatingPoint"; + } + if (is_boolean) { + type = "Boolean"; + } + + // Prints the appropriate function, among: + // - getField + // - getBooleanField + // - getFloatingPointField => Replaced by getOptionalFloatingPointField to + // preserve backward compatibility. + // - getFieldWithDefault + // - getBooleanFieldWithDefault + // - getFloatingPointFieldWithDefault + // - getRepeatedField + // - getRepeatedBooleanField + // - getRepeatedFloatingPointField + if (is_float_or_double && !field->is_repeated() && !use_default) { printer->Print( - "jspb.Message.getFieldWithDefault($obj$, $index$, $default$)", - "obj", obj_reference, - "index", JSFieldIndex(field), - "default", JSFieldDefault(field)); + "jspb.Message.getOptionalFloatingPointField($obj$, " + "$index$$default$)", + "obj", obj_reference, + "index", JSFieldIndex(field), + "default", default_arg); } else { - if (is_float_or_double) { - if (field->is_required()) { - // Use "+" to convert all fields to numeric (including null). - printer->Print( - "+jspb.Message.getField($obj$, $index$)", - "index", JSFieldIndex(field), - "obj", obj_reference); - } else { - // Converts "NaN" and "Infinity" while preserving null. - printer->Print( - "jspb.Message.get$cardinality$FloatingPointField($obj$, $index$)", - "cardinality", field->is_repeated() ? "Repeated" : "Optional", - "index", JSFieldIndex(field), - "obj", obj_reference); - } - } else { - printer->Print("jspb.Message.get$cardinality$Field($obj$, $index$)", - "cardinality", field->is_repeated() ? "Repeated" : "", - "index", JSFieldIndex(field), - "obj", obj_reference); - } + printer->Print( + "jspb.Message.get$cardinality$$type$Field$with_default$($obj$, " + "$index$$default$)", + "cardinality", cardinality, + "type", type, + "with_default", with_default, + "obj", obj_reference, + "index", JSFieldIndex(field), + "default", default_arg); } } @@ -2380,7 +2376,7 @@ void Generator::GenerateClassFieldToObject(const GeneratorOptions& options, const FieldDescriptor* value_field = MapFieldValue(field); // If the map values are of a message type, we must provide their static // toObject() method; otherwise we pass undefined for that argument. - string value_to_object; + std::string value_to_object; if (value_field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { value_to_object = GetMessagePath(options, value_field->message_type()) + ".toObject"; @@ -2441,7 +2437,7 @@ void Generator::GenerateObjectTypedef(const GeneratorOptions& options, const Descriptor* desc) const { // TODO(b/122687752): Consider renaming nested messages called ObjectFormat // to prevent collisions. - const string type_name = GetMessagePath(options, desc) + ".ObjectFormat"; + const std::string type_name = GetMessagePath(options, desc) + ".ObjectFormat"; printer->Print( "/**\n" @@ -2580,11 +2576,11 @@ void GenerateBytesWrapper(const GeneratorOptions& options, io::Printer* printer, const FieldDescriptor* field, BytesMode bytes_mode) { - string type = JSFieldTypeAnnotation( - options, field, - /* is_setter_argument = */ false, - /* force_present = */ false, - /* singular_if_not_packed = */ false, bytes_mode); + std::string type = + JSFieldTypeAnnotation(options, field, + /* is_setter_argument = */ false, + /* force_present = */ false, + /* singular_if_not_packed = */ false, bytes_mode); printer->Print( "/**\n" " * $fielddef$\n" @@ -2615,18 +2611,16 @@ void Generator::GenerateClassField(const GeneratorOptions& options, const FieldDescriptor* key_field = MapFieldKey(field); const FieldDescriptor* value_field = MapFieldValue(field); // Map field: special handling to instantiate the map object on demand. - string key_type = - JSFieldTypeAnnotation( - options, key_field, - /* is_setter_argument = */ false, - /* force_present = */ true, - /* singular_if_not_packed = */ false); - string value_type = - JSFieldTypeAnnotation( - options, value_field, - /* is_setter_argument = */ false, - /* force_present = */ true, - /* singular_if_not_packed = */ false); + std::string key_type = + JSFieldTypeAnnotation(options, key_field, + /* is_setter_argument = */ false, + /* force_present = */ true, + /* singular_if_not_packed = */ false); + std::string value_type = + JSFieldTypeAnnotation(options, value_field, + /* is_setter_argument = */ false, + /* force_present = */ true, + /* singular_if_not_packed = */ false); printer->Print( "/**\n" @@ -2745,12 +2739,12 @@ void Generator::GenerateClassField(const GeneratorOptions& options, BytesMode bytes_mode = field->type() == FieldDescriptor::TYPE_BYTES && !options.binary ? BYTES_B64 : BYTES_DEFAULT; - string typed_annotation = JSFieldTypeAnnotation( - options, field, - /* is_setter_argument = */ false, - /* force_present = */ false, - /* singular_if_not_packed = */ false, - /* bytes_mode = */ bytes_mode); + std::string typed_annotation = + JSFieldTypeAnnotation(options, field, + /* is_setter_argument = */ false, + /* force_present = */ false, + /* singular_if_not_packed = */ false, + /* bytes_mode = */ bytes_mode); if (untyped) { printer->Print( "/**\n" @@ -3292,12 +3286,12 @@ void Generator::GenerateClassSerializeBinaryField( const FieldDescriptor* field) const { if (HasFieldPresence(options, field) && field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) { - string typed_annotation = JSFieldTypeAnnotation( - options, field, - /* is_setter_argument = */ false, - /* force_present = */ false, - /* singular_if_not_packed = */ false, - /* bytes_mode = */ BYTES_DEFAULT); + std::string typed_annotation = + JSFieldTypeAnnotation(options, field, + /* is_setter_argument = */ false, + /* force_present = */ false, + /* singular_if_not_packed = */ false, + /* bytes_mode = */ BYTES_DEFAULT); printer->Print( " f = /** @type {$type$} */ " "(jspb.Message.getField(message, $index$));\n", @@ -3438,12 +3432,12 @@ void Generator::GenerateEnum(const GeneratorOptions& options, void Generator::GenerateExtension(const GeneratorOptions& options, io::Printer* printer, const FieldDescriptor* field) const { - string extension_scope = + std::string extension_scope = (field->extension_scope() ? GetMessagePath(options, field->extension_scope()) : GetNamespace(options, field->file())); - const string extension_object_name = JSObjectFieldName(options, field); + const std::string extension_object_name = JSObjectFieldName(options, field); printer->Print( "\n" "/**\n" @@ -3473,11 +3467,11 @@ void Generator::GenerateExtension(const GeneratorOptions& options, "ctor", (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE ? SubmessageTypeRef(options, field) - : string("null")), + : std::string("null")), "toObject", (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE ? (SubmessageTypeRef(options, field) + ".toObject") - : string("null")), + : std::string("null")), "repeated", (field->is_repeated() ? "1" : "0")); printer->Print( @@ -3517,8 +3511,8 @@ void Generator::GenerateExtension(const GeneratorOptions& options, } bool GeneratorOptions::ParseFromOptions( - const std::vector< std::pair< string, string > >& options, - string* error) { + const std::vector >& options, + std::string* error) { for (int i = 0; i < options.size(); i++) { if (options[i].first == "add_require_for_enums") { if (options[i].second != "") { @@ -3664,10 +3658,11 @@ bool Generator::GenerateFile(const FileDescriptor* file, const GeneratorOptions &options, GeneratorContext* context, bool use_short_name) const { - string filename = - options.output_dir + "/" + GetJSFilename(options, - use_short_name ? file->name().substr(file->name().rfind('/')) - : file->name()); + std::string filename = + options.output_dir + "/" + + GetJSFilename(options, use_short_name + ? file->name().substr(file->name().rfind('/')) + : file->name()); std::unique_ptr output(context->Open(filename)); GOOGLE_CHECK(output); GeneratedCodeInfo annotations; @@ -3710,7 +3705,7 @@ void Generator::GenerateFile(const GeneratorOptions& options, } for (int i = 0; i < file->dependency_count(); i++) { - const string& name = file->dependency(i)->name(); + const std::string& name = file->dependency(i)->name(); printer->Print( "var $alias$ = require('$file$');\n" "goog.object.extend(proto, $alias$);\n", @@ -3719,7 +3714,7 @@ void Generator::GenerateFile(const GeneratorOptions& options, } } - std::set provided; + std::set provided; std::set extensions; for (int i = 0; i < file->extension_count(); i++) { // We honor the jspb::ignore option here only when working with @@ -3763,7 +3758,7 @@ void Generator::GenerateFile(const GeneratorOptions& options, // Emit well-known type methods. for (FileToc* toc = well_known_types_js; toc->name != NULL; toc++) { - string name = string("google/protobuf/") + toc->name; + std::string name = std::string("google/protobuf/") + toc->name; if (name == StripProto(file->name()) + ".js") { printer->Print(toc->data); } @@ -3771,10 +3766,10 @@ void Generator::GenerateFile(const GeneratorOptions& options, } bool Generator::GenerateAll(const std::vector& files, - const string& parameter, + const std::string& parameter, GeneratorContext* context, - string* error) const { - std::vector< std::pair< string, string > > option_pairs; + std::string* error) const { + std::vector > option_pairs; ParseGeneratorParameter(parameter, &option_pairs); GeneratorOptions options; if (!options.ParseFromOptions(option_pairs, error)) { @@ -3784,8 +3779,8 @@ bool Generator::GenerateAll(const std::vector& files, if (options.output_mode() == GeneratorOptions::kEverythingInOneFile) { // All output should go in a single file. - string filename = options.output_dir + "/" + options.library + - options.GetFileNameExtension(); + std::string filename = options.output_dir + "/" + options.library + + options.GetFileNameExtension(); std::unique_ptr output(context->Open(filename)); GOOGLE_CHECK(output.get()); io::Printer printer(output.get(), '$'); @@ -3802,7 +3797,7 @@ bool Generator::GenerateAll(const std::vector& files, GenerateHeader(options, &printer); - std::set provided; + std::set provided; FindProvides(options, &printer, files, &provided); FindProvidesForFields(options, &printer, extensions, &provided); GenerateProvides(options, &printer, &provided); @@ -3823,7 +3818,7 @@ bool Generator::GenerateAll(const std::vector& files, } else if (options.output_mode() == GeneratorOptions::kOneOutputFilePerSCC) { std::set have_printed; SCCAnalyzer analyzer; - std::map allowed_map; + std::map allowed_map; if (!GenerateJspbAllowedMap( options, files, &allowed_map, &analyzer, error)) { return false; @@ -3849,7 +3844,7 @@ bool Generator::GenerateAll(const std::vector& files, generated = true; const SCC* scc = analyzer.GetSCC(desc); - const string& filename = allowed_map[scc]; + const std::string& filename = allowed_map[scc]; std::unique_ptr output( context->Open(filename)); GOOGLE_CHECK(output.get()); @@ -3857,7 +3852,7 @@ bool Generator::GenerateAll(const std::vector& files, GenerateHeader(options, &printer); - std::set provided; + std::set provided; for (auto one_desc : scc->descriptors) { if (one_desc->containing_type() == nullptr) { FindProvidesForMessage(options, &printer, one_desc, &provided); @@ -3894,7 +3889,7 @@ bool Generator::GenerateAll(const std::vector& files, } generated = true; - const string& filename = allowed_map[enumdesc]; + const std::string& filename = allowed_map[enumdesc]; std::unique_ptr output( context->Open(filename)); GOOGLE_CHECK(output.get()); @@ -3902,7 +3897,7 @@ bool Generator::GenerateAll(const std::vector& files, GenerateHeader(options, &printer); - std::set provided; + std::set provided; FindProvidesForEnum(options, &printer, enumdesc, &provided); GenerateProvides(options, &printer, &provided); GenerateTestOnly(options, &printer); @@ -3917,7 +3912,7 @@ bool Generator::GenerateAll(const std::vector& files, // the enclosing message). if (allowed_map.count(file) == 1) { generated = true; - const string& filename = allowed_map[file]; + const std::string& filename = allowed_map[file]; std::unique_ptr output( context->Open(filename)); @@ -3926,7 +3921,7 @@ bool Generator::GenerateAll(const std::vector& files, GenerateHeader(options, &printer); - std::set provided; + std::set provided; std::vector fields; for (int j = 0; j < files[i]->extension_count(); j++) { @@ -3948,8 +3943,9 @@ bool Generator::GenerateAll(const std::vector& files, } } if (!generated) { - string filename = options.output_dir + "/" + - "empty_no_content_void_file" + options.GetFileNameExtension(); + std::string filename = options.output_dir + "/" + + "empty_no_content_void_file" + + options.GetFileNameExtension(); std::unique_ptr output( context->Open(filename)); } diff --git a/src/google/protobuf/compiler/js/js_generator.h b/src/google/protobuf/compiler/js/js_generator.h index 5af9b9f214..e99622fde2 100644 --- a/src/google/protobuf/compiler/js/js_generator.h +++ b/src/google/protobuf/compiler/js/js_generator.h @@ -87,7 +87,7 @@ struct GeneratorOptions { annotate_code(false) {} bool ParseFromOptions( - const std::vector< std::pair< std::string, std::string > >& options, + const std::vector >& options, std::string* error); // Returns the file name extension to use for generated code. @@ -138,8 +138,7 @@ class PROTOC_EXPORT Generator : public CodeGenerator { virtual ~Generator() {} virtual bool Generate(const FileDescriptor* file, - const std::string& parameter, - GeneratorContext* context, + const std::string& parameter, GeneratorContext* context, std::string* error) const { *error = "Unimplemented Generate() method. Call GenerateAll() instead."; return false; @@ -149,29 +148,24 @@ class PROTOC_EXPORT Generator : public CodeGenerator { virtual bool GenerateAll(const std::vector& files, const std::string& parameter, - GeneratorContext* context, - std::string* error) const; + GeneratorContext* context, std::string* error) const; private: void GenerateHeader(const GeneratorOptions& options, io::Printer* printer) const; // Generate goog.provides() calls. - void FindProvides(const GeneratorOptions& options, - io::Printer* printer, + void FindProvides(const GeneratorOptions& options, io::Printer* printer, const std::vector& file, std::set* provided) const; void FindProvidesForFile(const GeneratorOptions& options, - io::Printer* printer, - const FileDescriptor* file, + io::Printer* printer, const FileDescriptor* file, std::set* provided) const; void FindProvidesForMessage(const GeneratorOptions& options, - io::Printer* printer, - const Descriptor* desc, + io::Printer* printer, const Descriptor* desc, std::set* provided) const; void FindProvidesForEnum(const GeneratorOptions& options, - io::Printer* printer, - const EnumDescriptor* enumdesc, + io::Printer* printer, const EnumDescriptor* enumdesc, std::set* provided) const; // For extension fields at file scope. void FindProvidesForFields(const GeneratorOptions& options, @@ -179,8 +173,7 @@ class PROTOC_EXPORT Generator : public CodeGenerator { const std::vector& fields, std::set* provided) const; // Print the goog.provides() found by the methods above. - void GenerateProvides(const GeneratorOptions& options, - io::Printer* printer, + void GenerateProvides(const GeneratorOptions& options, io::Printer* printer, std::set* provided) const; // Generate goog.setTestOnly() if indicated. @@ -193,8 +186,7 @@ class PROTOC_EXPORT Generator : public CodeGenerator { const std::vector& files, std::set* provided) const; void GenerateRequiresForSCC(const GeneratorOptions& options, - io::Printer* printer, - const SCC* scc, + io::Printer* printer, const SCC* scc, std::set* provided) const; // For extension fields at file scope. void GenerateRequiresForExtensions( @@ -202,7 +194,8 @@ class PROTOC_EXPORT Generator : public CodeGenerator { const std::vector& fields, std::set* provided) const; void GenerateRequiresImpl(const GeneratorOptions& options, - io::Printer* printer, std::set* required, + io::Printer* printer, + std::set* required, std::set* forwards, std::set* provided, bool require_jspb, bool require_extension, bool require_map) const; diff --git a/src/google/protobuf/compiler/main.cc b/src/google/protobuf/compiler/main.cc index 0b8604902a..e1c539ae17 100644 --- a/src/google/protobuf/compiler/main.cc +++ b/src/google/protobuf/compiler/main.cc @@ -41,6 +41,8 @@ #include #include +#include + namespace google { namespace protobuf { namespace compiler { @@ -104,5 +106,5 @@ int ProtobufMain(int argc, char* argv[]) { } // namespace google int main(int argc, char* argv[]) { - return google::protobuf::compiler::ProtobufMain(argc, argv); + return PROTOBUF_NAMESPACE_ID::compiler::ProtobufMain(argc, argv); } diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc index 4bb1d87227..46326e2073 100644 --- a/src/google/protobuf/compiler/mock_code_generator.cc +++ b/src/google/protobuf/compiler/mock_code_generator.cc @@ -67,8 +67,9 @@ namespace compiler { // Returns the list of the names of files in all_files in the form of a // comma-separated string. -string CommaSeparatedList(const std::vector& all_files) { - std::vector names; +std::string CommaSeparatedList( + const std::vector& all_files) { + std::vector names; for (size_t i = 0; i < all_files.size(); i++) { names.push_back(all_files[i]->name()); } @@ -82,25 +83,23 @@ static const char* kFirstInsertionPoint = static const char* kSecondInsertionPoint = " # @@protoc_insertion_point(second_mock_insertion_point) is here\n"; -MockCodeGenerator::MockCodeGenerator(const string& name) - : name_(name) {} +MockCodeGenerator::MockCodeGenerator(const std::string& name) : name_(name) {} MockCodeGenerator::~MockCodeGenerator() {} void MockCodeGenerator::ExpectGenerated( - const string& name, - const string& parameter, - const string& insertions, - const string& file, - const string& first_message_name, - const string& first_parsed_file_name, - const string& output_directory) { - string content; + const std::string& name, const std::string& parameter, + const std::string& insertions, const std::string& file, + const std::string& first_message_name, + const std::string& first_parsed_file_name, + const std::string& output_directory) { + std::string content; GOOGLE_CHECK_OK( File::GetContents(output_directory + "/" + GetOutputFileName(name, file), &content, true)); - std::vector lines = Split(content, "\n", true); + std::vector lines = + Split(content, "\n", true); while (!lines.empty() && lines.back().empty()) { lines.pop_back(); @@ -109,7 +108,7 @@ void MockCodeGenerator::ExpectGenerated( lines[i] += "\n"; } - std::vector insertion_list; + std::vector insertion_list; if (!insertions.empty()) { SplitStringUsing(insertions, ",", &insertion_list); } @@ -135,9 +134,9 @@ void MockCodeGenerator::ExpectGenerated( } namespace { -void CheckSingleAnnotation(const string& expected_file, - const string& expected_text, - const string& file_content, +void CheckSingleAnnotation(const std::string& expected_file, + const std::string& expected_text, + const std::string& file_content, const GeneratedCodeInfo::Annotation& annotation) { EXPECT_EQ(expected_file, annotation.source_file()); ASSERT_GE(file_content.size(), annotation.begin()); @@ -150,12 +149,13 @@ void CheckSingleAnnotation(const string& expected_file, } // anonymous namespace void MockCodeGenerator::CheckGeneratedAnnotations( - const string& name, const string& file, const string& output_directory) { - string file_content; + const string& name, const std::string& file, + const std::string& output_directory) { + std::string file_content; GOOGLE_CHECK_OK( File::GetContents(output_directory + "/" + GetOutputFileName(name, file), &file_content, true)); - string meta_content; + std::string meta_content; GOOGLE_CHECK_OK(File::GetContents( output_directory + "/" + GetOutputFileName(name, file) + ".meta", &meta_content, true)); @@ -170,16 +170,15 @@ void MockCodeGenerator::CheckGeneratedAnnotations( annotations.annotation(2)); } -bool MockCodeGenerator::Generate( - const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { +bool MockCodeGenerator::Generate(const FileDescriptor* file, + const std::string& parameter, + GeneratorContext* context, + std::string* error) const { bool annotate = false; for (int i = 0; i < file->message_type_count(); i++) { if (HasPrefixString(file->message_type(i)->name(), "MockCodeGenerator_")) { - string command = StripPrefixString(file->message_type(i)->name(), - "MockCodeGenerator_"); + std::string command = StripPrefixString( + file->message_type(i)->name(), "MockCodeGenerator_"); if (command == "Error") { *error = "Saw message type MockCodeGenerator_Error."; return false; @@ -222,7 +221,7 @@ bool MockCodeGenerator::Generate( } if (HasPrefixString(parameter, "insert=")) { - std::vector insert_into; + std::vector insert_into; SplitStringUsing(StripPrefixString(parameter, "insert="), ",", &insert_into); @@ -262,7 +261,7 @@ bool MockCodeGenerator::Generate( io::Printer printer(output.get(), '$', annotate ? &annotation_collector : NULL); printer.PrintRaw(GetOutputFileContent(name_, parameter, file, context)); - string annotate_suffix = "_annotation"; + std::string annotate_suffix = "_annotation"; if (annotate) { printer.Print("$p$", "p", "first"); printer.Annotate("p", "first" + annotate_suffix); @@ -295,21 +294,19 @@ bool MockCodeGenerator::Generate( return true; } -string MockCodeGenerator::GetOutputFileName(const string& generator_name, - const FileDescriptor* file) { +std::string MockCodeGenerator::GetOutputFileName( + const std::string& generator_name, const FileDescriptor* file) { return GetOutputFileName(generator_name, file->name()); } -string MockCodeGenerator::GetOutputFileName(const string& generator_name, - const string& file) { +std::string MockCodeGenerator::GetOutputFileName( + const std::string& generator_name, const std::string& file) { return file + ".MockCodeGenerator." + generator_name; } -string MockCodeGenerator::GetOutputFileContent( - const string& generator_name, - const string& parameter, - const FileDescriptor* file, - GeneratorContext *context) { +std::string MockCodeGenerator::GetOutputFileContent( + const std::string& generator_name, const std::string& parameter, + const FileDescriptor* file, GeneratorContext* context) { std::vector all_files; context->ListParsedFiles(&all_files); return GetOutputFileContent( @@ -319,12 +316,10 @@ string MockCodeGenerator::GetOutputFileContent( file->message_type(0)->name() : "(none)"); } -string MockCodeGenerator::GetOutputFileContent( - const string& generator_name, - const string& parameter, - const string& file, - const string& parsed_file_list, - const string& first_message_name) { +std::string MockCodeGenerator::GetOutputFileContent( + const std::string& generator_name, const std::string& parameter, + const std::string& file, const std::string& parsed_file_list, + const std::string& first_message_name) { return strings::Substitute("$0: $1, $2, $3, $4\n", generator_name, parameter, file, first_message_name, parsed_file_list); diff --git a/src/google/protobuf/compiler/mock_code_generator.h b/src/google/protobuf/compiler/mock_code_generator.h index e6370b345e..082ba18d4d 100644 --- a/src/google/protobuf/compiler/mock_code_generator.h +++ b/src/google/protobuf/compiler/mock_code_generator.h @@ -100,29 +100,27 @@ class MockCodeGenerator : public CodeGenerator { // Get the name of the file which would be written by the given generator. static std::string GetOutputFileName(const std::string& generator_name, - const FileDescriptor* file); + const FileDescriptor* file); static std::string GetOutputFileName(const std::string& generator_name, - const std::string& file); + const std::string& file); // implements CodeGenerator ---------------------------------------- virtual bool Generate(const FileDescriptor* file, - const std::string& parameter, - GeneratorContext* context, + const std::string& parameter, GeneratorContext* context, std::string* error) const; private: std::string name_; static std::string GetOutputFileContent(const std::string& generator_name, - const std::string& parameter, - const FileDescriptor* file, - GeneratorContext *context); - static std::string GetOutputFileContent(const std::string& generator_name, - const std::string& parameter, - const std::string& file, - const std::string& parsed_file_list, - const std::string& first_message_name); + const std::string& parameter, + const FileDescriptor* file, + GeneratorContext* context); + static std::string GetOutputFileContent( + const std::string& generator_name, const std::string& parameter, + const std::string& file, const std::string& parsed_file_list, + const std::string& first_message_name); }; } // namespace compiler diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message.cc b/src/google/protobuf/compiler/objectivec/objectivec_message.cc index 2f1f08d0f9..09a96d61fe 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_message.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_message.cc @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include namespace google { diff --git a/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc index fe278bce72..af9a3d2f3f 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc @@ -36,7 +36,7 @@ #include #include #include -#include +#include namespace google { namespace protobuf { diff --git a/src/google/protobuf/compiler/parser.cc b/src/google/protobuf/compiler/parser.cc index 3f9fe2a436..9264710419 100644 --- a/src/google/protobuf/compiler/parser.cc +++ b/src/google/protobuf/compiler/parser.cc @@ -60,7 +60,7 @@ using internal::WireFormat; namespace { -typedef std::unordered_map TypeNameMap; +typedef std::unordered_map TypeNameMap; TypeNameMap MakeTypeNameTable() { TypeNameMap result; @@ -90,8 +90,8 @@ const TypeNameMap kTypeNames = MakeTypeNameTable(); // Camel-case the field name and append "Entry" for generated map entry name. // e.g. map foo_map => FooMapEntry -string MapEntryName(const string& field_name) { - string result; +std::string MapEntryName(const std::string& field_name) { + std::string result; static const char kSuffix[] = "Entry"; result.reserve(field_name.size() + sizeof(kSuffix)); bool cap_next = true; @@ -176,7 +176,7 @@ bool Parser::Consume(const char* text) { } } -bool Parser::ConsumeIdentifier(string* output, const char* error) { +bool Parser::ConsumeIdentifier(std::string* output, const char* error) { if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { *output = input_->current().text; input_->Next(); @@ -265,7 +265,7 @@ bool Parser::ConsumeNumber(double* output, const char* error) { } } -bool Parser::ConsumeString(string* output, const char* error) { +bool Parser::ConsumeString(std::string* output, const char* error) { if (LookingAtType(io::Tokenizer::TYPE_STRING)) { io::Tokenizer::ParseString(input_->current().text, output); input_->Next(); @@ -284,8 +284,8 @@ bool Parser::ConsumeString(string* output, const char* error) { bool Parser::TryConsumeEndOfDeclaration( const char* text, const LocationRecorder* location) { if (LookingAt(text)) { - string leading, trailing; - std::vector detached; + std::string leading, trailing; + std::vector detached; input_->NextWithComments(&trailing, &detached, &leading); // Save the leading comments for next time, and recall the leading comments @@ -324,14 +324,14 @@ bool Parser::ConsumeEndOfDeclaration( // ------------------------------------------------------------------- -void Parser::AddError(int line, int column, const string& error) { +void Parser::AddError(int line, int column, const std::string& error) { if (error_collector_ != NULL) { error_collector_->AddError(line, column, error); } had_errors_ = true; } -void Parser::AddError(const string& error) { +void Parser::AddError(const std::string& error) { AddError(input_->current().line, input_->current().column, error); } @@ -421,8 +421,8 @@ int Parser::LocationRecorder::CurrentPathSize() const { } void Parser::LocationRecorder::AttachComments( - string* leading, string* trailing, - std::vector* detached_comments) const { + std::string* leading, std::string* trailing, + std::vector* detached_comments) const { GOOGLE_CHECK(!location_->has_leading_comments()); GOOGLE_CHECK(!location_->has_trailing_comments()); @@ -496,7 +496,7 @@ bool Parser::ValidateEnum(const EnumDescriptorProto* proto) { } if (has_allow_alias && !allow_alias) { - string error = + std::string error = "\"" + proto->name() + "\" declares 'option allow_alias = false;' which has no effect. " "Please remove the declaration."; @@ -517,7 +517,7 @@ bool Parser::ValidateEnum(const EnumDescriptorProto* proto) { } } if (allow_alias && !has_duplicates) { - string error = + std::string error = "\"" + proto->name() + "\" declares support for enum aliases but no enum values share field " "numbers. Please remove the unnecessary 'option allow_alias = true;' " @@ -601,7 +601,7 @@ bool Parser::ParseSyntaxIdentifier(const LocationRecorder& parent) { "File must begin with a syntax statement, e.g. 'syntax = \"proto2\";'.")); DO(Consume("=")); io::Tokenizer::Token syntax_token = input_->current(); - string syntax; + std::string syntax; DO(ConsumeString(&syntax, "Expected syntax identifier.")); DO(ConsumeEndOfDeclaration(";", &syntax_location)); @@ -858,7 +858,7 @@ bool Parser::ParseMessageFieldNoLabel( bool type_parsed = false; FieldDescriptorProto::Type type = FieldDescriptorProto::TYPE_INT32; - string type_name; + std::string type_name; // Special case map field. We only treat the field as a map field if the // field type name starts with the word "map" with a following "<". @@ -1008,7 +1008,7 @@ void Parser::GenerateMapEntry(const MapField& map_field, FieldDescriptorProto* field, RepeatedPtrField* messages) { DescriptorProto* entry = messages->Add(); - string entry_name = MapEntryName(field->name()); + std::string entry_name = MapEntryName(field->name()); field->set_type_name(entry_name); entry->set_name(entry_name); entry->mutable_options()->set_map_entry(true); @@ -1113,7 +1113,7 @@ bool Parser::ParseDefaultAssignment( FieldDescriptorProto::kDefaultValueFieldNumber); location.RecordLegacyLocation( field, DescriptorPool::ErrorCollector::DEFAULT_VALUE); - string* default_value = field->mutable_default_value(); + std::string* default_value = field->mutable_default_value(); if (!field->has_type()) { // The field has a type name, but we don't know if it is a message or an @@ -1260,7 +1260,7 @@ bool Parser::ParseOptionNamePart(UninterpretedOption* uninterpreted_option, const LocationRecorder& part_location, const FileDescriptorProto* containing_file) { UninterpretedOption::NamePart* name = uninterpreted_option->add_name(); - string identifier; // We parse identifiers into this string. + std::string identifier; // We parse identifiers into this string. if (LookingAt("(")) { // This is an extension. DO(Consume("(")); @@ -1293,7 +1293,7 @@ bool Parser::ParseOptionNamePart(UninterpretedOption* uninterpreted_option, return true; } -bool Parser::ParseUninterpretedBlock(string* value) { +bool Parser::ParseUninterpretedBlock(std::string* value) { // Note that enclosing braces are not added to *value. // We do NOT use ConsumeEndOfStatement for this brace because it's delimiting // an expression, not a block of statements. @@ -1394,7 +1394,7 @@ bool Parser::ParseOption(Message* options, AddError("Invalid '-' symbol before identifier."); return false; } - string value; + std::string value; DO(ConsumeIdentifier(&value, "Expected identifier.")); uninterpreted_option->set_identifier_value(value); break; @@ -1432,7 +1432,7 @@ bool Parser::ParseOption(Message* options, AddError("Invalid '-' symbol before string."); return false; } - string value; + std::string value; DO(ConsumeString(&value, "Expected string.")); uninterpreted_option->set_string_value(value); break; @@ -1725,7 +1725,7 @@ bool Parser::ParseExtend(RepeatedPtrField* extensions, // Parse the extendee type. io::Tokenizer::Token extendee_start = input_->current(); - string extendee; + std::string extendee; DO(ParseUserDefinedType(&extendee)); io::Tokenizer::Token extendee_end = input_->previous(); @@ -2133,7 +2133,7 @@ bool Parser::ParseLabel(FieldDescriptorProto::Label* label, } bool Parser::ParseType(FieldDescriptorProto::Type* type, - string* type_name) { + std::string* type_name) { TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text); if (iter != kTypeNames.end()) { *type = iter->second; @@ -2144,7 +2144,7 @@ bool Parser::ParseType(FieldDescriptorProto::Type* type, return true; } -bool Parser::ParseUserDefinedType(string* type_name) { +bool Parser::ParseUserDefinedType(std::string* type_name) { type_name->clear(); TypeNameMap::const_iterator iter = kTypeNames.find(input_->current().text); @@ -2165,7 +2165,7 @@ bool Parser::ParseUserDefinedType(string* type_name) { if (TryConsume(".")) type_name->append("."); // Consume the first part of the name. - string identifier; + std::string identifier; DO(ConsumeIdentifier(&identifier, "Expected type name.")); type_name->append(identifier); @@ -2198,7 +2198,7 @@ bool Parser::ParsePackage(FileDescriptorProto* file, DO(Consume("package")); while (true) { - string identifier; + std::string identifier; DO(ConsumeIdentifier(&identifier, "Expected identifier.")); file->mutable_package()->append(identifier); if (!TryConsume(".")) break; @@ -2210,7 +2210,7 @@ bool Parser::ParsePackage(FileDescriptorProto* file, return true; } -bool Parser::ParseImport(RepeatedPtrField* dependency, +bool Parser::ParseImport(RepeatedPtrField* dependency, RepeatedField* public_dependency, RepeatedField* weak_dependency, const LocationRecorder& root_location, diff --git a/src/google/protobuf/compiler/parser.h b/src/google/protobuf/compiler/parser.h index 9ae6c6da6d..a5cb7a87a9 100644 --- a/src/google/protobuf/compiler/parser.h +++ b/src/google/protobuf/compiler/parser.h @@ -438,8 +438,7 @@ class PROTOBUF_EXPORT Parser { // Parse a type name and fill in "type" (if it is a primitive) or // "type_name" (if it is not) with the type parsed. - bool ParseType(FieldDescriptorProto::Type* type, - std::string* type_name); + bool ParseType(FieldDescriptorProto::Type* type, std::string* type_name); // Parse a user-defined type and fill in "type_name" with the name. // If a primitive type is named, it is treated as an error. bool ParseUserDefinedType(std::string* type_name); diff --git a/src/google/protobuf/compiler/parser_unittest.cc b/src/google/protobuf/compiler/parser_unittest.cc index 4c67c78ab9..58e5694778 100644 --- a/src/google/protobuf/compiler/parser_unittest.cc +++ b/src/google/protobuf/compiler/parser_unittest.cc @@ -65,10 +65,10 @@ class MockErrorCollector : public io::ErrorCollector { MockErrorCollector() {} ~MockErrorCollector() {} - string text_; + std::string text_; // implements ErrorCollector --------------------------------------- - void AddError(int line, int column, const string& message) { + void AddError(int line, int column, const std::string& message) { strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", line, column, message); } @@ -83,11 +83,9 @@ class MockValidationErrorCollector : public DescriptorPool::ErrorCollector { ~MockValidationErrorCollector() {} // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, - const string& element_name, - const Message* descriptor, - ErrorLocation location, - const string& message) { + void AddError(const std::string& filename, const std::string& element_name, + const Message* descriptor, ErrorLocation location, + const std::string& message) { int line, column; source_locations_.Find(descriptor, location, &line, &column); wrapped_collector_->AddError(line, column, message); @@ -1956,9 +1954,9 @@ void SortMessages(FileDescriptorProto *file_descriptor_proto) { // Strips the message and enum field type names for comparison purpose only. void StripFieldTypeName(DescriptorProto* proto) { for (int i = 0; i < proto->field_size(); ++i) { - string type_name = proto->field(i).type_name(); - string::size_type pos = type_name.find_last_of("."); - if (pos != string::npos) { + std::string type_name = proto->field(i).type_name(); + std::string::size_type pos = type_name.find_last_of("."); + if (pos != std::string::npos) { proto->mutable_field(i)->mutable_type_name()->assign( type_name.begin() + pos + 1, type_name.end()); } @@ -1982,7 +1980,7 @@ TEST_F(ParseDescriptorDebugTest, TestAllDescriptorTypes) { // Get the DebugString of the unittest.proto FileDecriptor, which includes // all other descriptor types - string debug_string = original_file->DebugString(); + std::string debug_string = original_file->DebugString(); // Parse the debug string SetupParser(debug_string.c_str()); @@ -2033,7 +2031,7 @@ TEST_F(ParseDescriptorDebugTest, TestCustomOptions) { FileDescriptorProto expected; original_file->CopyTo(&expected); - string debug_string = original_file->DebugString(); + std::string debug_string = original_file->DebugString(); // Parse the debug string SetupParser(debug_string.c_str()); @@ -2166,12 +2164,13 @@ TEST_F(ParseDescriptorDebugTest, TestCommentsInDebugString) { debug_string_options.include_comments = true; { - const string debug_string = + const std::string debug_string = descriptor->DebugStringWithOptions(debug_string_options); for (int i = 0; i < GOOGLE_ARRAYSIZE(expected_comments); ++i) { - string::size_type found_pos = debug_string.find(expected_comments[i]); - EXPECT_TRUE(found_pos != string::npos) + std::string::size_type found_pos = + debug_string.find(expected_comments[i]); + EXPECT_TRUE(found_pos != std::string::npos) << "\"" << expected_comments[i] << "\" not found."; } @@ -2202,7 +2201,7 @@ TEST_F(ParseDescriptorDebugTest, TestMaps) { // Make sure the debug string uses map syntax and does not have the auto // generated entry. - string debug_string = file->DebugString(); + std::string debug_string = file->DebugString(); EXPECT_TRUE(debug_string.find("map<") != string::npos); EXPECT_TRUE(debug_string.find("option map_entry") == string::npos); EXPECT_TRUE(debug_string.find("MapEntry") == string::npos); @@ -2389,21 +2388,20 @@ class SourceInfoTest : public ParserTest { } bool HasSpan(char start_marker, char end_marker, - const Message& descriptor_proto, const string& field_name) { + const Message& descriptor_proto, const std::string& field_name) { return HasSpan(start_marker, end_marker, descriptor_proto, field_name, -1); } bool HasSpan(char start_marker, char end_marker, - const Message& descriptor_proto, const string& field_name, + const Message& descriptor_proto, const std::string& field_name, int index) { return HasSpan(start_marker, end_marker, descriptor_proto, field_name, index, NULL, NULL, NULL); } bool HasSpan(char start_marker, char end_marker, - const Message& descriptor_proto, - const string& field_name, int index, - const char* expected_leading_comments, + const Message& descriptor_proto, const std::string& field_name, + int index, const char* expected_leading_comments, const char* expected_trailing_comments, const char* expected_leading_detached_comments) { const FieldDescriptor* field = @@ -2425,11 +2423,11 @@ class SourceInfoTest : public ParserTest { '\0', '\0', descriptor_proto, NULL, -1, NULL, NULL, NULL); } - bool HasSpan(const Message& descriptor_proto, const string& field_name) { + bool HasSpan(const Message& descriptor_proto, const std::string& field_name) { return HasSpan('\0', '\0', descriptor_proto, field_name, -1); } - bool HasSpan(const Message& descriptor_proto, const string& field_name, + bool HasSpan(const Message& descriptor_proto, const std::string& field_name, int index) { return HasSpan('\0', '\0', descriptor_proto, field_name, index); } @@ -2520,7 +2518,7 @@ class SourceInfoTest : public ParserTest { typedef std::multimap SpanMap; SpanMap spans_; std::map > markers_; - string text_without_markers_; + std::string text_without_markers_; void ExtractMarkers(const char* text) { markers_.clear(); diff --git a/src/google/protobuf/compiler/php/php_generator.h b/src/google/protobuf/compiler/php/php_generator.h index 25c794ebe1..1b6f471a6f 100644 --- a/src/google/protobuf/compiler/php/php_generator.h +++ b/src/google/protobuf/compiler/php/php_generator.h @@ -44,7 +44,7 @@ namespace compiler { namespace php { class PROTOC_EXPORT Generator - : public google::protobuf::compiler::CodeGenerator { + : public PROTOBUF_NAMESPACE_ID::compiler::CodeGenerator { virtual bool Generate( const FileDescriptor* file, const string& parameter, @@ -56,11 +56,11 @@ class PROTOC_EXPORT Generator // Other code generators may need following API to figure out the actual // classname. PROTOC_EXPORT std::string GeneratedClassName( - const google::protobuf::Descriptor* desc); + const PROTOBUF_NAMESPACE_ID::Descriptor* desc); PROTOC_EXPORT std::string GeneratedClassName( - const google::protobuf::EnumDescriptor* desc); + const PROTOBUF_NAMESPACE_ID::EnumDescriptor* desc); PROTOC_EXPORT std::string GeneratedClassName( - const google::protobuf::ServiceDescriptor* desc); + const PROTOBUF_NAMESPACE_ID::ServiceDescriptor* desc); inline bool IsWrapperType(const FieldDescriptor* descriptor) { return descriptor->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && diff --git a/src/google/protobuf/compiler/plugin.cc b/src/google/protobuf/compiler/plugin.cc index 9c1c757c99..3504875893 100644 --- a/src/google/protobuf/compiler/plugin.cc +++ b/src/google/protobuf/compiler/plugin.cc @@ -73,14 +73,14 @@ class GeneratorResponseContext : public GeneratorContext { // implements GeneratorContext -------------------------------------- - virtual io::ZeroCopyOutputStream* Open(const string& filename) { + virtual io::ZeroCopyOutputStream* Open(const std::string& filename) { CodeGeneratorResponse::File* file = response_->add_file(); file->set_name(filename); return new io::StringOutputStream(file->mutable_content()); } virtual io::ZeroCopyOutputStream* OpenForInsert( - const string& filename, const string& insertion_point) { + const std::string& filename, const std::string& insertion_point) { CodeGeneratorResponse::File* file = response_->add_file(); file->set_name(filename); file->set_insertion_point(insertion_point); @@ -102,8 +102,8 @@ class GeneratorResponseContext : public GeneratorContext { }; bool GenerateCode(const CodeGeneratorRequest& request, - const CodeGenerator& generator, CodeGeneratorResponse* response, - string* error_msg) { + const CodeGenerator& generator, + CodeGeneratorResponse* response, std::string* error_msg) { DescriptorPool pool; for (int i = 0; i < request.proto_file_size(); i++) { const FileDescriptor* file = pool.BuildFile(request.proto_file(i)); @@ -128,7 +128,7 @@ bool GenerateCode(const CodeGeneratorRequest& request, request.compiler_version(), response, parsed_files); - string error; + std::string error; bool succeeded = generator.GenerateAll( parsed_files, request.parameter(), &context, &error); @@ -162,7 +162,7 @@ int PluginMain(int argc, char* argv[], const CodeGenerator* generator) { return 1; } - string error_msg; + std::string error_msg; CodeGeneratorResponse response; if (GenerateCode(request, *generator, &response, &error_msg)) { diff --git a/src/google/protobuf/compiler/plugin.h b/src/google/protobuf/compiler/plugin.h index 48db3c1cc9..0eed2df37f 100644 --- a/src/google/protobuf/compiler/plugin.h +++ b/src/google/protobuf/compiler/plugin.h @@ -82,8 +82,8 @@ PROTOC_EXPORT int PluginMain(int argc, char* argv[], // generation is successful. If the code geneartion fails, error_msg may be // populated to describe the failure cause. bool GenerateCode(const CodeGeneratorRequest& request, - const CodeGenerator& generator, CodeGeneratorResponse* response, - std::string* error_msg); + const CodeGenerator& generator, + CodeGeneratorResponse* response, std::string* error_msg); } // namespace compiler } // namespace protobuf diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index 5877b9f0eb..4b7dd94b09 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,58 +16,56 @@ // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -namespace google { -namespace protobuf { +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +PROTOBUF_NAMESPACE_OPEN namespace compiler { class VersionDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Version_default_instance_; class CodeGeneratorRequestDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _CodeGeneratorRequest_default_instance_; class CodeGeneratorResponse_FileDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _CodeGeneratorResponse_File_default_instance_; class CodeGeneratorResponseDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _CodeGeneratorResponse_default_instance_; } // namespace compiler -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsVersion_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::compiler::_Version_default_instance_; - new (ptr) ::google::protobuf::compiler::Version(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::compiler::Version(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::compiler::Version::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::compiler::Version::InitAsDefaultInstance(); } -PROTOC_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsVersion_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; +PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsVersion_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; static void InitDefaultsCodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::compiler::_CodeGeneratorRequest_default_instance_; - new (ptr) ::google::protobuf::compiler::CodeGeneratorRequest(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::compiler::CodeGeneratorRequest::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest::InitAsDefaultInstance(); } -PROTOC_EXPORT ::google::protobuf::internal::SCCInfo<2> scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsCodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { +PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsCodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { &scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,}}; @@ -75,105 +73,105 @@ static void InitDefaultsCodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_ GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::compiler::_CodeGeneratorResponse_File_default_instance_; - new (ptr) ::google::protobuf::compiler::CodeGeneratorResponse_File(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_File_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::compiler::CodeGeneratorResponse_File::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File::InitAsDefaultInstance(); } -PROTOC_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; +PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, {}}; static void InitDefaultsCodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::compiler::_CodeGeneratorResponse_default_instance_; - new (ptr) ::google::protobuf::compiler::CodeGeneratorResponse(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::compiler::CodeGeneratorResponse::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse::InitAsDefaultInstance(); } -PROTOC_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { +PROTOC_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto}, { &scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base,}}; void InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[4]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[4]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::Version, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::Version, _internal_metadata_), +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::Version, major_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::Version, minor_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::Version, patch_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::Version, suffix_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, major_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, minor_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, patch_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::Version, suffix_), 1, 2, 3, 0, - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, file_to_generate_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, parameter_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, proto_file_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, compiler_version_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, file_to_generate_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, parameter_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, proto_file_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest, compiler_version_), ~0u, 0, ~0u, 1, - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, insertion_point_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, content_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, insertion_point_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File, content_), 0, 1, 2, - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, error_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, file_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, error_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse, file_), 0, ~0u, }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 9, sizeof(::google::protobuf::compiler::Version)}, - { 13, 22, sizeof(::google::protobuf::compiler::CodeGeneratorRequest)}, - { 26, 34, sizeof(::google::protobuf::compiler::CodeGeneratorResponse_File)}, - { 37, 44, sizeof(::google::protobuf::compiler::CodeGeneratorResponse)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 9, sizeof(PROTOBUF_NAMESPACE_ID::compiler::Version)}, + { 13, 22, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest)}, + { 26, 34, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File)}, + { 37, 44, sizeof(PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::compiler::_Version_default_instance_), - reinterpret_cast(&::google::protobuf::compiler::_CodeGeneratorRequest_default_instance_), - reinterpret_cast(&::google::protobuf::compiler::_CodeGeneratorResponse_File_default_instance_), - reinterpret_cast(&::google::protobuf::compiler::_CodeGeneratorResponse_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_File_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorResponse_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, "google/protobuf/compiler/plugin.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, file_level_service_descriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto, @@ -197,24 +195,23 @@ const char descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2epro "pilerB\014PluginProtosZ9github.com/golang/p" "rotobuf/protoc-gen-go/plugin;plugin_go" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto = { false, InitDefaults_google_2fprotobuf_2fcompiler_2fplugin_2eproto, descriptor_table_protodef_google_2fprotobuf_2fcompiler_2fplugin_2eproto, "google/protobuf/compiler/plugin.proto", &assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto, 638, }; void AddDescriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { ::AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto, }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto, deps, 1); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto, deps, 1); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fcompiler_2fplugin_2eproto = []() { AddDescriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN namespace compiler { // =================================================================== @@ -245,18 +242,18 @@ const int Version::kSuffixFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Version::Version() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version) } Version::Version(const Version& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_suffix()) { - suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_); + suffix_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.suffix_); } ::memcpy(&major_, &from.major_, static_cast(reinterpret_cast(&patch_) - @@ -265,9 +262,9 @@ Version::Version(const Version& from) } void Version::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); - suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + suffix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&major_, 0, static_cast( reinterpret_cast(&patch_) - reinterpret_cast(&major_)) + sizeof(patch_)); @@ -279,21 +276,21 @@ Version::~Version() { } void Version::SharedDtor() { - suffix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + suffix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Version::SetCachedSize(int size) const { _cached_size_.Set(size); } const Version& Version::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Version_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); return *internal_default_instance(); } void Version::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -311,37 +308,38 @@ void Version::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Version::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Version::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional int32 major = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_major(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_major(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 minor = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_minor(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_minor(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 patch = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - set_patch(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 24) goto handle_unusual; + set_patch(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string suffix = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_suffix(), ptr, ctx, "google.protobuf.compiler.Version.suffix"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_suffix(), ptr, ctx, "google.protobuf.compiler.Version.suffix"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -362,21 +360,21 @@ const char* Version::_InternalParse(const char* ptr, ::google::protobuf::interna } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Version::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.Version) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional int32 major = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { HasBitSetters::set_has_major(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &major_))); } else { goto handle_unusual; @@ -386,10 +384,10 @@ bool Version::MergePartialFromCodedStream( // optional int32 minor = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_minor(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &minor_))); } else { goto handle_unusual; @@ -399,10 +397,10 @@ bool Version::MergePartialFromCodedStream( // optional int32 patch = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { HasBitSetters::set_has_patch(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &patch_))); } else { goto handle_unusual; @@ -412,12 +410,12 @@ bool Version::MergePartialFromCodedStream( // optional string suffix = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_suffix())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->suffix().data(), static_cast(this->suffix().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.compiler.Version.suffix"); } else { goto handle_unusual; @@ -430,7 +428,7 @@ bool Version::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -447,79 +445,79 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Version::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.Version) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 major = 1; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->major(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->major(), output); } // optional int32 minor = 2; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->minor(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->minor(), output); } // optional int32 patch = 3; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->patch(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->patch(), output); } // optional string suffix = 4; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->suffix().data(), static_cast(this->suffix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.Version.suffix"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->suffix(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.Version) } -::google::protobuf::uint8* Version::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Version::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 major = 1; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->major(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->major(), target); } // optional int32 minor = 2; if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->minor(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->minor(), target); } // optional int32 patch = 3; if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->patch(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->patch(), target); } // optional string suffix = 4; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->suffix().data(), static_cast(this->suffix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.Version.suffix"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 4, this->suffix(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.Version) @@ -532,10 +530,10 @@ size_t Version::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -544,46 +542,46 @@ size_t Version::ByteSizeLong() const { // optional string suffix = 4; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->suffix()); } // optional int32 major = 1; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->major()); } // optional int32 minor = 2; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->minor()); } // optional int32 patch = 3; if (cached_has_bits & 0x00000008u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->patch()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Version::MergeFrom(const ::google::protobuf::Message& from) { +void Version::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.Version) GOOGLE_DCHECK_NE(&from, this); const Version* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.Version) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.Version) MergeFrom(*source); @@ -594,14 +592,14 @@ void Version::MergeFrom(const Version& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x0000000fu) { if (cached_has_bits & 0x00000001u) { _has_bits_[0] |= 0x00000001u; - suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_); + suffix_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.suffix_); } if (cached_has_bits & 0x00000002u) { major_ = from.major_; @@ -616,7 +614,7 @@ void Version::MergeFrom(const Version& from) { } } -void Version::CopyFrom(const ::google::protobuf::Message& from) { +void Version::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.Version) if (&from == this) return; Clear(); @@ -642,15 +640,15 @@ void Version::InternalSwap(Version* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - suffix_.Swap(&other->suffix_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + suffix_.Swap(&other->suffix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(major_, other->major_); swap(minor_, other->minor_); swap(patch_, other->patch_); } -::google::protobuf::Metadata Version::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Version::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages]; } @@ -658,21 +656,21 @@ void Version::InternalSwap(Version* other) { // =================================================================== void CodeGeneratorRequest::InitAsDefaultInstance() { - ::google::protobuf::compiler::_CodeGeneratorRequest_default_instance_._instance.get_mutable()->compiler_version_ = const_cast< ::google::protobuf::compiler::Version*>( - ::google::protobuf::compiler::Version::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::compiler::_CodeGeneratorRequest_default_instance_._instance.get_mutable()->compiler_version_ = const_cast< PROTOBUF_NAMESPACE_ID::compiler::Version*>( + PROTOBUF_NAMESPACE_ID::compiler::Version::internal_default_instance()); } class CodeGeneratorRequest::HasBitSetters { public: static void set_has_parameter(CodeGeneratorRequest* msg) { msg->_has_bits_[0] |= 0x00000001u; } - static const ::google::protobuf::compiler::Version& compiler_version(const CodeGeneratorRequest* msg); + static const PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version(const CodeGeneratorRequest* msg); static void set_has_compiler_version(CodeGeneratorRequest* msg) { msg->_has_bits_[0] |= 0x00000002u; } }; -const ::google::protobuf::compiler::Version& +const PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::HasBitSetters::compiler_version(const CodeGeneratorRequest* msg) { return *msg->compiler_version_; } @@ -687,23 +685,23 @@ const int CodeGeneratorRequest::kCompilerVersionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CodeGeneratorRequest::CodeGeneratorRequest() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest) } CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), file_to_generate_(from.file_to_generate_), proto_file_(from.proto_file_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_parameter()) { - parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_); + parameter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parameter_); } if (from.has_compiler_version()) { - compiler_version_ = new ::google::protobuf::compiler::Version(*from.compiler_version_); + compiler_version_ = new PROTOBUF_NAMESPACE_ID::compiler::Version(*from.compiler_version_); } else { compiler_version_ = nullptr; } @@ -711,9 +709,9 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from) } void CodeGeneratorRequest::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); - parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + parameter_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); compiler_version_ = nullptr; } @@ -723,7 +721,7 @@ CodeGeneratorRequest::~CodeGeneratorRequest() { } void CodeGeneratorRequest::SharedDtor() { - parameter_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + parameter_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete compiler_version_; } @@ -731,14 +729,14 @@ void CodeGeneratorRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeGeneratorRequest_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); return *internal_default_instance(); } void CodeGeneratorRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -759,44 +757,45 @@ void CodeGeneratorRequest::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated string file_to_generate = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; do { - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(add_file_to_generate(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_file_to_generate(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } // optional string parameter = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_parameter(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_parameter(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.compiler.Version compiler_version = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; ptr = ctx->ParseMessage(mutable_compiler_version(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; case 15: { - if (static_cast<::google::protobuf::uint8>(tag) != 122) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 122) goto handle_unusual; do { ptr = ctx->ParseMessage(add_proto_file(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 122 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 122 && (ptr += 1)); break; } default: { @@ -816,24 +815,24 @@ const char* CodeGeneratorRequest::_InternalParse(const char* ptr, ::google::prot } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool CodeGeneratorRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorRequest) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated string file_to_generate = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_file_to_generate())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->file_to_generate(this->file_to_generate_size() - 1).data(), static_cast(this->file_to_generate(this->file_to_generate_size() - 1).length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); } else { goto handle_unusual; @@ -843,12 +842,12 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream( // optional string parameter = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_parameter())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->parameter().data(), static_cast(this->parameter().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); } else { goto handle_unusual; @@ -858,8 +857,8 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream( // optional .google.protobuf.compiler.Version compiler_version = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_compiler_version())); } else { goto handle_unusual; @@ -869,8 +868,8 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream( // repeated .google.protobuf.FileDescriptorProto proto_file = 15; case 15: { - if (static_cast< ::google::protobuf::uint8>(tag) == (122 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_proto_file())); } else { goto handle_unusual; @@ -883,7 +882,7 @@ bool CodeGeneratorRequest::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -900,85 +899,85 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void CodeGeneratorRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string file_to_generate = 1; for (int i = 0, n = this->file_to_generate_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->file_to_generate(i).data(), static_cast(this->file_to_generate(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( 1, this->file_to_generate(i), output); } cached_has_bits = _has_bits_[0]; // optional string parameter = 2; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->parameter().data(), static_cast(this->parameter().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->parameter(), output); } // optional .google.protobuf.compiler.Version compiler_version = 3; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, HasBitSetters::compiler_version(this), output); } // repeated .google.protobuf.FileDescriptorProto proto_file = 15; for (unsigned int i = 0, n = static_cast(this->proto_file_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 15, this->proto_file(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorRequest) } -::google::protobuf::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string file_to_generate = 1; for (int i = 0, n = this->file_to_generate_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->file_to_generate(i).data(), static_cast(this->file_to_generate(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate"); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteStringToArray(1, this->file_to_generate(i), target); } cached_has_bits = _has_bits_[0]; // optional string parameter = 2; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->parameter().data(), static_cast(this->parameter().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorRequest.parameter"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->parameter(), target); } // optional .google.protobuf.compiler.Version compiler_version = 3; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, HasBitSetters::compiler_version(this), target); } @@ -986,13 +985,13 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( // repeated .google.protobuf.FileDescriptorProto proto_file = 15; for (unsigned int i = 0, n = static_cast(this->proto_file_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 15, this->proto_file(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest) @@ -1005,18 +1004,18 @@ size_t CodeGeneratorRequest::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string file_to_generate = 1; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->file_to_generate_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->file_to_generate_size()); for (int i = 0, n = this->file_to_generate_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->file_to_generate(i)); } @@ -1026,7 +1025,7 @@ size_t CodeGeneratorRequest::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->proto_file(static_cast(i))); } } @@ -1036,32 +1035,32 @@ size_t CodeGeneratorRequest::ByteSizeLong() const { // optional string parameter = 2; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->parameter()); } // optional .google.protobuf.compiler.Version compiler_version = 3; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *compiler_version_); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) { +void CodeGeneratorRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest) GOOGLE_DCHECK_NE(&from, this); const CodeGeneratorRequest* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorRequest) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorRequest) MergeFrom(*source); @@ -1072,7 +1071,7 @@ void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; file_to_generate_.MergeFrom(from.file_to_generate_); @@ -1081,15 +1080,15 @@ void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) { if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { _has_bits_[0] |= 0x00000001u; - parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_); + parameter_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.parameter_); } if (cached_has_bits & 0x00000002u) { - mutable_compiler_version()->::google::protobuf::compiler::Version::MergeFrom(from.compiler_version()); + mutable_compiler_version()->PROTOBUF_NAMESPACE_ID::compiler::Version::MergeFrom(from.compiler_version()); } } } -void CodeGeneratorRequest::CopyFrom(const ::google::protobuf::Message& from) { +void CodeGeneratorRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorRequest) if (&from == this) return; Clear(); @@ -1104,7 +1103,7 @@ void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) { } bool CodeGeneratorRequest::IsInitialized() const { - if (!::google::protobuf::internal::AllAreInitialized(this->proto_file())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->proto_file())) return false; return true; } @@ -1118,13 +1117,13 @@ void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) { swap(_has_bits_[0], other->_has_bits_[0]); file_to_generate_.InternalSwap(CastToBase(&other->file_to_generate_)); CastToBase(&proto_file_)->InternalSwap(CastToBase(&other->proto_file_)); - parameter_.Swap(&other->parameter_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + parameter_.Swap(&other->parameter_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(compiler_version_, other->compiler_version_); } -::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorRequest::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages]; } @@ -1153,36 +1152,36 @@ const int CodeGeneratorResponse_File::kContentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CodeGeneratorResponse_File::CodeGeneratorResponse_File() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } - insertion_point_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_insertion_point()) { - insertion_point_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.insertion_point_); + insertion_point_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.insertion_point_); } - content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_content()) { - content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_); + content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_); } // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } void CodeGeneratorResponse_File::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - insertion_point_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + insertion_point_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } CodeGeneratorResponse_File::~CodeGeneratorResponse_File() { @@ -1191,23 +1190,23 @@ CodeGeneratorResponse_File::~CodeGeneratorResponse_File() { } void CodeGeneratorResponse_File::SharedDtor() { - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - insertion_point_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - content_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + insertion_point_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void CodeGeneratorResponse_File::SetCachedSize(int size) const { _cached_size_.Set(size); } const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeGeneratorResponse_File_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); return *internal_default_instance(); } void CodeGeneratorResponse_File::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse.File) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1228,30 +1227,31 @@ void CodeGeneratorResponse_File::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string insertion_point = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_insertion_point(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_insertion_point(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string content = 15; case 15: { - if (static_cast<::google::protobuf::uint8>(tag) != 122) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_content(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 122) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_content(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -1272,23 +1272,23 @@ const char* CodeGeneratorResponse_File::_InternalParse(const char* ptr, ::google } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool CodeGeneratorResponse_File::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse.File) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); } else { goto handle_unusual; @@ -1298,12 +1298,12 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream( // optional string insertion_point = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_insertion_point())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->insertion_point().data(), static_cast(this->insertion_point().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); } else { goto handle_unusual; @@ -1313,12 +1313,12 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream( // optional string content = 15; case 15: { - if (static_cast< ::google::protobuf::uint8>(tag) == (122 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_content())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->content().data(), static_cast(this->content().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); } else { goto handle_unusual; @@ -1331,7 +1331,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1348,91 +1348,91 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void CodeGeneratorResponse_File::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse.File) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // optional string insertion_point = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->insertion_point().data(), static_cast(this->insertion_point().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->insertion_point(), output); } // optional string content = 15; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->content().data(), static_cast(this->content().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 15, this->content(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse.File) } -::google::protobuf::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // optional string insertion_point = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->insertion_point().data(), static_cast(this->insertion_point().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->insertion_point(), target); } // optional string content = 15; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->content().data(), static_cast(this->content().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.File.content"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 15, this->content(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse.File) @@ -1445,10 +1445,10 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1457,39 +1457,39 @@ size_t CodeGeneratorResponse_File::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional string insertion_point = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->insertion_point()); } // optional string content = 15; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->content()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& from) { +void CodeGeneratorResponse_File::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File) GOOGLE_DCHECK_NE(&from, this); const CodeGeneratorResponse_File* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse.File) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorResponse.File) MergeFrom(*source); @@ -1500,27 +1500,27 @@ void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& fro // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { _has_bits_[0] |= 0x00000001u; - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } if (cached_has_bits & 0x00000002u) { _has_bits_[0] |= 0x00000002u; - insertion_point_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.insertion_point_); + insertion_point_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.insertion_point_); } if (cached_has_bits & 0x00000004u) { _has_bits_[0] |= 0x00000004u; - content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_); + content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_); } } } -void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) { +void CodeGeneratorResponse_File::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File) if (&from == this) return; Clear(); @@ -1546,16 +1546,16 @@ void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - insertion_point_.Swap(&other->insertion_point_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + insertion_point_.Swap(&other->insertion_point_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - content_.Swap(&other->content_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse_File::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages]; } @@ -1577,27 +1577,27 @@ const int CodeGeneratorResponse::kFileFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CodeGeneratorResponse::CodeGeneratorResponse() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse) } CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), file_(from.file_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_error()) { - error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_); + error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_); } // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse) } void CodeGeneratorResponse::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); - error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } CodeGeneratorResponse::~CodeGeneratorResponse() { @@ -1606,21 +1606,21 @@ CodeGeneratorResponse::~CodeGeneratorResponse() { } void CodeGeneratorResponse::SharedDtor() { - error_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void CodeGeneratorResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeGeneratorResponse_google_2fprotobuf_2fcompiler_2fplugin_2eproto.base); return *internal_default_instance(); } void CodeGeneratorResponse::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1634,27 +1634,28 @@ void CodeGeneratorResponse::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string error = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_error(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.error"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_error(), ptr, ctx, "google.protobuf.compiler.CodeGeneratorResponse.error"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; case 15: { - if (static_cast<::google::protobuf::uint8>(tag) != 122) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 122) goto handle_unusual; do { ptr = ctx->ParseMessage(add_file(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 122 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 122 && (ptr += 1)); break; } default: { @@ -1674,23 +1675,23 @@ const char* CodeGeneratorResponse::_InternalParse(const char* ptr, ::google::pro } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool CodeGeneratorResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string error = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_error())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->error().data(), static_cast(this->error().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.compiler.CodeGeneratorResponse.error"); } else { goto handle_unusual; @@ -1700,8 +1701,8 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream( // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; case 15: { - if (static_cast< ::google::protobuf::uint8>(tag) == (122 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_file())); } else { goto handle_unusual; @@ -1714,7 +1715,7 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1731,66 +1732,66 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void CodeGeneratorResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string error = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->error().data(), static_cast(this->error().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.error"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->error(), output); } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; for (unsigned int i = 0, n = static_cast(this->file_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 15, this->file(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse) } -::google::protobuf::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string error = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->error().data(), static_cast(this->error().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.compiler.CodeGeneratorResponse.error"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->error(), target); } // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; for (unsigned int i = 0, n = static_cast(this->file_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 15, this->file(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse) @@ -1803,10 +1804,10 @@ size_t CodeGeneratorResponse::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1816,7 +1817,7 @@ size_t CodeGeneratorResponse::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->file(static_cast(i))); } } @@ -1825,24 +1826,24 @@ size_t CodeGeneratorResponse::ByteSizeLong() const { cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->error()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) { +void CodeGeneratorResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse) GOOGLE_DCHECK_NE(&from, this); const CodeGeneratorResponse* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorResponse) MergeFrom(*source); @@ -1853,17 +1854,17 @@ void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; file_.MergeFrom(from.file_); if (from.has_error()) { _has_bits_[0] |= 0x00000001u; - error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_); + error_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_); } } -void CodeGeneratorResponse::CopyFrom(const ::google::protobuf::Message& from) { +void CodeGeneratorResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse) if (&from == this) return; Clear(); @@ -1890,36 +1891,33 @@ void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) { _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); CastToBase(&file_)->InternalSwap(CastToBase(&other->file_)); - error_.Swap(&other->error_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + error_.Swap(&other->error_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata CodeGeneratorResponse::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fcompiler_2fplugin_2eproto); return ::file_level_metadata_google_2fprotobuf_2fcompiler_2fplugin_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) } // namespace compiler -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::compiler::Version* Arena::CreateMaybeMessage< ::google::protobuf::compiler::Version >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::compiler::Version >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::Version >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::Version >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorRequest >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorRequest >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorResponse_File >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorResponse_File >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorResponse >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorResponse >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 3ae809e3bc..5dbce6f238 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/compiler/plugin.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fcompiler_2fplugin_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fcompiler_2fplugin_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fcompiler_2fplugin_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fcompiler_2fplugin_2eproto #include #include @@ -31,13 +31,6 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google #include // @@protoc_insertion_point(includes) #include @@ -48,22 +41,26 @@ class AnyMetadata; #ifdef minor #undef minor #endif +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOC_EXPORT TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[4] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOC_EXPORT AddDescriptors_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN namespace compiler { class CodeGeneratorRequest; class CodeGeneratorRequestDefaultTypeInternal; @@ -78,36 +75,34 @@ class Version; class VersionDefaultTypeInternal; PROTOC_EXPORT extern VersionDefaultTypeInternal _Version_default_instance_; } // namespace compiler -template<> PROTOC_EXPORT ::google::protobuf::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage<::google::protobuf::compiler::CodeGeneratorRequest>(Arena*); -template<> PROTOC_EXPORT ::google::protobuf::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage<::google::protobuf::compiler::CodeGeneratorResponse>(Arena*); -template<> PROTOC_EXPORT ::google::protobuf::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage<::google::protobuf::compiler::CodeGeneratorResponse_File>(Arena*); -template<> PROTOC_EXPORT ::google::protobuf::compiler::Version* Arena::CreateMaybeMessage<::google::protobuf::compiler::Version>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage(Arena*); +template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage(Arena*); +template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage(Arena*); +template<> PROTOC_EXPORT PROTOBUF_NAMESPACE_ID::compiler::Version* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN namespace compiler { // =================================================================== class PROTOC_EXPORT Version final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.Version) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.Version) */ { public: Version(); virtual ~Version(); Version(const Version& from); - - inline Version& operator=(const Version& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Version(Version&& from) noexcept : Version() { *this = ::std::move(from); } + inline Version& operator=(const Version& from) { + CopyFrom(from); + return *this; + } inline Version& operator=(Version&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -116,15 +111,15 @@ class PROTOC_EXPORT Version final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Version& default_instance(); @@ -148,11 +143,11 @@ class PROTOC_EXPORT Version final : return CreateMaybeMessage(nullptr); } - Version* New(::google::protobuf::Arena* arena) const final { + Version* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Version& from); void MergeFrom(const Version& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -160,15 +155,15 @@ class PROTOC_EXPORT Version final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -176,12 +171,12 @@ class PROTOC_EXPORT Version final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Version* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.Version"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -189,7 +184,7 @@ class PROTOC_EXPORT Version final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -199,71 +194,67 @@ class PROTOC_EXPORT Version final : bool has_suffix() const; void clear_suffix(); static const int kSuffixFieldNumber = 4; - const ::std::string& suffix() const; - void set_suffix(const ::std::string& value); - #if LANG_CXX11 - void set_suffix(::std::string&& value); - #endif + const std::string& suffix() const; + void set_suffix(const std::string& value); + void set_suffix(std::string&& value); void set_suffix(const char* value); void set_suffix(const char* value, size_t size); - ::std::string* mutable_suffix(); - ::std::string* release_suffix(); - void set_allocated_suffix(::std::string* suffix); + std::string* mutable_suffix(); + std::string* release_suffix(); + void set_allocated_suffix(std::string* suffix); // optional int32 major = 1; bool has_major() const; void clear_major(); static const int kMajorFieldNumber = 1; - ::google::protobuf::int32 major() const; - void set_major(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 major() const; + void set_major(::PROTOBUF_NAMESPACE_ID::int32 value); // optional int32 minor = 2; bool has_minor() const; void clear_minor(); static const int kMinorFieldNumber = 2; - ::google::protobuf::int32 minor() const; - void set_minor(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 minor() const; + void set_minor(::PROTOBUF_NAMESPACE_ID::int32 value); // optional int32 patch = 3; bool has_patch() const; void clear_patch(); static const int kPatchFieldNumber = 3; - ::google::protobuf::int32 patch() const; - void set_patch(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 patch() const; + void set_patch(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.compiler.Version) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr suffix_; - ::google::protobuf::int32 major_; - ::google::protobuf::int32 minor_; - ::google::protobuf::int32 patch_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr suffix_; + ::PROTOBUF_NAMESPACE_ID::int32 major_; + ::PROTOBUF_NAMESPACE_ID::int32 minor_; + ::PROTOBUF_NAMESPACE_ID::int32 patch_; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; }; // ------------------------------------------------------------------- class PROTOC_EXPORT CodeGeneratorRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorRequest) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorRequest) */ { public: CodeGeneratorRequest(); virtual ~CodeGeneratorRequest(); CodeGeneratorRequest(const CodeGeneratorRequest& from); - - inline CodeGeneratorRequest& operator=(const CodeGeneratorRequest& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 CodeGeneratorRequest(CodeGeneratorRequest&& from) noexcept : CodeGeneratorRequest() { *this = ::std::move(from); } + inline CodeGeneratorRequest& operator=(const CodeGeneratorRequest& from) { + CopyFrom(from); + return *this; + } inline CodeGeneratorRequest& operator=(CodeGeneratorRequest&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -272,15 +263,15 @@ class PROTOC_EXPORT CodeGeneratorRequest final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const CodeGeneratorRequest& default_instance(); @@ -304,11 +295,11 @@ class PROTOC_EXPORT CodeGeneratorRequest final : return CreateMaybeMessage(nullptr); } - CodeGeneratorRequest* New(::google::protobuf::Arena* arena) const final { + CodeGeneratorRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const CodeGeneratorRequest& from); void MergeFrom(const CodeGeneratorRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -316,15 +307,15 @@ class PROTOC_EXPORT CodeGeneratorRequest final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -332,12 +323,12 @@ class PROTOC_EXPORT CodeGeneratorRequest final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CodeGeneratorRequest* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.CodeGeneratorRequest"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -345,7 +336,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -355,93 +346,85 @@ class PROTOC_EXPORT CodeGeneratorRequest final : int file_to_generate_size() const; void clear_file_to_generate(); static const int kFileToGenerateFieldNumber = 1; - const ::std::string& file_to_generate(int index) const; - ::std::string* mutable_file_to_generate(int index); - void set_file_to_generate(int index, const ::std::string& value); - #if LANG_CXX11 - void set_file_to_generate(int index, ::std::string&& value); - #endif + const std::string& file_to_generate(int index) const; + std::string* mutable_file_to_generate(int index); + void set_file_to_generate(int index, const std::string& value); + void set_file_to_generate(int index, std::string&& value); void set_file_to_generate(int index, const char* value); void set_file_to_generate(int index, const char* value, size_t size); - ::std::string* add_file_to_generate(); - void add_file_to_generate(const ::std::string& value); - #if LANG_CXX11 - void add_file_to_generate(::std::string&& value); - #endif + std::string* add_file_to_generate(); + void add_file_to_generate(const std::string& value); + void add_file_to_generate(std::string&& value); void add_file_to_generate(const char* value); void add_file_to_generate(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& file_to_generate() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_file_to_generate(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& file_to_generate() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_file_to_generate(); // repeated .google.protobuf.FileDescriptorProto proto_file = 15; int proto_file_size() const; void clear_proto_file(); static const int kProtoFileFieldNumber = 15; - ::google::protobuf::FileDescriptorProto* mutable_proto_file(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* + PROTOBUF_NAMESPACE_ID::FileDescriptorProto* mutable_proto_file(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >* mutable_proto_file(); - const ::google::protobuf::FileDescriptorProto& proto_file(int index) const; - ::google::protobuf::FileDescriptorProto* add_proto_file(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& proto_file(int index) const; + PROTOBUF_NAMESPACE_ID::FileDescriptorProto* add_proto_file(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& proto_file() const; // optional string parameter = 2; bool has_parameter() const; void clear_parameter(); static const int kParameterFieldNumber = 2; - const ::std::string& parameter() const; - void set_parameter(const ::std::string& value); - #if LANG_CXX11 - void set_parameter(::std::string&& value); - #endif + const std::string& parameter() const; + void set_parameter(const std::string& value); + void set_parameter(std::string&& value); void set_parameter(const char* value); void set_parameter(const char* value, size_t size); - ::std::string* mutable_parameter(); - ::std::string* release_parameter(); - void set_allocated_parameter(::std::string* parameter); + std::string* mutable_parameter(); + std::string* release_parameter(); + void set_allocated_parameter(std::string* parameter); // optional .google.protobuf.compiler.Version compiler_version = 3; bool has_compiler_version() const; void clear_compiler_version(); static const int kCompilerVersionFieldNumber = 3; - const ::google::protobuf::compiler::Version& compiler_version() const; - ::google::protobuf::compiler::Version* release_compiler_version(); - ::google::protobuf::compiler::Version* mutable_compiler_version(); - void set_allocated_compiler_version(::google::protobuf::compiler::Version* compiler_version); + const PROTOBUF_NAMESPACE_ID::compiler::Version& compiler_version() const; + PROTOBUF_NAMESPACE_ID::compiler::Version* release_compiler_version(); + PROTOBUF_NAMESPACE_ID::compiler::Version* mutable_compiler_version(); + void set_allocated_compiler_version(PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version); // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField<::std::string> file_to_generate_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > proto_file_; - ::google::protobuf::internal::ArenaStringPtr parameter_; - ::google::protobuf::compiler::Version* compiler_version_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField file_to_generate_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto > proto_file_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr parameter_; + PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version_; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; }; // ------------------------------------------------------------------- class PROTOC_EXPORT CodeGeneratorResponse_File final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse.File) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse.File) */ { public: CodeGeneratorResponse_File(); virtual ~CodeGeneratorResponse_File(); CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from); - - inline CodeGeneratorResponse_File& operator=(const CodeGeneratorResponse_File& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 CodeGeneratorResponse_File(CodeGeneratorResponse_File&& from) noexcept : CodeGeneratorResponse_File() { *this = ::std::move(from); } + inline CodeGeneratorResponse_File& operator=(const CodeGeneratorResponse_File& from) { + CopyFrom(from); + return *this; + } inline CodeGeneratorResponse_File& operator=(CodeGeneratorResponse_File&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -450,15 +433,15 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const CodeGeneratorResponse_File& default_instance(); @@ -482,11 +465,11 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : return CreateMaybeMessage(nullptr); } - CodeGeneratorResponse_File* New(::google::protobuf::Arena* arena) const final { + CodeGeneratorResponse_File* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const CodeGeneratorResponse_File& from); void MergeFrom(const CodeGeneratorResponse_File& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -494,15 +477,15 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -510,12 +493,12 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CodeGeneratorResponse_File* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.CodeGeneratorResponse.File"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -523,7 +506,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -533,79 +516,71 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final : bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); // optional string insertion_point = 2; bool has_insertion_point() const; void clear_insertion_point(); static const int kInsertionPointFieldNumber = 2; - const ::std::string& insertion_point() const; - void set_insertion_point(const ::std::string& value); - #if LANG_CXX11 - void set_insertion_point(::std::string&& value); - #endif + const std::string& insertion_point() const; + void set_insertion_point(const std::string& value); + void set_insertion_point(std::string&& value); void set_insertion_point(const char* value); void set_insertion_point(const char* value, size_t size); - ::std::string* mutable_insertion_point(); - ::std::string* release_insertion_point(); - void set_allocated_insertion_point(::std::string* insertion_point); + std::string* mutable_insertion_point(); + std::string* release_insertion_point(); + void set_allocated_insertion_point(std::string* insertion_point); // optional string content = 15; bool has_content() const; void clear_content(); static const int kContentFieldNumber = 15; - const ::std::string& content() const; - void set_content(const ::std::string& value); - #if LANG_CXX11 - void set_content(::std::string&& value); - #endif + const std::string& content() const; + void set_content(const std::string& value); + void set_content(std::string&& value); void set_content(const char* value); void set_content(const char* value, size_t size); - ::std::string* mutable_content(); - ::std::string* release_content(); - void set_allocated_content(::std::string* content); + std::string* mutable_content(); + std::string* release_content(); + void set_allocated_content(std::string* content); // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr insertion_point_; - ::google::protobuf::internal::ArenaStringPtr content_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr insertion_point_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; }; // ------------------------------------------------------------------- class PROTOC_EXPORT CodeGeneratorResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse) */ { public: CodeGeneratorResponse(); virtual ~CodeGeneratorResponse(); CodeGeneratorResponse(const CodeGeneratorResponse& from); - - inline CodeGeneratorResponse& operator=(const CodeGeneratorResponse& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 CodeGeneratorResponse(CodeGeneratorResponse&& from) noexcept : CodeGeneratorResponse() { *this = ::std::move(from); } + inline CodeGeneratorResponse& operator=(const CodeGeneratorResponse& from) { + CopyFrom(from); + return *this; + } inline CodeGeneratorResponse& operator=(CodeGeneratorResponse&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -614,15 +589,15 @@ class PROTOC_EXPORT CodeGeneratorResponse final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const CodeGeneratorResponse& default_instance(); @@ -646,11 +621,11 @@ class PROTOC_EXPORT CodeGeneratorResponse final : return CreateMaybeMessage(nullptr); } - CodeGeneratorResponse* New(::google::protobuf::Arena* arena) const final { + CodeGeneratorResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const CodeGeneratorResponse& from); void MergeFrom(const CodeGeneratorResponse& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -658,15 +633,15 @@ class PROTOC_EXPORT CodeGeneratorResponse final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -674,12 +649,12 @@ class PROTOC_EXPORT CodeGeneratorResponse final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CodeGeneratorResponse* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.compiler.CodeGeneratorResponse"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -687,7 +662,7 @@ class PROTOC_EXPORT CodeGeneratorResponse final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -699,38 +674,36 @@ class PROTOC_EXPORT CodeGeneratorResponse final : int file_size() const; void clear_file(); static const int kFileFieldNumber = 15; - ::google::protobuf::compiler::CodeGeneratorResponse_File* mutable_file(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >* + PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* mutable_file(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >* mutable_file(); - const ::google::protobuf::compiler::CodeGeneratorResponse_File& file(int index) const; - ::google::protobuf::compiler::CodeGeneratorResponse_File* add_file(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >& + const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& file(int index) const; + PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* add_file(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >& file() const; // optional string error = 1; bool has_error() const; void clear_error(); static const int kErrorFieldNumber = 1; - const ::std::string& error() const; - void set_error(const ::std::string& value); - #if LANG_CXX11 - void set_error(::std::string&& value); - #endif + const std::string& error() const; + void set_error(const std::string& value); + void set_error(std::string&& value); void set_error(const char* value); void set_error(const char* value, size_t size); - ::std::string* mutable_error(); - ::std::string* release_error(); - void set_allocated_error(::std::string* error); + std::string* mutable_error(); + std::string* release_error(); + void set_allocated_error(std::string* error); // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File > file_; - ::google::protobuf::internal::ArenaStringPtr error_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File > file_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_; friend struct ::TableStruct_google_2fprotobuf_2fcompiler_2fplugin_2eproto; }; // =================================================================== @@ -752,11 +725,11 @@ inline void Version::clear_major() { major_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::google::protobuf::int32 Version::major() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::major() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.major) return major_; } -inline void Version::set_major(::google::protobuf::int32 value) { +inline void Version::set_major(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; major_ = value; // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.major) @@ -770,11 +743,11 @@ inline void Version::clear_minor() { minor_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::google::protobuf::int32 Version::minor() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::minor() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.minor) return minor_; } -inline void Version::set_minor(::google::protobuf::int32 value) { +inline void Version::set_minor(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; minor_ = value; // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.minor) @@ -788,11 +761,11 @@ inline void Version::clear_patch() { patch_ = 0; _has_bits_[0] &= ~0x00000008u; } -inline ::google::protobuf::int32 Version::patch() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 Version::patch() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.patch) return patch_; } -inline void Version::set_patch(::google::protobuf::int32 value) { +inline void Version::set_patch(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000008u; patch_ = value; // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.patch) @@ -803,58 +776,56 @@ inline bool Version::has_suffix() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void Version::clear_suffix() { - suffix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + suffix_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& Version::suffix() const { +inline const std::string& Version::suffix() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.Version.suffix) return suffix_.GetNoArena(); } -inline void Version::set_suffix(const ::std::string& value) { +inline void Version::set_suffix(const std::string& value) { _has_bits_[0] |= 0x00000001u; - suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + suffix_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix) } -#if LANG_CXX11 -inline void Version::set_suffix(::std::string&& value) { +inline void Version::set_suffix(std::string&& value) { _has_bits_[0] |= 0x00000001u; suffix_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.Version.suffix) } -#endif inline void Version::set_suffix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + suffix_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.Version.suffix) } inline void Version::set_suffix(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + suffix_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.Version.suffix) } -inline ::std::string* Version::mutable_suffix() { +inline std::string* Version::mutable_suffix() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.Version.suffix) - return suffix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return suffix_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Version::release_suffix() { +inline std::string* Version::release_suffix() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.Version.suffix) if (!has_suffix()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return suffix_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return suffix_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Version::set_allocated_suffix(::std::string* suffix) { +inline void Version::set_allocated_suffix(std::string* suffix) { if (suffix != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - suffix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), suffix); + suffix_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), suffix); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.Version.suffix) } @@ -869,24 +840,22 @@ inline int CodeGeneratorRequest::file_to_generate_size() const { inline void CodeGeneratorRequest::clear_file_to_generate() { file_to_generate_.Clear(); } -inline const ::std::string& CodeGeneratorRequest::file_to_generate(int index) const { +inline const std::string& CodeGeneratorRequest::file_to_generate(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) return file_to_generate_.Get(index); } -inline ::std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) { +inline std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) return file_to_generate_.Mutable(index); } -inline void CodeGeneratorRequest::set_file_to_generate(int index, const ::std::string& value) { +inline void CodeGeneratorRequest::set_file_to_generate(int index, const std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) file_to_generate_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void CodeGeneratorRequest::set_file_to_generate(int index, ::std::string&& value) { +inline void CodeGeneratorRequest::set_file_to_generate(int index, std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) file_to_generate_.Mutable(index)->assign(std::move(value)); } -#endif inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); file_to_generate_.Mutable(index)->assign(value); @@ -897,20 +866,18 @@ inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* va reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } -inline ::std::string* CodeGeneratorRequest::add_file_to_generate() { +inline std::string* CodeGeneratorRequest::add_file_to_generate() { // @@protoc_insertion_point(field_add_mutable:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) return file_to_generate_.Add(); } -inline void CodeGeneratorRequest::add_file_to_generate(const ::std::string& value) { +inline void CodeGeneratorRequest::add_file_to_generate(const std::string& value) { file_to_generate_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } -#if LANG_CXX11 -inline void CodeGeneratorRequest::add_file_to_generate(::std::string&& value) { +inline void CodeGeneratorRequest::add_file_to_generate(std::string&& value) { file_to_generate_.Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } -#endif inline void CodeGeneratorRequest::add_file_to_generate(const char* value) { GOOGLE_DCHECK(value != nullptr); file_to_generate_.Add()->assign(value); @@ -920,12 +887,12 @@ inline void CodeGeneratorRequest::add_file_to_generate(const char* value, size_t file_to_generate_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& CodeGeneratorRequest::file_to_generate() const { // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) return file_to_generate_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* CodeGeneratorRequest::mutable_file_to_generate() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.file_to_generate) return &file_to_generate_; @@ -936,58 +903,56 @@ inline bool CodeGeneratorRequest::has_parameter() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void CodeGeneratorRequest::clear_parameter() { - parameter_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + parameter_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& CodeGeneratorRequest::parameter() const { +inline const std::string& CodeGeneratorRequest::parameter() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.parameter) return parameter_.GetNoArena(); } -inline void CodeGeneratorRequest::set_parameter(const ::std::string& value) { +inline void CodeGeneratorRequest::set_parameter(const std::string& value) { _has_bits_[0] |= 0x00000001u; - parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + parameter_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter) } -#if LANG_CXX11 -inline void CodeGeneratorRequest::set_parameter(::std::string&& value) { +inline void CodeGeneratorRequest::set_parameter(std::string&& value) { _has_bits_[0] |= 0x00000001u; parameter_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorRequest.parameter) } -#endif inline void CodeGeneratorRequest::set_parameter(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + parameter_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorRequest.parameter) } inline void CodeGeneratorRequest::set_parameter(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + parameter_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorRequest.parameter) } -inline ::std::string* CodeGeneratorRequest::mutable_parameter() { +inline std::string* CodeGeneratorRequest::mutable_parameter() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.parameter) - return parameter_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return parameter_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* CodeGeneratorRequest::release_parameter() { +inline std::string* CodeGeneratorRequest::release_parameter() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.parameter) if (!has_parameter()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return parameter_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return parameter_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void CodeGeneratorRequest::set_allocated_parameter(::std::string* parameter) { +inline void CodeGeneratorRequest::set_allocated_parameter(std::string* parameter) { if (parameter != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - parameter_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), parameter); + parameter_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), parameter); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorRequest.parameter) } @@ -995,24 +960,24 @@ inline void CodeGeneratorRequest::set_allocated_parameter(::std::string* paramet inline int CodeGeneratorRequest::proto_file_size() const { return proto_file_.size(); } -inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::mutable_proto_file(int index) { +inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::mutable_proto_file(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.proto_file) return proto_file_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >* CodeGeneratorRequest::mutable_proto_file() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file) return &proto_file_; } -inline const ::google::protobuf::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const { +inline const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.proto_file) return proto_file_.Get(index); } -inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() { +inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() { // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorRequest.proto_file) return proto_file_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& CodeGeneratorRequest::proto_file() const { // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorRequest.proto_file) return proto_file_; @@ -1026,37 +991,37 @@ inline void CodeGeneratorRequest::clear_compiler_version() { if (compiler_version_ != nullptr) compiler_version_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const ::google::protobuf::compiler::Version& CodeGeneratorRequest::compiler_version() const { - const ::google::protobuf::compiler::Version* p = compiler_version_; +inline const PROTOBUF_NAMESPACE_ID::compiler::Version& CodeGeneratorRequest::compiler_version() const { + const PROTOBUF_NAMESPACE_ID::compiler::Version* p = compiler_version_; // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorRequest.compiler_version) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::compiler::_Version_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::compiler::_Version_default_instance_); } -inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::release_compiler_version() { +inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::release_compiler_version() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorRequest.compiler_version) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::compiler::Version* temp = compiler_version_; + PROTOBUF_NAMESPACE_ID::compiler::Version* temp = compiler_version_; compiler_version_ = nullptr; return temp; } -inline ::google::protobuf::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() { +inline PROTOBUF_NAMESPACE_ID::compiler::Version* CodeGeneratorRequest::mutable_compiler_version() { _has_bits_[0] |= 0x00000002u; if (compiler_version_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::compiler::Version>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); compiler_version_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorRequest.compiler_version) return compiler_version_; } -inline void CodeGeneratorRequest::set_allocated_compiler_version(::google::protobuf::compiler::Version* compiler_version) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void CodeGeneratorRequest::set_allocated_compiler_version(PROTOBUF_NAMESPACE_ID::compiler::Version* compiler_version) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete compiler_version_; } if (compiler_version) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - compiler_version = ::google::protobuf::internal::GetOwnedMessage( + compiler_version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, compiler_version, submessage_arena); } _has_bits_[0] |= 0x00000002u; @@ -1076,58 +1041,56 @@ inline bool CodeGeneratorResponse_File::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void CodeGeneratorResponse_File::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& CodeGeneratorResponse_File::name() const { +inline const std::string& CodeGeneratorResponse_File::name() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.name) return name_.GetNoArena(); } -inline void CodeGeneratorResponse_File::set_name(const ::std::string& value) { +inline void CodeGeneratorResponse_File::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name) } -#if LANG_CXX11 -inline void CodeGeneratorResponse_File::set_name(::std::string&& value) { +inline void CodeGeneratorResponse_File::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.name) } -#endif inline void CodeGeneratorResponse_File::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.name) } inline void CodeGeneratorResponse_File::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.name) } -inline ::std::string* CodeGeneratorResponse_File::mutable_name() { +inline std::string* CodeGeneratorResponse_File::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* CodeGeneratorResponse_File::release_name() { +inline std::string* CodeGeneratorResponse_File::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void CodeGeneratorResponse_File::set_allocated_name(::std::string* name) { +inline void CodeGeneratorResponse_File::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.name) } @@ -1136,58 +1099,56 @@ inline bool CodeGeneratorResponse_File::has_insertion_point() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void CodeGeneratorResponse_File::clear_insertion_point() { - insertion_point_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + insertion_point_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _has_bits_[0] &= ~0x00000002u; } -inline const ::std::string& CodeGeneratorResponse_File::insertion_point() const { +inline const std::string& CodeGeneratorResponse_File::insertion_point() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) return insertion_point_.GetNoArena(); } -inline void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) { +inline void CodeGeneratorResponse_File::set_insertion_point(const std::string& value) { _has_bits_[0] |= 0x00000002u; - insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + insertion_point_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } -#if LANG_CXX11 -inline void CodeGeneratorResponse_File::set_insertion_point(::std::string&& value) { +inline void CodeGeneratorResponse_File::set_insertion_point(std::string&& value) { _has_bits_[0] |= 0x00000002u; insertion_point_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } -#endif inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + insertion_point_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } inline void CodeGeneratorResponse_File::set_insertion_point(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; - insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + insertion_point_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } -inline ::std::string* CodeGeneratorResponse_File::mutable_insertion_point() { +inline std::string* CodeGeneratorResponse_File::mutable_insertion_point() { _has_bits_[0] |= 0x00000002u; // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) - return insertion_point_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return insertion_point_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* CodeGeneratorResponse_File::release_insertion_point() { +inline std::string* CodeGeneratorResponse_File::release_insertion_point() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) if (!has_insertion_point()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return insertion_point_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return insertion_point_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void CodeGeneratorResponse_File::set_allocated_insertion_point(::std::string* insertion_point) { +inline void CodeGeneratorResponse_File::set_allocated_insertion_point(std::string* insertion_point) { if (insertion_point != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - insertion_point_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), insertion_point); + insertion_point_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), insertion_point); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } @@ -1196,58 +1157,56 @@ inline bool CodeGeneratorResponse_File::has_content() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void CodeGeneratorResponse_File::clear_content() { - content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + content_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _has_bits_[0] &= ~0x00000004u; } -inline const ::std::string& CodeGeneratorResponse_File::content() const { +inline const std::string& CodeGeneratorResponse_File::content() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.File.content) return content_.GetNoArena(); } -inline void CodeGeneratorResponse_File::set_content(const ::std::string& value) { +inline void CodeGeneratorResponse_File::set_content(const std::string& value) { _has_bits_[0] |= 0x00000004u; - content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content) } -#if LANG_CXX11 -inline void CodeGeneratorResponse_File::set_content(::std::string&& value) { +inline void CodeGeneratorResponse_File::set_content(std::string&& value) { _has_bits_[0] |= 0x00000004u; content_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.content) } -#endif inline void CodeGeneratorResponse_File::set_content(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; - content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.File.content) } inline void CodeGeneratorResponse_File::set_content(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; - content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.File.content) } -inline ::std::string* CodeGeneratorResponse_File::mutable_content() { +inline std::string* CodeGeneratorResponse_File::mutable_content() { _has_bits_[0] |= 0x00000004u; // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.File.content) - return content_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return content_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* CodeGeneratorResponse_File::release_content() { +inline std::string* CodeGeneratorResponse_File::release_content() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.File.content) if (!has_content()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return content_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return content_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void CodeGeneratorResponse_File::set_allocated_content(::std::string* content) { +inline void CodeGeneratorResponse_File::set_allocated_content(std::string* content) { if (content != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - content_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), content); + content_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.File.content) } @@ -1260,58 +1219,56 @@ inline bool CodeGeneratorResponse::has_error() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void CodeGeneratorResponse::clear_error() { - error_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& CodeGeneratorResponse::error() const { +inline const std::string& CodeGeneratorResponse::error() const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.error) return error_.GetNoArena(); } -inline void CodeGeneratorResponse::set_error(const ::std::string& value) { +inline void CodeGeneratorResponse::set_error(const std::string& value) { _has_bits_[0] |= 0x00000001u; - error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error) } -#if LANG_CXX11 -inline void CodeGeneratorResponse::set_error(::std::string&& value) { +inline void CodeGeneratorResponse::set_error(std::string&& value) { _has_bits_[0] |= 0x00000001u; error_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.error) } -#endif inline void CodeGeneratorResponse::set_error(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.compiler.CodeGeneratorResponse.error) } inline void CodeGeneratorResponse::set_error(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + error_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.compiler.CodeGeneratorResponse.error) } -inline ::std::string* CodeGeneratorResponse::mutable_error() { +inline std::string* CodeGeneratorResponse::mutable_error() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.error) - return error_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* CodeGeneratorResponse::release_error() { +inline std::string* CodeGeneratorResponse::release_error() { // @@protoc_insertion_point(field_release:google.protobuf.compiler.CodeGeneratorResponse.error) if (!has_error()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return error_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_.ReleaseNonDefaultNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void CodeGeneratorResponse::set_allocated_error(::std::string* error) { +inline void CodeGeneratorResponse::set_allocated_error(std::string* error) { if (error != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - error_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error); + error_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error); // @@protoc_insertion_point(field_set_allocated:google.protobuf.compiler.CodeGeneratorResponse.error) } @@ -1322,24 +1279,24 @@ inline int CodeGeneratorResponse::file_size() const { inline void CodeGeneratorResponse::clear_file() { file_.Clear(); } -inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index) { +inline PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.compiler.CodeGeneratorResponse.file) return file_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >* CodeGeneratorResponse::mutable_file() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.compiler.CodeGeneratorResponse.file) return &file_; } -inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const { +inline const PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.compiler.CodeGeneratorResponse.file) return file_.Get(index); } -inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() { +inline PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() { // @@protoc_insertion_point(field_add:google.protobuf.compiler.CodeGeneratorResponse.file) return file_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse_File >& CodeGeneratorResponse::file() const { // @@protoc_insertion_point(field_list:google.protobuf.compiler.CodeGeneratorResponse.file) return file_; @@ -1358,10 +1315,9 @@ CodeGeneratorResponse::file() const { // @@protoc_insertion_point(namespace_scope) } // namespace compiler -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fcompiler_2fplugin_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fcompiler_2fplugin_2eproto diff --git a/src/google/protobuf/compiler/python/python_generator.cc b/src/google/protobuf/compiler/python/python_generator.cc index 5009b24472..f652ef6584 100644 --- a/src/google/protobuf/compiler/python/python_generator.cc +++ b/src/google/protobuf/compiler/python/python_generator.cc @@ -80,28 +80,26 @@ bool StrEndsWith(StringPiece sp, StringPiece x) { // Returns a copy of |filename| with any trailing ".protodevel" or ".proto // suffix stripped. // TODO(robinson): Unify with copy in compiler/cpp/internal/helpers.cc. -string StripProto(const string& filename) { +std::string StripProto(const std::string& filename) { const char* suffix = StrEndsWith(filename, ".protodevel") ? ".protodevel" : ".proto"; return StripSuffixString(filename, suffix); } - // Returns the Python module name expected for a given .proto filename. -string ModuleName(const string& filename) { - string basename = StripProto(filename); +std::string ModuleName(const std::string& filename) { + std::string basename = StripProto(filename); ReplaceCharacters(&basename, "-", '_'); ReplaceCharacters(&basename, "/", '.'); return basename + "_pb2"; } - // Returns the alias we assign to the module of the given .proto filename // when importing. See testPackageInitializationImport in // net/proto2/python/internal/reflection_test.py // to see why we need the alias. -string ModuleAlias(const string& filename) { - string module_name = ModuleName(filename); +std::string ModuleAlias(const std::string& filename) { + std::string module_name = ModuleName(filename); // We can't have dots in the module name, so we replace each with _dot_. // But that could lead to a collision between a.b and a_dot_b, so we also // duplicate each underscore. @@ -121,8 +119,8 @@ const char* const kKeywords[] = { const char* const* kKeywordsEnd = kKeywords + (sizeof(kKeywords) / sizeof(kKeywords[0])); -bool ContainsPythonKeyword(const string& module_name) { - std::vector tokens = Split(module_name, "."); +bool ContainsPythonKeyword(const std::string& module_name) { + std::vector tokens = Split(module_name, "."); for (int i = 0; i < tokens.size(); ++i) { if (std::find(kKeywords, kKeywordsEnd, tokens[i]) != kKeywordsEnd) { return true; @@ -131,14 +129,13 @@ bool ContainsPythonKeyword(const string& module_name) { return false; } - // Returns the name of all containing types for descriptor, // in order from outermost to innermost, followed by descriptor's // own name. Each name is separated by |separator|. template -string NamePrefixedWithNestedTypes(const DescriptorT& descriptor, - const string& separator) { - string name = descriptor.name(); +std::string NamePrefixedWithNestedTypes(const DescriptorT& descriptor, + const std::string& separator) { + std::string name = descriptor.name(); for (const Descriptor* current = descriptor.containing_type(); current != NULL; current = current->containing_type()) { name = current->name() + separator + name; @@ -146,7 +143,6 @@ string NamePrefixedWithNestedTypes(const DescriptorT& descriptor, return name; } - // Name of the class attribute where we store the Python // descriptor.Descriptor instance for the generated class. // Must stay consistent with the _DESCRIPTOR_KEY constant @@ -212,7 +208,7 @@ void PrintTopBoilerplate( // //compiler/cpp/internal/primitive_field.cc // //compiler/cpp/internal/enum_field.cc // //compiler/cpp/internal/string_field.cc -string StringifyDefaultValue(const FieldDescriptor& field) { +std::string StringifyDefaultValue(const FieldDescriptor& field) { if (field.is_repeated()) { return "[]"; } @@ -278,7 +274,7 @@ string StringifyDefaultValue(const FieldDescriptor& field) { return ""; } -string StringifySyntax(FileDescriptor::Syntax syntax) { +std::string StringifySyntax(FileDescriptor::Syntax syntax) { switch (syntax) { case FileDescriptor::SYNTAX_PROTO2: return "proto2"; @@ -292,7 +288,6 @@ string StringifySyntax(FileDescriptor::Syntax syntax) { } } - } // namespace @@ -303,9 +298,8 @@ Generator::~Generator() { } bool Generator::Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { + const std::string& parameter, + GeneratorContext* context, std::string* error) const { // Completely serialize all Generate() calls on this instance. The // thread-safety constraints of the CodeGenerator interface aren't clear so @@ -316,8 +310,8 @@ bool Generator::Generate(const FileDescriptor* file, // to have any mutable members. Then it is implicitly thread-safe. MutexLock lock(&mutex_); file_ = file; - string module_name = ModuleName(file->name()); - string filename = module_name; + std::string module_name = ModuleName(file->name()); + std::string filename = module_name; ReplaceCharacters(&filename, ".", '/'); filename += ".py"; @@ -366,8 +360,8 @@ bool Generator::Generate(const FileDescriptor* file, // Our sys.path has google3/third_party/py/ in it. All modules from // that tree need to be imported using just their own name. // See http://go/ThirdPartyPython -void StripThirdPartyPy(string* module_name) { - const string third_party_py_prefix = "google3.third_party.py."; +void StripThirdPartyPy(std::string* module_name) { + const std::string third_party_py_prefix = "google3.third_party.py."; int len = third_party_py_prefix.length(); if (module_name->compare(0, len, third_party_py_prefix, 0, @@ -380,10 +374,10 @@ void StripThirdPartyPy(string* module_name) { // Prints Python imports for all modules imported by |file|. void Generator::PrintImports() const { for (int i = 0; i < file_->dependency_count(); ++i) { - const string& filename = file_->dependency(i)->name(); + const std::string& filename = file_->dependency(i)->name(); - string module_name = ModuleName(filename); - string module_alias = ModuleAlias(filename); + std::string module_name = ModuleName(filename); + std::string module_alias = ModuleAlias(filename); // BEGIN GOOGLE-INTERNAL StripThirdPartyPy(&module_name); // END GOOGLE-INTERNAL @@ -397,8 +391,8 @@ void Generator::PrintImports() const { module_alias, "name", module_name); } else { int last_dot_pos = module_name.rfind('.'); - string import_statement; - if (last_dot_pos == string::npos) { + std::string import_statement; + if (last_dot_pos == std::string::npos) { // NOTE(petya): this is not tested as it would require a protocol buffer // outside of any package, and I don't think that is easily achievable. import_statement = "import " + module_name; @@ -416,7 +410,7 @@ void Generator::PrintImports() const { // Print public imports. for (int i = 0; i < file_->public_dependency_count(); ++i) { - string module_name = ModuleName(file_->public_dependency(i)->name()); + std::string module_name = ModuleName(file_->public_dependency(i)->name()); // BEGIN GOOGLE-INTERNAL StripThirdPartyPy(&module_name); // END GOOGLE-INTERNAL @@ -427,7 +421,7 @@ void Generator::PrintImports() const { // Prints the single file descriptor for this file. void Generator::PrintFileDescriptor() const { - std::map m; + std::map m; m["descriptor_name"] = kDescriptorKey; m["name"] = file_->name(); m["package"] = file_->package(); @@ -448,7 +442,7 @@ void Generator::PrintFileDescriptor() const { if (file_->dependency_count() != 0) { printer_->Print(",\ndependencies=["); for (int i = 0; i < file_->dependency_count(); ++i) { - string module_alias = ModuleAlias(file_->dependency(i)->name()); + std::string module_alias = ModuleAlias(file_->dependency(i)->name()); printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias", module_alias); } @@ -457,7 +451,8 @@ void Generator::PrintFileDescriptor() const { if (file_->public_dependency_count() > 0) { printer_->Print(",\npublic_dependencies=["); for (int i = 0; i < file_->public_dependency_count(); ++i) { - string module_alias = ModuleAlias(file_->public_dependency(i)->name()); + std::string module_alias = + ModuleAlias(file_->public_dependency(i)->name()); printer_->Print("$module_alias$.DESCRIPTOR,", "module_alias", module_alias); } @@ -475,7 +470,7 @@ void Generator::PrintFileDescriptor() const { // Prints descriptors and module-level constants for all top-level // enums defined in |file|. void Generator::PrintTopLevelEnums() const { - std::vector > top_level_enum_values; + std::vector > top_level_enum_values; for (int i = 0; i < file_->enum_type_count(); ++i) { const EnumDescriptor& enum_descriptor = *file_->enum_type(i); PrintEnum(enum_descriptor); @@ -512,8 +507,8 @@ void Generator::PrintAllNestedEnumsInFile() const { // enum name to a Python EnumDescriptor object equivalent to // enum_descriptor. void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const { - std::map m; - string module_level_descriptor_name = + std::map m; + std::string module_level_descriptor_name = ModuleLevelDescriptorName(enum_descriptor); m["descriptor_name"] = module_level_descriptor_name; m["name"] = enum_descriptor.name(); @@ -526,7 +521,7 @@ void Generator::PrintEnum(const EnumDescriptor& enum_descriptor) const { " filename=None,\n" " file=$file$,\n" " values=[\n"; - string options_string; + std::string options_string; enum_descriptor.options().SerializeToString(&options_string); printer_->Print(m, enum_descriptor_template); printer_->Indent(); @@ -566,7 +561,7 @@ void Generator::PrintTopLevelExtensions() const { const bool is_extension = true; for (int i = 0; i < file_->extension_count(); ++i) { const FieldDescriptor& extension_field = *file_->extension(i); - string constant_name = extension_field.name() + "_FIELD_NUMBER"; + std::string constant_name = extension_field.name() + "_FIELD_NUMBER"; UpperString(&constant_name); printer_->Print("$constant_name$ = $number$\n", "constant_name", constant_name, "number", @@ -605,15 +600,15 @@ void Generator::PrintServices() const { void Generator::PrintServiceDescriptor( const ServiceDescriptor& descriptor) const { printer_->Print("\n"); - string service_name = ModuleLevelServiceDescriptorName(descriptor); - string options_string; + std::string service_name = ModuleLevelServiceDescriptorName(descriptor); + std::string options_string; descriptor.options().SerializeToString(&options_string); printer_->Print( "$service_name$ = _descriptor.ServiceDescriptor(\n", "service_name", service_name); printer_->Indent(); - std::map m; + std::map m; m["name"] = descriptor.name(); m["full_name"] = descriptor.full_name(); m["file"] = kDescriptorKey; @@ -712,7 +707,7 @@ void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { "descriptor_name", ModuleLevelDescriptorName(message_descriptor)); printer_->Indent(); - std::map m; + std::map m; m["name"] = message_descriptor.name(); m["full_name"] = message_descriptor.full_name(); m["file"] = kDescriptorKey; @@ -729,8 +724,8 @@ void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { // Nested types printer_->Print("nested_types=["); for (int i = 0; i < message_descriptor.nested_type_count(); ++i) { - const string nested_name = ModuleLevelDescriptorName( - *message_descriptor.nested_type(i)); + const std::string nested_name = + ModuleLevelDescriptorName(*message_descriptor.nested_type(i)); printer_->Print("$name$, ", "name", nested_name); } printer_->Print("],\n"); @@ -739,14 +734,14 @@ void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { printer_->Print("enum_types=[\n"); printer_->Indent(); for (int i = 0; i < message_descriptor.enum_type_count(); ++i) { - const string descriptor_name = ModuleLevelDescriptorName( - *message_descriptor.enum_type(i)); + const std::string descriptor_name = + ModuleLevelDescriptorName(*message_descriptor.enum_type(i)); printer_->Print(descriptor_name.c_str()); printer_->Print(",\n"); } printer_->Outdent(); printer_->Print("],\n"); - string options_string; + std::string options_string; message_descriptor.options().SerializeToString(&options_string); printer_->Print( "serialized_options=$options_value$,\n" @@ -771,11 +766,11 @@ void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { printer_->Indent(); for (int i = 0; i < message_descriptor.oneof_decl_count(); ++i) { const OneofDescriptor* desc = message_descriptor.oneof_decl(i); - std::map m; + std::map m; m["name"] = desc->name(); m["full_name"] = desc->full_name(); m["index"] = StrCat(desc->index()); - string options_string = + std::string options_string = OptionsValue(desc->options().SerializeAsString()); if (options_string == "None") { m["serialized_options"] = ""; @@ -813,7 +808,7 @@ void Generator::PrintNestedDescriptors( // Prints all messages in |file|. void Generator::PrintMessages() const { for (int i = 0; i < file_->message_type_count(); ++i) { - std::vector to_register; + std::vector to_register; PrintMessage(*file_->message_type(i), "", &to_register, false); for (int j = 0; j < to_register.size(); ++j) { printer_->Print("_sym_db.RegisterMessage($name$)\n", "name", @@ -832,10 +827,10 @@ void Generator::PrintMessages() const { // Mutually recursive with PrintNestedMessages(). // Collect nested message names to_register for the symbol_database. void Generator::PrintMessage(const Descriptor& message_descriptor, - const string& prefix, - std::vector* to_register, + const std::string& prefix, + std::vector* to_register, bool is_nested) const { - string qualified_name(prefix + message_descriptor.name()); + std::string qualified_name(prefix + message_descriptor.name()); to_register->push_back(qualified_name); if (is_nested) { printer_->Print( @@ -851,7 +846,7 @@ void Generator::PrintMessage(const Descriptor& message_descriptor, printer_->Indent(); PrintNestedMessages(message_descriptor, qualified_name + ".", to_register); - std::map m; + std::map m; m["descriptor_key"] = kDescriptorKey; m["descriptor_name"] = ModuleLevelDescriptorName(message_descriptor); printer_->Print(m, "'$descriptor_key$' : $descriptor_name$,\n"); @@ -865,9 +860,9 @@ void Generator::PrintMessage(const Descriptor& message_descriptor, // Prints all nested messages within |containing_descriptor|. // Mutually recursive with PrintMessage(). -void Generator::PrintNestedMessages(const Descriptor& containing_descriptor, - const string& prefix, - std::vector* to_register) const { +void Generator::PrintNestedMessages( + const Descriptor& containing_descriptor, const std::string& prefix, + std::vector* to_register) const { for (int i = 0; i < containing_descriptor.nested_type_count(); ++i) { printer_->Print("\n"); PrintMessage(*containing_descriptor.nested_type(i), prefix, to_register, @@ -901,7 +896,7 @@ void Generator::FixForeignFieldsInDescriptor( FixContainingTypeInDescriptor(enum_descriptor, &descriptor); } for (int i = 0; i < descriptor.oneof_decl_count(); ++i) { - std::map m; + std::map m; const OneofDescriptor* oneof = descriptor.oneof_decl(i); m["descriptor_name"] = ModuleLevelDescriptorName(descriptor); m["oneof_name"] = oneof->name(); @@ -920,7 +915,7 @@ void Generator::FixForeignFieldsInDescriptor( } void Generator::AddMessageToFileDescriptor(const Descriptor& descriptor) const { - std::map m; + std::map m; m["descriptor_name"] = kDescriptorKey; m["message_name"] = descriptor.name(); m["message_descriptor_name"] = ModuleLevelDescriptorName(descriptor); @@ -932,7 +927,7 @@ void Generator::AddMessageToFileDescriptor(const Descriptor& descriptor) const { void Generator::AddServiceToFileDescriptor( const ServiceDescriptor& descriptor) const { - std::map m; + std::map m; m["descriptor_name"] = kDescriptorKey; m["service_name"] = descriptor.name(); m["service_descriptor_name"] = ModuleLevelServiceDescriptorName(descriptor); @@ -944,7 +939,7 @@ void Generator::AddServiceToFileDescriptor( void Generator::AddEnumToFileDescriptor( const EnumDescriptor& descriptor) const { - std::map m; + std::map m; m["descriptor_name"] = kDescriptorKey; m["enum_name"] = descriptor.name(); m["enum_descriptor_name"] = ModuleLevelDescriptorName(descriptor); @@ -956,7 +951,7 @@ void Generator::AddEnumToFileDescriptor( void Generator::AddExtensionToFileDescriptor( const FieldDescriptor& descriptor) const { - std::map m; + std::map m; m["descriptor_name"] = kDescriptorKey; m["field_name"] = descriptor.name(); const char file_descriptor_template[] = @@ -974,12 +969,12 @@ void Generator::AddExtensionToFileDescriptor( // look the field up in the containing type. (e.g., fields_by_name // or extensions_by_name). We ignore python_dict_name if containing_type // is NULL. -void Generator::FixForeignFieldsInField(const Descriptor* containing_type, - const FieldDescriptor& field, - const string& python_dict_name) const { - const string field_referencing_expression = FieldReferencingExpression( - containing_type, field, python_dict_name); - std::map m; +void Generator::FixForeignFieldsInField( + const Descriptor* containing_type, const FieldDescriptor& field, + const std::string& python_dict_name) const { + const std::string field_referencing_expression = + FieldReferencingExpression(containing_type, field, python_dict_name); + std::map m; m["field_ref"] = field_referencing_expression; const Descriptor* foreign_message_type = field.message_type(); if (foreign_message_type) { @@ -1002,10 +997,9 @@ void Generator::FixForeignFieldsInField(const Descriptor* containing_type, // look the field up in the containing type. (e.g., fields_by_name // or extensions_by_name). We ignore python_dict_name if containing_type // is NULL. -string Generator::FieldReferencingExpression( - const Descriptor* containing_type, - const FieldDescriptor& field, - const string& python_dict_name) const { +std::string Generator::FieldReferencingExpression( + const Descriptor* containing_type, const FieldDescriptor& field, + const std::string& python_dict_name) const { // We should only ever be looking up fields in the current file. // The only things we refer to from other files are message descriptors. GOOGLE_CHECK_EQ(field.file(), file_) << field.file()->name() << " vs. " @@ -1025,9 +1019,9 @@ void Generator::FixContainingTypeInDescriptor( const DescriptorT& descriptor, const Descriptor* containing_descriptor) const { if (containing_descriptor != NULL) { - const string nested_name = ModuleLevelDescriptorName(descriptor); - const string parent_name = ModuleLevelDescriptorName( - *containing_descriptor); + const std::string nested_name = ModuleLevelDescriptorName(descriptor); + const std::string parent_name = + ModuleLevelDescriptorName(*containing_descriptor); printer_->Print( "$nested_name$.containing_type = $parent_name$\n", "nested_name", nested_name, @@ -1082,7 +1076,7 @@ void Generator::FixForeignFieldsInExtension( FixForeignFieldsInField(extension_field.extension_scope(), extension_field, "extensions_by_name"); - std::map m; + std::map m; // Confusingly, for FieldDescriptors that happen to be extensions, // containing_type() means "extended type." // On the other hand, extension_scope() will give us what we normally @@ -1113,9 +1107,9 @@ void Generator::PrintEnumValueDescriptor( const EnumValueDescriptor& descriptor) const { // TODO(robinson): Fix up EnumValueDescriptor "type" fields. // More circular references. ::sigh:: - string options_string; + std::string options_string; descriptor.options().SerializeToString(&options_string); - std::map m; + std::map m; m["name"] = descriptor.name(); m["index"] = StrCat(descriptor.index()); m["number"] = StrCat(descriptor.number()); @@ -1129,7 +1123,8 @@ void Generator::PrintEnumValueDescriptor( } // Returns a CEscaped string of serialized_options. -string Generator::OptionsValue(const string& serialized_options) const { +std::string Generator::OptionsValue( + const std::string& serialized_options) const { if (serialized_options.length() == 0 || GeneratingDescriptorProto()) { return "None"; } else { @@ -1141,9 +1136,9 @@ string Generator::OptionsValue(const string& serialized_options) const { // Prints an expression for a Python FieldDescriptor for |field|. void Generator::PrintFieldDescriptor( const FieldDescriptor& field, bool is_extension) const { - string options_string; + std::string options_string; field.options().SerializeToString(&options_string); - std::map m; + std::map m; m["name"] = field.name(); m["full_name"] = field.full_name(); m["index"] = StrCat(field.index()); @@ -1173,11 +1168,9 @@ void Generator::PrintFieldDescriptor( // Helper for Print{Fields,Extensions}InDescriptor(). void Generator::PrintFieldDescriptorsInDescriptor( - const Descriptor& message_descriptor, - bool is_extension, - const string& list_variable_name, - int (Descriptor::*CountFn)() const, - const FieldDescriptor* (Descriptor::*GetterFn)(int) const) const { + const Descriptor& message_descriptor, bool is_extension, + const std::string& list_variable_name, int (Descriptor::*CountFn)() const, + const FieldDescriptor* (Descriptor::*GetterFn)(int)const) const { printer_->Print("$list$=[\n", "list", list_variable_name); printer_->Indent(); for (int i = 0; i < (message_descriptor.*CountFn)(); ++i) { @@ -1218,7 +1211,7 @@ bool Generator::GeneratingDescriptorProto() const { // This name is module-qualified iff the given descriptor describes an // entity that doesn't come from the current file. template -string Generator::ModuleLevelDescriptorName( +std::string Generator::ModuleLevelDescriptorName( const DescriptorT& descriptor) const { // FIXME(robinson): // We currently don't worry about collisions with underscores in the type @@ -1232,7 +1225,7 @@ string Generator::ModuleLevelDescriptorName( // // The C++ implementation doesn't guard against this either. Leaving // it for now... - string name = NamePrefixedWithNestedTypes(descriptor, "_"); + std::string name = NamePrefixedWithNestedTypes(descriptor, "_"); UpperString(&name); // Module-private for now. Easy to make public later; almost impossible // to make private later. @@ -1249,8 +1242,9 @@ string Generator::ModuleLevelDescriptorName( // Like ModuleLevelDescriptorName(), module-qualifies the name iff // the given descriptor describes an entity that doesn't come from // the current file. -string Generator::ModuleLevelMessageName(const Descriptor& descriptor) const { - string name = NamePrefixedWithNestedTypes(descriptor, "."); +std::string Generator::ModuleLevelMessageName( + const Descriptor& descriptor) const { + std::string name = NamePrefixedWithNestedTypes(descriptor, "."); if (descriptor.file() != file_) { name = ModuleAlias(descriptor.file()->name()) + "." + name; } @@ -1259,9 +1253,9 @@ string Generator::ModuleLevelMessageName(const Descriptor& descriptor) const { // Returns the unique Python module-level identifier given to a service // descriptor. -string Generator::ModuleLevelServiceDescriptorName( +std::string Generator::ModuleLevelServiceDescriptorName( const ServiceDescriptor& descriptor) const { - string name = descriptor.name(); + std::string name = descriptor.name(); UpperString(&name); name = "_" + name; if (descriptor.file() != file_) { @@ -1282,7 +1276,7 @@ template void Generator::PrintSerializedPbInterval( const DescriptorT& descriptor, DescriptorProtoT& proto) const { descriptor.CopyTo(&proto); - string sp; + std::string sp; proto.SerializeToString(&sp); int offset = file_descriptor_serialized_.find(sp); GOOGLE_CHECK_GE(offset, 0); @@ -1295,8 +1289,8 @@ void Generator::PrintSerializedPbInterval( } namespace { -void PrintDescriptorOptionsFixingCode(const string& descriptor, - const string& options, +void PrintDescriptorOptionsFixingCode(const std::string& descriptor, + const std::string& options, io::Printer* printer) { // Reset the _options to None thus DescriptorBase.GetOptions() can // parse _options again after extensions are registered. @@ -1309,7 +1303,7 @@ void PrintDescriptorOptionsFixingCode(const string& descriptor, // Prints expressions that set the options field of all descriptors. void Generator::FixAllDescriptorOptions() const { // Prints an expression that sets the file descriptor's options. - string file_options = OptionsValue(file_->options().SerializeAsString()); + std::string file_options = OptionsValue(file_->options().SerializeAsString()); if (file_options != "None") { PrintDescriptorOptionsFixingCode(kDescriptorKey, file_options, printer_); } @@ -1331,11 +1325,10 @@ void Generator::FixAllDescriptorOptions() const { } void Generator::FixOptionsForOneof(const OneofDescriptor& oneof) const { - string oneof_options = OptionsValue(oneof.options().SerializeAsString()); + std::string oneof_options = OptionsValue(oneof.options().SerializeAsString()); if (oneof_options != "None") { - string oneof_name = strings::Substitute( - "$0.$1['$2']", - ModuleLevelDescriptorName(*oneof.containing_type()), + std::string oneof_name = strings::Substitute( + "$0.$1['$2']", ModuleLevelDescriptorName(*oneof.containing_type()), "oneofs_by_name", oneof.name()); PrintDescriptorOptionsFixingCode(oneof_name, oneof_options, printer_); } @@ -1344,16 +1337,16 @@ void Generator::FixOptionsForOneof(const OneofDescriptor& oneof) const { // Prints expressions that set the options for an enum descriptor and its // value descriptors. void Generator::FixOptionsForEnum(const EnumDescriptor& enum_descriptor) const { - string descriptor_name = ModuleLevelDescriptorName(enum_descriptor); - string enum_options = OptionsValue( - enum_descriptor.options().SerializeAsString()); + std::string descriptor_name = ModuleLevelDescriptorName(enum_descriptor); + std::string enum_options = + OptionsValue(enum_descriptor.options().SerializeAsString()); if (enum_options != "None") { PrintDescriptorOptionsFixingCode(descriptor_name, enum_options, printer_); } for (int i = 0; i < enum_descriptor.value_count(); ++i) { const EnumValueDescriptor& value_descriptor = *enum_descriptor.value(i); - string value_options = OptionsValue( - value_descriptor.options().SerializeAsString()); + std::string value_options = + OptionsValue(value_descriptor.options().SerializeAsString()); if (value_options != "None") { PrintDescriptorOptionsFixingCode( StringPrintf("%s.values_by_name[\"%s\"]", descriptor_name.c_str(), @@ -1367,9 +1360,9 @@ void Generator::FixOptionsForEnum(const EnumDescriptor& enum_descriptor) const { // extensions). void Generator::FixOptionsForField( const FieldDescriptor& field) const { - string field_options = OptionsValue(field.options().SerializeAsString()); + std::string field_options = OptionsValue(field.options().SerializeAsString()); if (field_options != "None") { - string field_name; + std::string field_name; if (field.is_extension()) { if (field.extension_scope() == NULL) { // Top level extensions. @@ -1412,10 +1405,10 @@ void Generator::FixOptionsForMessage(const Descriptor& descriptor) const { FixOptionsForField(field); } // Message option for this message. - string message_options = OptionsValue( - descriptor.options().SerializeAsString()); + std::string message_options = + OptionsValue(descriptor.options().SerializeAsString()); if (message_options != "None") { - string descriptor_name = ModuleLevelDescriptorName(descriptor); + std::string descriptor_name = ModuleLevelDescriptorName(descriptor); PrintDescriptorOptionsFixingCode(descriptor_name, message_options, printer_); @@ -1425,10 +1418,10 @@ void Generator::FixOptionsForMessage(const Descriptor& descriptor) const { // If a dependency forwards other files through public dependencies, let's // copy over the corresponding module aliases. void Generator::CopyPublicDependenciesAliases( - const string& copy_from, const FileDescriptor* file) const { + const std::string& copy_from, const FileDescriptor* file) const { for (int i = 0; i < file->public_dependency_count(); ++i) { - string module_name = ModuleName(file->public_dependency(i)->name()); - string module_alias = ModuleAlias(file->public_dependency(i)->name()); + std::string module_name = ModuleName(file->public_dependency(i)->name()); + std::string module_alias = ModuleAlias(file->public_dependency(i)->name()); // There's no module alias in the dependent file if it was generated by // an old protoc (less than 3.0.0-alpha-1). Use module name in this // situation. diff --git a/src/google/protobuf/compiler/python/python_generator.h b/src/google/protobuf/compiler/python/python_generator.h index 61f0385164..b4959bfcf6 100644 --- a/src/google/protobuf/compiler/python/python_generator.h +++ b/src/google/protobuf/compiler/python/python_generator.h @@ -85,11 +85,9 @@ class PROTOC_EXPORT Generator : public CodeGenerator { void PrintFieldDescriptor( const FieldDescriptor& field, bool is_extension) const; void PrintFieldDescriptorsInDescriptor( - const Descriptor& message_descriptor, - bool is_extension, - const std::string& list_variable_name, - int (Descriptor::*CountFn)() const, - const FieldDescriptor* (Descriptor::*GetterFn)(int) const) const; + const Descriptor& message_descriptor, bool is_extension, + const std::string& list_variable_name, int (Descriptor::*CountFn)() const, + const FieldDescriptor* (Descriptor::*GetterFn)(int)const) const; void PrintFieldsInDescriptor(const Descriptor& message_descriptor) const; void PrintExtensionsInDescriptor(const Descriptor& message_descriptor) const; void PrintMessageDescriptors() const; @@ -97,8 +95,10 @@ class PROTOC_EXPORT Generator : public CodeGenerator { void PrintNestedDescriptors(const Descriptor& containing_descriptor) const; void PrintMessages() const; - void PrintMessage(const Descriptor& message_descriptor, const std::string& prefix, - std::vector* to_register, bool is_nested) const; + void PrintMessage(const Descriptor& message_descriptor, + const std::string& prefix, + std::vector* to_register, + bool is_nested) const; void PrintNestedMessages(const Descriptor& containing_descriptor, const std::string& prefix, std::vector* to_register) const; @@ -114,9 +114,9 @@ class PROTOC_EXPORT Generator : public CodeGenerator { void AddEnumToFileDescriptor(const EnumDescriptor& descriptor) const; void AddExtensionToFileDescriptor(const FieldDescriptor& descriptor) const; void AddServiceToFileDescriptor(const ServiceDescriptor& descriptor) const; - std::string FieldReferencingExpression(const Descriptor* containing_type, - const FieldDescriptor& field, - const std::string& python_dict_name) const; + std::string FieldReferencingExpression( + const Descriptor* containing_type, const FieldDescriptor& field, + const std::string& python_dict_name) const; template void FixContainingTypeInDescriptor( const DescriptorT& descriptor, @@ -155,8 +155,8 @@ class PROTOC_EXPORT Generator : public CodeGenerator { void FixOptionsForEnum(const EnumDescriptor& descriptor) const; void FixOptionsForMessage(const Descriptor& descriptor) const; - void CopyPublicDependenciesAliases( - const std::string& copy_from, const FileDescriptor* file) const; + void CopyPublicDependenciesAliases(const std::string& copy_from, + const FileDescriptor* file) const; // Very coarse-grained lock to ensure that Generate() is reentrant. // Guards file_, printer_ and file_descriptor_serialized_. diff --git a/src/google/protobuf/compiler/python/python_plugin_unittest.cc b/src/google/protobuf/compiler/python/python_plugin_unittest.cc index d19d11f0c4..aa04e8b714 100644 --- a/src/google/protobuf/compiler/python/python_plugin_unittest.cc +++ b/src/google/protobuf/compiler/python/python_plugin_unittest.cc @@ -59,9 +59,8 @@ class TestGenerator : public CodeGenerator { ~TestGenerator() {} virtual bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const { + const std::string& parameter, GeneratorContext* context, + std::string* error) const { TryInsert("test_pb2.py", "imports", context); TryInsert("test_pb2.py", "module_scope", context); TryInsert("test_pb2.py", "class_scope:foo.Bar", context); @@ -69,7 +68,8 @@ class TestGenerator : public CodeGenerator { return true; } - void TryInsert(const string& filename, const string& insertion_point, + void TryInsert(const std::string& filename, + const std::string& insertion_point, GeneratorContext* context) const { std::unique_ptr output( context->OpenForInsert(filename, insertion_point)); @@ -98,9 +98,9 @@ TEST(PythonPluginTest, PluginTest) { cli.RegisterGenerator("--python_out", &python_generator, ""); cli.RegisterGenerator("--test_out", &test_generator, ""); - string proto_path = "-I" + TestTempDir(); - string python_out = "--python_out=" + TestTempDir(); - string test_out = "--test_out=" + TestTempDir(); + std::string proto_path = "-I" + TestTempDir(); + std::string python_out = "--python_out=" + TestTempDir(); + std::string test_out = "--test_out=" + TestTempDir(); const char* argv[] = { "protoc", @@ -137,25 +137,25 @@ TEST(PythonPluginTest, ImportTest) { cli.SetInputsAreProtoPathRelative(true); python::Generator python_generator; cli.RegisterGenerator("--python_out", &python_generator, ""); - string proto_path = "-I" + TestTempDir(); - string python_out = "--python_out=" + TestTempDir(); + std::string proto_path = "-I" + TestTempDir(); + std::string python_out = "--python_out=" + TestTempDir(); const char* argv[] = {"protoc", proto_path.c_str(), "-I.", python_out.c_str(), "test1.proto"}; ASSERT_EQ(0, cli.Run(5, argv)); // Loop over the lines of the generated code and verify that we find an // ordinary Python import but do not find the string "importlib". - string output; + std::string output; GOOGLE_CHECK_OK(File::GetContents(TestTempDir() + "/test1_pb2.py", &output, true)); - std::vector lines = Split(output, "\n"); - string expected_import = "import test2_pb2"; + std::vector lines = Split(output, "\n"); + std::string expected_import = "import test2_pb2"; bool found_expected_import = false; for (int i = 0; i < lines.size(); ++i) { - if (lines[i].find(expected_import) != string::npos) { + if (lines[i].find(expected_import) != std::string::npos) { found_expected_import = true; } - EXPECT_EQ(string::npos, lines[i].find("importlib")); + EXPECT_EQ(std::string::npos, lines[i].find("importlib")); } EXPECT_TRUE(found_expected_import); } diff --git a/src/google/protobuf/compiler/ruby/ruby_generator.h b/src/google/protobuf/compiler/ruby/ruby_generator.h index 521697fb1e..5fac830f6f 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator.h +++ b/src/google/protobuf/compiler/ruby/ruby_generator.h @@ -49,7 +49,7 @@ namespace ruby { // Ruby output, you can do so by registering an instance of this // CodeGenerator with the CommandLineInterface in your main() function. class PROTOC_EXPORT Generator - : public google::protobuf::compiler::CodeGenerator { + : public PROTOBUF_NAMESPACE_ID::compiler::CodeGenerator { virtual bool Generate( const FileDescriptor* file, const string& parameter, diff --git a/src/google/protobuf/compiler/subprocess.cc b/src/google/protobuf/compiler/subprocess.cc index 66c6e2ad6e..42f3d0617f 100644 --- a/src/google/protobuf/compiler/subprocess.cc +++ b/src/google/protobuf/compiler/subprocess.cc @@ -84,7 +84,7 @@ Subprocess::~Subprocess() { } } -void Subprocess::Start(const string& program, SearchMode search_mode) { +void Subprocess::Start(const std::string& program, SearchMode search_mode) { // Create the pipes. HANDLE stdin_pipe_read; HANDLE stdin_pipe_write; @@ -159,7 +159,7 @@ void Subprocess::Start(const string& program, SearchMode search_mode) { } bool Subprocess::Communicate(const Message& input, Message* output, - string* error) { + std::string* error) { if (process_start_error_ != ERROR_SUCCESS) { *error = Win32ErrorMessage(process_start_error_); return false; @@ -167,8 +167,8 @@ bool Subprocess::Communicate(const Message& input, Message* output, GOOGLE_CHECK(child_handle_ != NULL) << "Must call Start() first."; - string input_data = input.SerializeAsString(); - string output_data; + std::string input_data = input.SerializeAsString(); + std::string output_data; int input_pos = 0; @@ -270,7 +270,7 @@ bool Subprocess::Communicate(const Message& input, Message* output, return true; } -string Subprocess::Win32ErrorMessage(DWORD error_code) { +std::string Subprocess::Win32ErrorMessage(DWORD error_code) { char* message; // WTF? @@ -280,7 +280,7 @@ string Subprocess::Win32ErrorMessage(DWORD error_code) { (LPSTR)&message, // NOT A BUG! 0, NULL); - string result = message; + std::string result = message; LocalFree(message); return result; } @@ -301,7 +301,7 @@ Subprocess::~Subprocess() { } } -void Subprocess::Start(const string& program, SearchMode search_mode) { +void Subprocess::Start(const std::string& program, SearchMode search_mode) { // Note that we assume that there are no other threads, thus we don't have to // do crazy stuff like using socket pairs or avoiding libc locks. @@ -359,7 +359,7 @@ void Subprocess::Start(const string& program, SearchMode search_mode) { } bool Subprocess::Communicate(const Message& input, Message* output, - string* error) { + std::string* error) { GOOGLE_CHECK_NE(child_stdin_, -1) << "Must call Start() first."; // The "sighandler_t" typedef is GNU-specific, so define our own. @@ -368,8 +368,8 @@ bool Subprocess::Communicate(const Message& input, Message* output, // Make sure SIGPIPE is disabled so that if the child dies it doesn't kill us. SignalHandler* old_pipe_handler = signal(SIGPIPE, SIG_IGN); - string input_data = input.SerializeAsString(); - string output_data; + std::string input_data = input.SerializeAsString(); + std::string output_data; int input_pos = 0; int max_fd = std::max(child_stdin_, child_stdout_); diff --git a/src/google/protobuf/compiler/zip_writer.cc b/src/google/protobuf/compiler/zip_writer.cc index 1799af6a4a..f03b3a6df7 100644 --- a/src/google/protobuf/compiler/zip_writer.cc +++ b/src/google/protobuf/compiler/zip_writer.cc @@ -120,7 +120,7 @@ static const uint32 kCRC32Table[256] = { 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -static uint32 ComputeCRC32(const string &buf) { +static uint32 ComputeCRC32(const std::string& buf) { uint32 x = ~0U; for (int i = 0; i < buf.size(); ++i) { unsigned char c = buf[i]; @@ -140,7 +140,8 @@ ZipWriter::ZipWriter(io::ZeroCopyOutputStream* raw_output) : raw_output_(raw_output) {} ZipWriter::~ZipWriter() {} -bool ZipWriter::Write(const string& filename, const string& contents) { +bool ZipWriter::Write(const std::string& filename, + const std::string& contents) { FileInfo info; info.name = filename; @@ -177,7 +178,7 @@ bool ZipWriter::WriteDirectory() { // write central directory io::CodedOutputStream output(raw_output_); for (int i = 0; i < num_entries; ++i) { - const string &filename = files_[i].name; + const std::string& filename = files_[i].name; uint16 filename_size = filename.size(); uint32 crc32 = files_[i].crc32; uint32 size = files_[i].size; diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc index 606f8aca81..d5c20eeba3 100644 --- a/src/google/protobuf/descriptor.cc +++ b/src/google/protobuf/descriptor.cc @@ -251,9 +251,9 @@ char ToLower(char ch) { return (ch >= 'A' && ch <= 'Z') ? (ch - 'A' + 'a') : ch; } -string ToCamelCase(const string& input, bool lower_first) { +std::string ToCamelCase(const std::string& input, bool lower_first) { bool capitalize_next = !lower_first; - string result; + std::string result; result.reserve(input.size()); for (int i = 0; i < input.size(); i++) { @@ -275,9 +275,9 @@ string ToCamelCase(const string& input, bool lower_first) { return result; } -string ToJsonName(const string& input) { +std::string ToJsonName(const std::string& input) { bool capitalize_next = false; - string result; + std::string result; result.reserve(input.size()); for (int i = 0; i < input.size(); i++) { @@ -294,9 +294,9 @@ string ToJsonName(const string& input) { return result; } -string EnumValueToPascalCase(const string& input) { +std::string EnumValueToPascalCase(const std::string& input) { bool next_upper = true; - string result; + std::string result; result.reserve(input.size()); for (int i = 0; i < input.size(); i++) { @@ -329,7 +329,7 @@ class PrefixRemover { // Tries to remove the enum prefix from this enum value. // If this is not possible, returns the input verbatim. - string MaybeRemove(StringPiece str) { + std::string MaybeRemove(StringPiece str) { // We can't just lowercase and strip str and look for a prefix. // We need to properly recognize the difference between: // @@ -349,14 +349,14 @@ class PrefixRemover { } if (ascii_tolower(str[i]) != prefix_[j++]) { - return string(str); + return std::string(str); } } // If we didn't make it through the prefix, we've failed to strip the // prefix. if (j < prefix_.size()) { - return string(str); + return std::string(str); } // Skip underscores between prefix and further characters. @@ -366,16 +366,16 @@ class PrefixRemover { // Enum label can't be the empty string. if (i == str.size()) { - return string(str); + return std::string(str); } // We successfully stripped the prefix. str.remove_prefix(i); - return string(str); + return std::string(str); } private: - string prefix_; + std::string prefix_; }; // A DescriptorPool contains a bunch of hash-maps to implement the @@ -480,10 +480,11 @@ typedef HASH_MAP ExtensionsGroupedByDescriptorMap; -typedef HASH_MAP LocationsByPathMap; +typedef HASH_MAP + LocationsByPathMap; -std::set* NewAllowedProto3Extendee() { - auto allowed_proto3_extendees = new std::set; +std::set* NewAllowedProto3Extendee() { + auto allowed_proto3_extendees = new std::set; const char* kOptionNames[] = { "FileOptions", "MessageOptions", "FieldOptions", "EnumOptions", "EnumValueOptions", "ServiceOptions", "MethodOptions", "OneofOptions"}; @@ -491,11 +492,12 @@ std::set* NewAllowedProto3Extendee() { // descriptor.proto has a different package name in opensource. We allow // both so the opensource protocol compiler can also compile internal // proto3 files with custom options. See: b/27567912 - allowed_proto3_extendees->insert(string("google.protobuf.") + + allowed_proto3_extendees->insert(std::string("google.protobuf.") + kOptionNames[i]); // Split the word to trick the opensource processing scripts so they // will keep the origial package name. - allowed_proto3_extendees->insert(string("proto") + "2." + kOptionNames[i]); + allowed_proto3_extendees->insert(std::string("proto") + "2." + + kOptionNames[i]); } return allowed_proto3_extendees; } @@ -504,7 +506,7 @@ std::set* NewAllowedProto3Extendee() { // Only extensions to descriptor options are allowed. We use name comparison // instead of comparing the descriptor directly because the extensions may be // defined in a different pool. -bool AllowedExtendeeInProto3(const string& name) { +bool AllowedExtendeeInProto3(const std::string& name) { static auto allowed_proto3_extendees = internal::OnShutdownDelete(NewAllowedProto3Extendee()); return allowed_proto3_extendees->find(name) != @@ -561,20 +563,20 @@ class DescriptorPool::Tables { // The stack of files which are currently being built. Used to detect // cyclic dependencies when loading files from a DescriptorDatabase. Not // used when fallback_database_ == NULL. - std::vector pending_files_; + std::vector pending_files_; // A set of files which we have tried to load from the fallback database // and encountered errors. We will not attempt to load them again during // execution of the current public API call, but for compatibility with // legacy clients, this is cleared at the beginning of each public API call. // Not used when fallback_database_ == NULL. - HASH_SET known_bad_files_; + HASH_SET known_bad_files_; // A set of symbols which we have tried to load from the fallback database // and encountered errors. We will not attempt to load them again during // execution of the current public API call, but for compatibility with // legacy clients, this is cleared at the beginning of each public API call. - HASH_SET known_bad_symbols_; + HASH_SET known_bad_symbols_; // The set of descriptors for which we've already loaded the full // set of extensions numbers from fallback_database_. @@ -585,17 +587,16 @@ class DescriptorPool::Tables { // Find symbols. This returns a null Symbol (symbol.IsNull() is true) // if not found. - inline Symbol FindSymbol(const string& key) const; + inline Symbol FindSymbol(const std::string& key) const; // This implements the body of DescriptorPool::Find*ByName(). It should // really be a private method of DescriptorPool, but that would require // declaring Symbol in descriptor.h, which would drag all kinds of other // stuff into the header. Yay C++. - Symbol FindByNameHelper( - const DescriptorPool* pool, const string& name); + Symbol FindByNameHelper(const DescriptorPool* pool, const std::string& name); // These return NULL if not found. - inline const FileDescriptor* FindFile(const string& key) const; + inline const FileDescriptor* FindFile(const std::string& key) const; inline const FieldDescriptor* FindExtension(const Descriptor* extendee, int number) const; inline void FindAllExtensions(const Descriptor* extendee, @@ -608,7 +609,7 @@ class DescriptorPool::Tables { // the key already exists in the table. For AddSymbol(), the string passed // in must be one that was constructed using AllocateString(), as it will // be used as a key in the symbols_by_name_ map without copying. - bool AddSymbol(const string& full_name, Symbol symbol); + bool AddSymbol(const std::string& full_name, Symbol symbol); bool AddFile(const FileDescriptor* file); bool AddExtension(const FieldDescriptor* field); @@ -627,7 +628,7 @@ class DescriptorPool::Tables { // Allocate a string which will be destroyed when the pool is destroyed. // The string is initialized to the given value for convenience. - string* AllocateString(const string& value); + std::string* AllocateString(const std::string& value); // Allocate a internal::call_once which will be destroyed when the pool is // destroyed. @@ -643,7 +644,7 @@ class DescriptorPool::Tables { FileDescriptorTables* AllocateFileTables(); private: - std::vector strings_; // All strings in the pool. + std::vector strings_; // All strings in the pool. std::vector messages_; // All messages in the pool. std::vector once_dynamics_; // All internal::call_onces in the pool. @@ -710,18 +711,18 @@ class FileDescriptorTables { // Find symbols. These return a null Symbol (symbol.IsNull() is true) // if not found. inline Symbol FindNestedSymbol(const void* parent, - const string& name) const; + const std::string& name) const; inline Symbol FindNestedSymbolOfType(const void* parent, - const string& name, + const std::string& name, const Symbol::Type type) const; // These return NULL if not found. inline const FieldDescriptor* FindFieldByNumber( const Descriptor* parent, int number) const; inline const FieldDescriptor* FindFieldByLowercaseName( - const void* parent, const string& lowercase_name) const; + const void* parent, const std::string& lowercase_name) const; inline const FieldDescriptor* FindFieldByCamelcaseName( - const void* parent, const string& camelcase_name) const; + const void* parent, const std::string& camelcase_name) const; inline const EnumValueDescriptor* FindEnumValueByNumber( const EnumDescriptor* parent, int number) const; // This creates a new EnumValueDescriptor if not found, in a thread-safe way. @@ -735,7 +736,7 @@ class FileDescriptorTables { // the key already exists in the table. For AddAliasUnderParent(), the // string passed in must be one that was constructed using AllocateString(), // as it will be used as a key in the symbols_by_parent_ map without copying. - bool AddAliasUnderParent(const void* parent, const string& name, + bool AddAliasUnderParent(const void* parent, const std::string& name, Symbol symbol); bool AddFieldByNumber(const FieldDescriptor* field); bool AddEnumValueByNumber(const EnumValueDescriptor* value); @@ -900,7 +901,7 @@ void DescriptorPool::Tables::RollbackToLastCheckpoint() { // ------------------------------------------------------------------- -inline Symbol DescriptorPool::Tables::FindSymbol(const string& key) const { +inline Symbol DescriptorPool::Tables::FindSymbol(const std::string& key) const { const Symbol* result = FindOrNull(symbols_by_name_, key.c_str()); if (result == NULL) { return kNullSymbol; @@ -910,7 +911,7 @@ inline Symbol DescriptorPool::Tables::FindSymbol(const string& key) const { } inline Symbol FileDescriptorTables::FindNestedSymbol( - const void* parent, const string& name) const { + const void* parent, const std::string& name) const { const Symbol* result = FindOrNull( symbols_by_parent_, PointerStringPair(parent, name.c_str())); if (result == NULL) { @@ -921,14 +922,15 @@ inline Symbol FileDescriptorTables::FindNestedSymbol( } inline Symbol FileDescriptorTables::FindNestedSymbolOfType( - const void* parent, const string& name, const Symbol::Type type) const { + const void* parent, const std::string& name, + const Symbol::Type type) const { Symbol result = FindNestedSymbol(parent, name); if (result.type != type) return kNullSymbol; return result; } -Symbol DescriptorPool::Tables::FindByNameHelper( - const DescriptorPool* pool, const string& name) { +Symbol DescriptorPool::Tables::FindByNameHelper(const DescriptorPool* pool, + const std::string& name) { MutexLockMaybe lock(pool->mutex_); if (pool->fallback_database_ != NULL) { known_bad_symbols_.clear(); @@ -953,7 +955,7 @@ Symbol DescriptorPool::Tables::FindByNameHelper( } inline const FileDescriptor* DescriptorPool::Tables::FindFile( - const string& key) const { + const std::string& key) const { return FindPtrOrNull(files_by_name_, key.c_str()); } @@ -991,7 +993,7 @@ void FileDescriptorTables::FieldsByLowercaseNamesLazyInitInternal() const { } inline const FieldDescriptor* FileDescriptorTables::FindFieldByLowercaseName( - const void* parent, const string& lowercase_name) const { + const void* parent, const std::string& lowercase_name) const { internal::call_once( fields_by_lowercase_name_once_, &FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic, this); @@ -1015,7 +1017,7 @@ void FileDescriptorTables::FieldsByCamelcaseNamesLazyInitInternal() const { } inline const FieldDescriptor* FileDescriptorTables::FindFieldByCamelcaseName( - const void* parent, const string& camelcase_name) const { + const void* parent, const std::string& camelcase_name) const { internal::call_once( fields_by_camelcase_name_once_, FileDescriptorTables::FieldsByCamelcaseNamesLazyInitStatic, this); @@ -1063,8 +1065,8 @@ FileDescriptorTables::FindEnumValueByNumberCreatingIfUnknown( // EnumDescriptor (it's not a part of the enum as originally defined), but // we do insert it into the table so that we can return the same pointer // later. - string enum_value_name = StringPrintf( - "UNKNOWN_ENUM_VALUE_%s_%d", parent->name().c_str(), number); + std::string enum_value_name = StringPrintf("UNKNOWN_ENUM_VALUE_%s_%d", + parent->name().c_str(), number); DescriptorPool::Tables* tables = const_cast(DescriptorPool::generated_pool()-> tables_.get()); @@ -1099,8 +1101,8 @@ inline void DescriptorPool::Tables::FindAllExtensions( // ------------------------------------------------------------------- -bool DescriptorPool::Tables::AddSymbol( - const string& full_name, Symbol symbol) { +bool DescriptorPool::Tables::AddSymbol(const std::string& full_name, + Symbol symbol) { if (InsertIfNotPresent(&symbols_by_name_, full_name.c_str(), symbol)) { symbols_after_checkpoint_.push_back(full_name.c_str()); return true; @@ -1109,8 +1111,9 @@ bool DescriptorPool::Tables::AddSymbol( } } -bool FileDescriptorTables::AddAliasUnderParent( - const void* parent, const string& name, Symbol symbol) { +bool FileDescriptorTables::AddAliasUnderParent(const void* parent, + const std::string& name, + Symbol symbol) { PointerStringPair by_parent_key(parent, name.c_str()); return InsertIfNotPresent(&symbols_by_parent_, by_parent_key, symbol); } @@ -1191,8 +1194,8 @@ Type* DescriptorPool::Tables::AllocateArray(int count) { return reinterpret_cast(AllocateBytes(sizeof(Type) * count)); } -string* DescriptorPool::Tables::AllocateString(const string& value) { - string* result = new string(value); +std::string* DescriptorPool::Tables::AllocateString(const std::string& value) { + std::string* result = new std::string(value); strings_.push_back(result); return result; } @@ -1299,7 +1302,7 @@ void DescriptorPool::InternalDontEnforceDependencies() { enforce_dependencies_ = false; } -void DescriptorPool::AddUnusedImportTrackFile(const string& file_name) { +void DescriptorPool::AddUnusedImportTrackFile(const std::string& file_name) { unused_import_track_files_.insert(file_name); } @@ -1307,7 +1310,7 @@ void DescriptorPool::ClearUnusedImportTrackFiles() { unused_import_track_files_.clear(); } -bool DescriptorPool::InternalIsFileLoaded(const string& filename) const { +bool DescriptorPool::InternalIsFileLoaded(const std::string& filename) const { MutexLockMaybe lock(mutex_); return tables_->FindFile(filename) != NULL; } @@ -1377,7 +1380,8 @@ void DescriptorPool::InternalAddGeneratedFile( // there's any good way to factor it out. Think about this some time when // there's nothing more important to do (read: never). -const FileDescriptor* DescriptorPool::FindFileByName(const string& name) const { +const FileDescriptor* DescriptorPool::FindFileByName( + const std::string& name) const { MutexLockMaybe lock(mutex_); if (fallback_database_ != NULL) { tables_->known_bad_symbols_.clear(); @@ -1397,7 +1401,7 @@ const FileDescriptor* DescriptorPool::FindFileByName(const string& name) const { } const FileDescriptor* DescriptorPool::FindFileContainingSymbol( - const string& symbol_name) const { + const std::string& symbol_name) const { MutexLockMaybe lock(mutex_); if (fallback_database_ != NULL) { tables_->known_bad_symbols_.clear(); @@ -1418,13 +1422,13 @@ const FileDescriptor* DescriptorPool::FindFileContainingSymbol( } const Descriptor* DescriptorPool::FindMessageTypeByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); return (result.type == Symbol::MESSAGE) ? result.descriptor : NULL; } const FieldDescriptor* DescriptorPool::FindFieldByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); if (result.type == Symbol::FIELD && !result.field_descriptor->is_extension()) { @@ -1435,7 +1439,7 @@ const FieldDescriptor* DescriptorPool::FindFieldByName( } const FieldDescriptor* DescriptorPool::FindExtensionByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); if (result.type == Symbol::FIELD && result.field_descriptor->is_extension()) { @@ -1446,32 +1450,32 @@ const FieldDescriptor* DescriptorPool::FindExtensionByName( } const OneofDescriptor* DescriptorPool::FindOneofByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); return (result.type == Symbol::ONEOF) ? result.oneof_descriptor : NULL; } const EnumDescriptor* DescriptorPool::FindEnumTypeByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); return (result.type == Symbol::ENUM) ? result.enum_descriptor : NULL; } const EnumValueDescriptor* DescriptorPool::FindEnumValueByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); return (result.type == Symbol::ENUM_VALUE) ? result.enum_value_descriptor : NULL; } const ServiceDescriptor* DescriptorPool::FindServiceByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); return (result.type == Symbol::SERVICE) ? result.service_descriptor : NULL; } const MethodDescriptor* DescriptorPool::FindMethodByName( - const string& name) const { + const std::string& name) const { Symbol result = tables_->FindByNameHelper(this, name); return (result.type == Symbol::METHOD) ? result.method_descriptor : NULL; } @@ -1555,8 +1559,8 @@ Descriptor::FindFieldByNumber(int key) const { } } -const FieldDescriptor* -Descriptor::FindFieldByLowercaseName(const string& key) const { +const FieldDescriptor* Descriptor::FindFieldByLowercaseName( + const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByLowercaseName(this, key); if (result == NULL || result->is_extension()) { @@ -1566,8 +1570,8 @@ Descriptor::FindFieldByLowercaseName(const string& key) const { } } -const FieldDescriptor* -Descriptor::FindFieldByCamelcaseName(const string& key) const { +const FieldDescriptor* Descriptor::FindFieldByCamelcaseName( + const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByCamelcaseName(this, key); if (result == NULL || result->is_extension()) { @@ -1577,8 +1581,8 @@ Descriptor::FindFieldByCamelcaseName(const string& key) const { } } -const FieldDescriptor* -Descriptor::FindFieldByName(const string& key) const { +const FieldDescriptor* Descriptor::FindFieldByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD); if (!result.IsNull() && !result.field_descriptor->is_extension()) { @@ -1588,8 +1592,8 @@ Descriptor::FindFieldByName(const string& key) const { } } -const OneofDescriptor* -Descriptor::FindOneofByName(const string& key) const { +const OneofDescriptor* Descriptor::FindOneofByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ONEOF); if (!result.IsNull()) { @@ -1599,8 +1603,8 @@ Descriptor::FindOneofByName(const string& key) const { } } -const FieldDescriptor* -Descriptor::FindExtensionByName(const string& key) const { +const FieldDescriptor* Descriptor::FindExtensionByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD); if (!result.IsNull() && result.field_descriptor->is_extension()) { @@ -1610,8 +1614,8 @@ Descriptor::FindExtensionByName(const string& key) const { } } -const FieldDescriptor* -Descriptor::FindExtensionByLowercaseName(const string& key) const { +const FieldDescriptor* Descriptor::FindExtensionByLowercaseName( + const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByLowercaseName(this, key); if (result == NULL || !result->is_extension()) { @@ -1621,8 +1625,8 @@ Descriptor::FindExtensionByLowercaseName(const string& key) const { } } -const FieldDescriptor* -Descriptor::FindExtensionByCamelcaseName(const string& key) const { +const FieldDescriptor* Descriptor::FindExtensionByCamelcaseName( + const std::string& key) const { const FieldDescriptor* result = file()->tables_->FindFieldByCamelcaseName(this, key); if (result == NULL || !result->is_extension()) { @@ -1632,8 +1636,8 @@ Descriptor::FindExtensionByCamelcaseName(const string& key) const { } } -const Descriptor* -Descriptor::FindNestedTypeByName(const string& key) const { +const Descriptor* Descriptor::FindNestedTypeByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::MESSAGE); if (!result.IsNull()) { @@ -1643,8 +1647,8 @@ Descriptor::FindNestedTypeByName(const string& key) const { } } -const EnumDescriptor* -Descriptor::FindEnumTypeByName(const string& key) const { +const EnumDescriptor* Descriptor::FindEnumTypeByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM); if (!result.IsNull()) { @@ -1654,8 +1658,8 @@ Descriptor::FindEnumTypeByName(const string& key) const { } } -const EnumValueDescriptor* -Descriptor::FindEnumValueByName(const string& key) const { +const EnumValueDescriptor* Descriptor::FindEnumValueByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE); if (!result.IsNull()) { @@ -1665,8 +1669,8 @@ Descriptor::FindEnumValueByName(const string& key) const { } } -const EnumValueDescriptor* -EnumDescriptor::FindValueByName(const string& key) const { +const EnumValueDescriptor* EnumDescriptor::FindValueByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE); if (!result.IsNull()) { @@ -1686,8 +1690,8 @@ EnumDescriptor::FindValueByNumberCreatingIfUnknown(int key) const { return file()->tables_->FindEnumValueByNumberCreatingIfUnknown(this, key); } -const MethodDescriptor* -ServiceDescriptor::FindMethodByName(const string& key) const { +const MethodDescriptor* ServiceDescriptor::FindMethodByName( + const std::string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::METHOD); if (!result.IsNull()) { @@ -1697,8 +1701,8 @@ ServiceDescriptor::FindMethodByName(const string& key) const { } } -const Descriptor* -FileDescriptor::FindMessageTypeByName(const string& key) const { +const Descriptor* FileDescriptor::FindMessageTypeByName( + const std::string& key) const { Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::MESSAGE); if (!result.IsNull()) { return result.descriptor; @@ -1707,8 +1711,8 @@ FileDescriptor::FindMessageTypeByName(const string& key) const { } } -const EnumDescriptor* -FileDescriptor::FindEnumTypeByName(const string& key) const { +const EnumDescriptor* FileDescriptor::FindEnumTypeByName( + const std::string& key) const { Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM); if (!result.IsNull()) { return result.enum_descriptor; @@ -1717,8 +1721,8 @@ FileDescriptor::FindEnumTypeByName(const string& key) const { } } -const EnumValueDescriptor* -FileDescriptor::FindEnumValueByName(const string& key) const { +const EnumValueDescriptor* FileDescriptor::FindEnumValueByName( + const std::string& key) const { Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::ENUM_VALUE); if (!result.IsNull()) { @@ -1728,8 +1732,8 @@ FileDescriptor::FindEnumValueByName(const string& key) const { } } -const ServiceDescriptor* -FileDescriptor::FindServiceByName(const string& key) const { +const ServiceDescriptor* FileDescriptor::FindServiceByName( + const std::string& key) const { Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::SERVICE); if (!result.IsNull()) { return result.service_descriptor; @@ -1738,8 +1742,8 @@ FileDescriptor::FindServiceByName(const string& key) const { } } -const FieldDescriptor* -FileDescriptor::FindExtensionByName(const string& key) const { +const FieldDescriptor* FileDescriptor::FindExtensionByName( + const std::string& key) const { Symbol result = tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD); if (!result.IsNull() && result.field_descriptor->is_extension()) { return result.field_descriptor; @@ -1748,8 +1752,8 @@ FileDescriptor::FindExtensionByName(const string& key) const { } } -const FieldDescriptor* -FileDescriptor::FindExtensionByLowercaseName(const string& key) const { +const FieldDescriptor* FileDescriptor::FindExtensionByLowercaseName( + const std::string& key) const { const FieldDescriptor* result = tables_->FindFieldByLowercaseName(this, key); if (result == NULL || !result->is_extension()) { return NULL; @@ -1758,8 +1762,8 @@ FileDescriptor::FindExtensionByLowercaseName(const string& key) const { } } -const FieldDescriptor* -FileDescriptor::FindExtensionByCamelcaseName(const string& key) const { +const FieldDescriptor* FileDescriptor::FindExtensionByCamelcaseName( + const std::string& key) const { const FieldDescriptor* result = tables_->FindFieldByCamelcaseName(this, key); if (result == NULL || !result->is_extension()) { return NULL; @@ -1816,7 +1820,8 @@ EnumDescriptor::FindReservedRangeContainingNumber(int number) const { // ------------------------------------------------------------------- -bool DescriptorPool::TryFindFileInFallbackDatabase(const string& name) const { +bool DescriptorPool::TryFindFileInFallbackDatabase( + const std::string& name) const { if (fallback_database_ == NULL) return false; if (tables_->known_bad_files_.count(name) > 0) return false; @@ -1830,11 +1835,11 @@ bool DescriptorPool::TryFindFileInFallbackDatabase(const string& name) const { return true; } -bool DescriptorPool::IsSubSymbolOfBuiltType(const string& name) const { - string prefix = name; +bool DescriptorPool::IsSubSymbolOfBuiltType(const std::string& name) const { + std::string prefix = name; for (;;) { - string::size_type dot_pos = prefix.find_last_of('.'); - if (dot_pos == string::npos) { + std::string::size_type dot_pos = prefix.find_last_of('.'); + if (dot_pos == std::string::npos) { break; } prefix = prefix.substr(0, dot_pos); @@ -1852,7 +1857,8 @@ bool DescriptorPool::IsSubSymbolOfBuiltType(const string& name) const { return false; } -bool DescriptorPool::TryFindSymbolInFallbackDatabase(const string& name) const { +bool DescriptorPool::TryFindSymbolInFallbackDatabase( + const std::string& name) const { if (fallback_database_ == NULL) return false; if (tables_->known_bad_symbols_.count(name) > 0) return false; @@ -1923,7 +1929,8 @@ bool FieldDescriptor::is_map_message_type() const { return message_type_->options().map_entry(); } -string FieldDescriptor::DefaultValueAsString(bool quote_string_type) const { +std::string FieldDescriptor::DefaultValueAsString( + bool quote_string_type) const { GOOGLE_CHECK(has_default_value()) << "No default value"; switch (cpp_type()) { case CPPTYPE_INT32: @@ -2091,9 +2098,9 @@ void FieldDescriptor::CopyTo(FieldDescriptorProto* proto) const { // Some compilers do not allow static_cast directly between two enum types, // so we must cast to int first. proto->set_label(static_cast( - ::google::protobuf::implicit_cast(label()))); + implicit_cast(label()))); proto->set_type(static_cast( - ::google::protobuf::implicit_cast(type()))); + implicit_cast(type()))); if (is_extension()) { if (!containing_type()->is_unqualified_placeholder_) { @@ -2214,8 +2221,9 @@ void MethodDescriptor::CopyTo(MethodDescriptorProto* proto) const { namespace { -bool RetrieveOptionsAssumingRightPool(int depth, const Message& options, - std::vector* option_entries) { +bool RetrieveOptionsAssumingRightPool( + int depth, const Message& options, + std::vector* option_entries) { option_entries->clear(); const Reflection* reflection = options.GetReflection(); std::vector fields; @@ -2228,9 +2236,9 @@ bool RetrieveOptionsAssumingRightPool(int depth, const Message& options, repeated = true; } for (int j = 0; j < count; j++) { - string fieldval; + std::string fieldval; if (fields[i]->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) { - string tmp; + std::string tmp; TextFormat::Printer printer; printer.SetInitialIndentLevel(depth + 1); printer.PrintFieldValueToString(options, fields[i], @@ -2243,7 +2251,7 @@ bool RetrieveOptionsAssumingRightPool(int depth, const Message& options, TextFormat::PrintFieldValueToString(options, fields[i], repeated ? j : -1, &fieldval); } - string name; + std::string name; if (fields[i]->is_extension()) { name = "(." + fields[i]->full_name() + ")"; } else { @@ -2258,7 +2266,7 @@ bool RetrieveOptionsAssumingRightPool(int depth, const Message& options, // Used by each of the option formatters. bool RetrieveOptions(int depth, const Message& options, const DescriptorPool* pool, - std::vector* option_entries) { + std::vector* option_entries) { // When printing custom options for a descriptor, we must use an options // message built on top of the same DescriptorPool where the descriptor // is coming from. This is to ensure we are interpreting custom options @@ -2290,8 +2298,8 @@ bool RetrieveOptions(int depth, const Message& options, // Formats options that all appear together in brackets. Does not include // brackets. bool FormatBracketedOptions(int depth, const Message& options, - const DescriptorPool* pool, string* output) { - std::vector all_options; + const DescriptorPool* pool, std::string* output) { + std::vector all_options; if (RetrieveOptions(depth, options, pool, &all_options)) { output->append(Join(all_options, ", ")); } @@ -2300,9 +2308,9 @@ bool FormatBracketedOptions(int depth, const Message& options, // Formats options one per line bool FormatLineOptions(int depth, const Message& options, - const DescriptorPool* pool, string* output) { - string prefix(depth * 2, ' '); - std::vector all_options; + const DescriptorPool* pool, std::string* output) { + std::string prefix(depth * 2, ' '); + std::vector all_options; if (RetrieveOptions(depth, options, pool, &all_options)) { for (int i = 0; i < all_options.size(); i++) { strings::SubstituteAndAppend(output, "$0option $1;\n", @@ -2314,9 +2322,8 @@ bool FormatLineOptions(int depth, const Message& options, class SourceLocationCommentPrinter { public: - template - SourceLocationCommentPrinter(const DescType* desc, - const string& prefix, + template + SourceLocationCommentPrinter(const DescType* desc, const std::string& prefix, const DebugStringOptions& options) : options_(options), prefix_(prefix) { // Perform the SourceLocation lookup only if we're including user comments, @@ -2326,7 +2333,7 @@ class SourceLocationCommentPrinter { } SourceLocationCommentPrinter(const FileDescriptor* file, const std::vector& path, - const string& prefix, + const std::string& prefix, const DebugStringOptions& options) : options_(options), prefix_(prefix) { // Perform the SourceLocation lookup only if we're including user comments, @@ -2334,7 +2341,7 @@ class SourceLocationCommentPrinter { have_source_loc_ = options.include_comments && file->GetSourceLocation(path, &source_loc_); } - void AddPreComment(string* output) { + void AddPreComment(std::string* output) { if (have_source_loc_) { // Detached leading comments. for (int i = 0 ; i < source_loc_.leading_detached_comments.size(); ++i) { @@ -2347,7 +2354,7 @@ class SourceLocationCommentPrinter { } } } - void AddPostComment(string* output) { + void AddPostComment(std::string* output) { if (have_source_loc_ && source_loc_.trailing_comments.size() > 0) { *output += FormatComment(source_loc_.trailing_comments); } @@ -2355,13 +2362,13 @@ class SourceLocationCommentPrinter { // Format comment such that each line becomes a full-line C++-style comment in // the DebugString() output. - string FormatComment(const string& comment_text) { - string stripped_comment = comment_text; + std::string FormatComment(const std::string& comment_text) { + std::string stripped_comment = comment_text; StripWhitespace(&stripped_comment); - std::vector lines = Split(stripped_comment, "\n"); - string output; + std::vector lines = Split(stripped_comment, "\n"); + std::string output; for (int i = 0; i < lines.size(); ++i) { - const string& line = lines[i]; + const std::string& line = lines[i]; strings::SubstituteAndAppend(&output, "$0// $1\n", prefix_, line); } return output; @@ -2372,19 +2379,19 @@ class SourceLocationCommentPrinter { bool have_source_loc_; SourceLocation source_loc_; DebugStringOptions options_; - string prefix_; + std::string prefix_; }; } // anonymous namespace -string FileDescriptor::DebugString() const { +std::string FileDescriptor::DebugString() const { DebugStringOptions options; // default options return DebugStringWithOptions(options); } -string FileDescriptor::DebugStringWithOptions( +std::string FileDescriptor::DebugStringWithOptions( const DebugStringOptions& debug_string_options) const { - string contents; + std::string contents; { std::vector path; path.push_back(FileDescriptorProto::kSyntaxFieldNumber); @@ -2479,27 +2486,26 @@ string FileDescriptor::DebugStringWithOptions( return contents; } -string Descriptor::DebugString() const { +std::string Descriptor::DebugString() const { DebugStringOptions options; // default options return DebugStringWithOptions(options); } -string Descriptor::DebugStringWithOptions( +std::string Descriptor::DebugStringWithOptions( const DebugStringOptions& options) const { - string contents; + std::string contents; DebugString(0, &contents, options, /* include_opening_clause */ true); return contents; } -void Descriptor::DebugString(int depth, string *contents, - const DebugStringOptions& - debug_string_options, +void Descriptor::DebugString(int depth, std::string* contents, + const DebugStringOptions& debug_string_options, bool include_opening_clause) const { if (options().map_entry()) { // Do not generate debug string for auto-generated map-entry type. return; } - string prefix(depth * 2, ' '); + std::string prefix(depth * 2, ' '); ++depth; SourceLocationCommentPrinter @@ -2598,14 +2604,14 @@ void Descriptor::DebugString(int depth, string *contents, comment_printer.AddPostComment(contents); } -string FieldDescriptor::DebugString() const { +std::string FieldDescriptor::DebugString() const { DebugStringOptions options; // default options return DebugStringWithOptions(options); } -string FieldDescriptor::DebugStringWithOptions( +std::string FieldDescriptor::DebugStringWithOptions( const DebugStringOptions& debug_string_options) const { - string contents; + std::string contents; int depth = 0; if (is_extension()) { strings::SubstituteAndAppend(&contents, "extend .$0 {\n", @@ -2620,7 +2626,7 @@ string FieldDescriptor::DebugStringWithOptions( } // The field type string used in FieldDescriptor::DebugString() -string FieldDescriptor::FieldTypeNameDebugString() const { +std::string FieldDescriptor::FieldTypeNameDebugString() const { switch(type()) { case TYPE_MESSAGE: return "." + message_type()->full_name(); @@ -2631,13 +2637,11 @@ string FieldDescriptor::FieldTypeNameDebugString() const { } } -void FieldDescriptor::DebugString(int depth, - PrintLabelFlag print_label_flag, - string *contents, - const DebugStringOptions& - debug_string_options) const { - string prefix(depth * 2, ' '); - string field_type; +void FieldDescriptor::DebugString( + int depth, PrintLabelFlag print_label_flag, std::string* contents, + const DebugStringOptions& debug_string_options) const { + std::string prefix(depth * 2, ' '); + std::string field_type; // Special case map fields. if (is_map()) { @@ -2659,7 +2663,7 @@ void FieldDescriptor::DebugString(int depth, } else if (is_map()) { print_label = false; } - string label; + std::string label; if (print_label) { label = kLabelToName[this->label()]; label.push_back(' '); @@ -2695,7 +2699,7 @@ void FieldDescriptor::DebugString(int depth, contents->append("\""); } - string formatted_options; + std::string formatted_options; if (FormatBracketedOptions(depth, options(), file()->pool(), &formatted_options)) { contents->append(bracketed ? ", " : " ["); @@ -2721,22 +2725,22 @@ void FieldDescriptor::DebugString(int depth, comment_printer.AddPostComment(contents); } -string OneofDescriptor::DebugString() const { +std::string OneofDescriptor::DebugString() const { DebugStringOptions options; // default values return DebugStringWithOptions(options); } -string OneofDescriptor::DebugStringWithOptions( +std::string OneofDescriptor::DebugStringWithOptions( const DebugStringOptions& options) const { - string contents; + std::string contents; DebugString(0, &contents, options); return contents; } -void OneofDescriptor::DebugString(int depth, string* contents, - const DebugStringOptions& - debug_string_options) const { - string prefix(depth * 2, ' '); +void OneofDescriptor::DebugString( + int depth, std::string* contents, + const DebugStringOptions& debug_string_options) const { + std::string prefix(depth * 2, ' '); ++depth; SourceLocationCommentPrinter comment_printer(this, prefix, debug_string_options); @@ -2759,22 +2763,22 @@ void OneofDescriptor::DebugString(int depth, string* contents, comment_printer.AddPostComment(contents); } -string EnumDescriptor::DebugString() const { +std::string EnumDescriptor::DebugString() const { DebugStringOptions options; // default values return DebugStringWithOptions(options); } -string EnumDescriptor::DebugStringWithOptions( +std::string EnumDescriptor::DebugStringWithOptions( const DebugStringOptions& options) const { - string contents; + std::string contents; DebugString(0, &contents, options); return contents; } -void EnumDescriptor::DebugString(int depth, string *contents, - const DebugStringOptions& - debug_string_options) const { - string prefix(depth * 2, ' '); +void EnumDescriptor::DebugString( + int depth, std::string* contents, + const DebugStringOptions& debug_string_options) const { + std::string prefix(depth * 2, ' '); ++depth; SourceLocationCommentPrinter @@ -2818,22 +2822,22 @@ void EnumDescriptor::DebugString(int depth, string *contents, comment_printer.AddPostComment(contents); } -string EnumValueDescriptor::DebugString() const { +std::string EnumValueDescriptor::DebugString() const { DebugStringOptions options; // default values return DebugStringWithOptions(options); } -string EnumValueDescriptor::DebugStringWithOptions( +std::string EnumValueDescriptor::DebugStringWithOptions( const DebugStringOptions& options) const { - string contents; + std::string contents; DebugString(0, &contents, options); return contents; } -void EnumValueDescriptor::DebugString(int depth, string *contents, - const DebugStringOptions& - debug_string_options) const { - string prefix(depth * 2, ' '); +void EnumValueDescriptor::DebugString( + int depth, std::string* contents, + const DebugStringOptions& debug_string_options) const { + std::string prefix(depth * 2, ' '); SourceLocationCommentPrinter comment_printer(this, prefix, debug_string_options); @@ -2842,7 +2846,7 @@ void EnumValueDescriptor::DebugString(int depth, string *contents, strings::SubstituteAndAppend(contents, "$0$1 = $2", prefix, name(), number()); - string formatted_options; + std::string formatted_options; if (FormatBracketedOptions(depth, options(), type()->file()->pool(), &formatted_options)) { strings::SubstituteAndAppend(contents, " [$0]", formatted_options); @@ -2852,21 +2856,21 @@ void EnumValueDescriptor::DebugString(int depth, string *contents, comment_printer.AddPostComment(contents); } -string ServiceDescriptor::DebugString() const { +std::string ServiceDescriptor::DebugString() const { DebugStringOptions options; // default values return DebugStringWithOptions(options); } -string ServiceDescriptor::DebugStringWithOptions( +std::string ServiceDescriptor::DebugStringWithOptions( const DebugStringOptions& options) const { - string contents; + std::string contents; DebugString(&contents, options); return contents; } -void ServiceDescriptor::DebugString(string *contents, - const DebugStringOptions& - debug_string_options) const { +void ServiceDescriptor::DebugString( + std::string* contents, + const DebugStringOptions& debug_string_options) const { SourceLocationCommentPrinter comment_printer(this, /* prefix */ "", debug_string_options); comment_printer.AddPreComment(contents); @@ -2884,22 +2888,22 @@ void ServiceDescriptor::DebugString(string *contents, comment_printer.AddPostComment(contents); } -string MethodDescriptor::DebugString() const { +std::string MethodDescriptor::DebugString() const { DebugStringOptions options; // default values return DebugStringWithOptions(options); } -string MethodDescriptor::DebugStringWithOptions( +std::string MethodDescriptor::DebugStringWithOptions( const DebugStringOptions& options) const { - string contents; + std::string contents; DebugString(0, &contents, options); return contents; } -void MethodDescriptor::DebugString(int depth, string *contents, - const DebugStringOptions& - debug_string_options) const { - string prefix(depth * 2, ' '); +void MethodDescriptor::DebugString( + int depth, std::string* contents, + const DebugStringOptions& debug_string_options) const { + std::string prefix(depth * 2, ' '); ++depth; SourceLocationCommentPrinter @@ -2913,7 +2917,7 @@ void MethodDescriptor::DebugString(int depth, string *contents, client_streaming() ? "stream " : "", server_streaming() ? "stream " : ""); - string formatted_options; + std::string formatted_options; if (FormatLineOptions(depth, options(), service()->file()->pool(), &formatted_options)) { strings::SubstituteAndAppend(contents, " {\n$0$1}\n", @@ -3082,7 +3086,7 @@ namespace { // pointers in the original options, not the mutable copy). The Message must be // one of the Options messages in descriptor.proto. struct OptionsToInterpret { - OptionsToInterpret(const string& ns, const string& el, + OptionsToInterpret(const std::string& ns, const std::string& el, const std::vector& path, const Message* orig_opt, Message* opt) : name_scope(ns), @@ -3090,8 +3094,8 @@ struct OptionsToInterpret { element_path(path), original_options(orig_opt), options(opt) {} - string name_scope; - string element_name; + std::string name_scope; + std::string element_name; std::vector element_path; const Message* original_options; Message* options; @@ -3124,7 +3128,7 @@ class DescriptorBuilder { std::vector options_to_interpret_; bool had_errors_; - string filename_; + std::string filename_; FileDescriptor* file_; FileDescriptorTables* file_tables_; std::set dependencies_; @@ -3141,19 +3145,17 @@ class DescriptorBuilder { // actually found in possible_undeclared_dependency_, which may be a parent // of the symbol actually looked for. const FileDescriptor* possible_undeclared_dependency_; - string possible_undeclared_dependency_name_; + std::string possible_undeclared_dependency_name_; // If LookupSymbol() could resolve a symbol which is not defined, // record the resolved name. This is only used by AddNotDefinedError() // to report a more useful error message. - string undefine_resolved_name_; + std::string undefine_resolved_name_; - void AddError(const string& element_name, - const Message& descriptor, + void AddError(const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, - const string& error); - void AddError(const string& element_name, - const Message& descriptor, + const std::string& error); + void AddError(const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, const char* error); void AddRecursiveImportError(const FileDescriptorProto& proto, int from_here); @@ -3163,19 +3165,18 @@ class DescriptorBuilder { // Adds an error indicating that undefined_symbol was not defined. Must // only be called after LookupSymbol() fails. void AddNotDefinedError( - const string& element_name, - const Message& descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - const string& undefined_symbol); + const std::string& element_name, const Message& descriptor, + DescriptorPool::ErrorCollector::ErrorLocation location, + const std::string& undefined_symbol); - void AddWarning(const string& element_name, const Message& descriptor, + void AddWarning(const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, - const string& error); + const std::string& error); // Silly helper which determines if the given file is in the given package. // I.e., either file->package() == package_name or file->package() is a // nested package within package_name. - bool IsInPackage(const FileDescriptor* file, const string& package_name); + bool IsInPackage(const FileDescriptor* file, const std::string& package_name); // Helper function which finds all public dependencies of the given file, and // stores the them in the dependencies_ set in the builder. @@ -3185,15 +3186,16 @@ class DescriptorBuilder { // - Search the pool's underlay if not found in tables_. // - Insure that the resulting Symbol is from one of the file's declared // dependencies. - Symbol FindSymbol(const string& name, bool build_it = true); + Symbol FindSymbol(const std::string& name, bool build_it = true); // Like FindSymbol() but does not require that the symbol is in one of the // file's declared dependencies. - Symbol FindSymbolNotEnforcingDeps(const string& name, bool build_it = true); + Symbol FindSymbolNotEnforcingDeps(const std::string& name, + bool build_it = true); // This implements the body of FindSymbolNotEnforcingDeps(). Symbol FindSymbolNotEnforcingDepsHelper(const DescriptorPool* pool, - const string& name, + const std::string& name, bool build_it = true); // Like FindSymbol(), but looks up the name relative to some other symbol @@ -3213,7 +3215,7 @@ class DescriptorBuilder { enum ResolveMode { LOOKUP_ALL, LOOKUP_TYPES }; - Symbol LookupSymbol(const string& name, const string& relative_to, + Symbol LookupSymbol(const std::string& name, const std::string& relative_to, DescriptorPool::PlaceholderType placeholder_type = DescriptorPool::PLACEHOLDER_MESSAGE, ResolveMode resolve_mode = LOOKUP_ALL, @@ -3221,29 +3223,28 @@ class DescriptorBuilder { // Like LookupSymbol() but will not return a placeholder even if // AllowUnknownDependencies() has been used. - Symbol LookupSymbolNoPlaceholder(const string& name, - const string& relative_to, + Symbol LookupSymbolNoPlaceholder(const std::string& name, + const std::string& relative_to, ResolveMode resolve_mode = LOOKUP_ALL, bool build_it = true); // Calls tables_->AddSymbol() and records an error if it fails. Returns // true if successful or false if failed, though most callers can ignore // the return value since an error has already been recorded. - bool AddSymbol(const string& full_name, - const void* parent, const string& name, - const Message& proto, Symbol symbol); + bool AddSymbol(const std::string& full_name, const void* parent, + const std::string& name, const Message& proto, Symbol symbol); // Like AddSymbol(), but succeeds if the symbol is already defined as long // as the existing definition is also a package (because it's OK to define // the same package in two different files). Also adds all parents of the // packgae to the symbol table (e.g. AddPackage("foo.bar", ...) will add // "foo.bar" and "foo" to the table). - void AddPackage(const string& name, const Message& proto, + void AddPackage(const std::string& name, const Message& proto, const FileDescriptor* file); // Checks that the symbol name contains only alphanumeric characters and // underscores. Records an error otherwise. - void ValidateSymbolName(const string& name, const string& full_name, + void ValidateSymbolName(const std::string& name, const std::string& full_name, const Message& proto); // Used by BUILD_ARRAY macro (below) to avoid having to have the type @@ -3267,7 +3268,7 @@ class DescriptorBuilder { // Implementation for AllocateOptions(). Don't call this directly. template void AllocateOptionsImpl( - const string& name_scope, const string& element_name, + const std::string& name_scope, const std::string& element_name, const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor, const std::vector& options_path); @@ -3389,7 +3390,8 @@ class DescriptorBuilder { intermediate_fields_iter, std::vector::const_iterator intermediate_fields_end, - const FieldDescriptor* innermost_field, const string& debug_msg_name, + const FieldDescriptor* innermost_field, + const std::string& debug_msg_name, const UnknownFieldSet& unknown_fields); // Validates the value for the option field of the currently interpreted @@ -3416,7 +3418,7 @@ class DescriptorBuilder { // A helper function that adds an error at the specified location of the // option we're currently interpreting, and returns false. bool AddOptionError(DescriptorPool::ErrorCollector::ErrorLocation location, - const string& msg) { + const std::string& msg) { builder_->AddError(options_to_interpret_->element_name, *uninterpreted_option_, location, msg); return false; @@ -3424,13 +3426,13 @@ class DescriptorBuilder { // A helper function that adds an error at the location of the option name // and returns false. - bool AddNameError(const string& msg) { + bool AddNameError(const std::string& msg) { return AddOptionError(DescriptorPool::ErrorCollector::OPTION_NAME, msg); } // A helper function that adds an error at the location of the option name // and returns false. - bool AddValueError(const string& msg) { + bool AddValueError(const std::string& msg) { return AddOptionError(DescriptorPool::ErrorCollector::OPTION_VALUE, msg); } @@ -3588,10 +3590,9 @@ DescriptorBuilder::DescriptorBuilder( DescriptorBuilder::~DescriptorBuilder() {} void DescriptorBuilder::AddError( - const string& element_name, - const Message& descriptor, + const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, - const string& error) { + const std::string& error) { if (error_collector_ == NULL) { if (!had_errors_) { GOOGLE_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_ @@ -3606,18 +3607,15 @@ void DescriptorBuilder::AddError( } void DescriptorBuilder::AddError( - const string& element_name, - const Message& descriptor, - DescriptorPool::ErrorCollector::ErrorLocation location, - const char* error) { - AddError(element_name, descriptor, location, string(error)); + const std::string& element_name, const Message& descriptor, + DescriptorPool::ErrorCollector::ErrorLocation location, const char* error) { + AddError(element_name, descriptor, location, std::string(error)); } void DescriptorBuilder::AddNotDefinedError( - const string& element_name, - const Message& descriptor, + const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, - const string& undefined_symbol) { + const std::string& undefined_symbol) { if (possible_undeclared_dependency_ == NULL && undefine_resolved_name_.empty()) { AddError(element_name, descriptor, location, @@ -3644,9 +3642,9 @@ void DescriptorBuilder::AddNotDefinedError( } void DescriptorBuilder::AddWarning( - const string& element_name, const Message& descriptor, + const std::string& element_name, const Message& descriptor, DescriptorPool::ErrorCollector::ErrorLocation location, - const string& error) { + const std::string& error) { if (error_collector_ == NULL) { GOOGLE_LOG(WARNING) << filename_ << " " << element_name << ": " << error; } else { @@ -3656,7 +3654,7 @@ void DescriptorBuilder::AddWarning( } bool DescriptorBuilder::IsInPackage(const FileDescriptor* file, - const string& package_name) { + const std::string& package_name) { return HasPrefixString(file->package(), package_name) && (file->package().size() == package_name.size() || file->package()[package_name.size()] == '.'); @@ -3670,7 +3668,7 @@ void DescriptorBuilder::RecordPublicDependencies(const FileDescriptor* file) { } Symbol DescriptorBuilder::FindSymbolNotEnforcingDepsHelper( - const DescriptorPool* pool, const string& name, bool build_it) { + const DescriptorPool* pool, const std::string& name, bool build_it) { // If we are looking at an underlay, we must lock its mutex_, since we are // accessing the underlay's tables_ directly. MutexLockMaybe lock((pool == pool_) ? NULL : pool->mutex_); @@ -3697,12 +3695,12 @@ Symbol DescriptorBuilder::FindSymbolNotEnforcingDepsHelper( return result; } -Symbol DescriptorBuilder::FindSymbolNotEnforcingDeps(const string& name, +Symbol DescriptorBuilder::FindSymbolNotEnforcingDeps(const std::string& name, bool build_it) { return FindSymbolNotEnforcingDepsHelper(pool_, name, build_it); } -Symbol DescriptorBuilder::FindSymbol(const string& name, bool build_it) { +Symbol DescriptorBuilder::FindSymbol(const std::string& name, bool build_it) { Symbol result = FindSymbolNotEnforcingDeps(name, build_it); if (result.IsNull()) return result; @@ -3742,10 +3740,9 @@ Symbol DescriptorBuilder::FindSymbol(const string& name, bool build_it) { return kNullSymbol; } -Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(const string& name, - const string& relative_to, - ResolveMode resolve_mode, - bool build_it) { +Symbol DescriptorBuilder::LookupSymbolNoPlaceholder( + const std::string& name, const std::string& relative_to, + ResolveMode resolve_mode, bool build_it) { possible_undeclared_dependency_ = NULL; undefine_resolved_name_.clear(); @@ -3765,27 +3762,27 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(const string& name, // } // So, we look for just "Foo" first, then look for "Bar.baz" within it if // found. - string::size_type name_dot_pos = name.find_first_of('.'); - string first_part_of_name; - if (name_dot_pos == string::npos) { + std::string::size_type name_dot_pos = name.find_first_of('.'); + std::string first_part_of_name; + if (name_dot_pos == std::string::npos) { first_part_of_name = name; } else { first_part_of_name = name.substr(0, name_dot_pos); } - string scope_to_try(relative_to); + std::string scope_to_try(relative_to); while (true) { // Chop off the last component of the scope. - string::size_type dot_pos = scope_to_try.find_last_of('.'); - if (dot_pos == string::npos) { + std::string::size_type dot_pos = scope_to_try.find_last_of('.'); + if (dot_pos == std::string::npos) { return FindSymbol(name, build_it); } else { scope_to_try.erase(dot_pos); } // Append ".first_part_of_name" and try to find. - string::size_type old_size = scope_to_try.size(); + std::string::size_type old_size = scope_to_try.size(); scope_to_try.append(1, '.'); scope_to_try.append(first_part_of_name); Symbol result = FindSymbol(scope_to_try, build_it); @@ -3819,7 +3816,7 @@ Symbol DescriptorBuilder::LookupSymbolNoPlaceholder(const string& name, } Symbol DescriptorBuilder::LookupSymbol( - const string& name, const string& relative_to, + const std::string& name, const std::string& relative_to, DescriptorPool::PlaceholderType placeholder_type, ResolveMode resolve_mode, bool build_it) { Symbol result = @@ -3832,7 +3829,7 @@ Symbol DescriptorBuilder::LookupSymbol( return result; } -static bool ValidateQualifiedName(const string& name) { +static bool ValidateQualifiedName(const std::string& name) { bool last_was_period = false; for (int i = 0; i < name.size(); i++) { @@ -3852,21 +3849,21 @@ static bool ValidateQualifiedName(const string& name) { return !name.empty() && !last_was_period; } -Symbol DescriptorPool::NewPlaceholder(const string& name, +Symbol DescriptorPool::NewPlaceholder(const std::string& name, PlaceholderType placeholder_type) const { MutexLockMaybe lock(mutex_); return NewPlaceholderWithMutexHeld(name, placeholder_type); } Symbol DescriptorPool::NewPlaceholderWithMutexHeld( - const string& name, PlaceholderType placeholder_type) const { + const std::string& name, PlaceholderType placeholder_type) const { if (mutex_) { mutex_->AssertHeld(); } // Compute names. - const string* placeholder_full_name; - const string* placeholder_name; - const string* placeholder_package; + const std::string* placeholder_full_name; + const std::string* placeholder_name; + const std::string* placeholder_package; if (!ValidateQualifiedName(name)) return kNullSymbol; if (name[0] == '.') { @@ -3876,8 +3873,8 @@ Symbol DescriptorPool::NewPlaceholderWithMutexHeld( placeholder_full_name = tables_->AllocateString(name); } - string::size_type dotpos = placeholder_full_name->find_last_of('.'); - if (dotpos != string::npos) { + std::string::size_type dotpos = placeholder_full_name->find_last_of('.'); + if (dotpos != std::string::npos) { placeholder_package = tables_->AllocateString( placeholder_full_name->substr(0, dotpos)); placeholder_name = tables_->AllocateString( @@ -3954,13 +3951,14 @@ Symbol DescriptorPool::NewPlaceholderWithMutexHeld( } } -FileDescriptor* DescriptorPool::NewPlaceholderFile(const string& name) const { +FileDescriptor* DescriptorPool::NewPlaceholderFile( + const std::string& name) const { MutexLockMaybe lock(mutex_); return NewPlaceholderFileWithMutexHeld(name); } FileDescriptor* DescriptorPool::NewPlaceholderFileWithMutexHeld( - const string& name) const { + const std::string& name) const { if (mutex_) { mutex_->AssertHeld(); } @@ -3981,9 +3979,9 @@ FileDescriptor* DescriptorPool::NewPlaceholderFileWithMutexHeld( return placeholder; } -bool DescriptorBuilder::AddSymbol( - const string& full_name, const void* parent, const string& name, - const Message& proto, Symbol symbol) { +bool DescriptorBuilder::AddSymbol(const std::string& full_name, + const void* parent, const std::string& name, + const Message& proto, Symbol symbol) { // If the caller passed NULL for the parent, the symbol is at file scope. // Use its file as the parent instead. if (parent == NULL) parent = file_; @@ -4003,8 +4001,8 @@ bool DescriptorBuilder::AddSymbol( } else { const FileDescriptor* other_file = tables_->FindSymbol(full_name).GetFile(); if (other_file == file_) { - string::size_type dot_pos = full_name.find_last_of('.'); - if (dot_pos == string::npos) { + std::string::size_type dot_pos = full_name.find_last_of('.'); + if (dot_pos == std::string::npos) { AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, "\"" + full_name + "\" is already defined."); } else { @@ -4023,17 +4021,19 @@ bool DescriptorBuilder::AddSymbol( } } -void DescriptorBuilder::AddPackage( - const string& name, const Message& proto, const FileDescriptor* file) { +void DescriptorBuilder::AddPackage(const std::string& name, + const Message& proto, + const FileDescriptor* file) { if (tables_->AddSymbol(name, Symbol(file))) { // Success. Also add parent package, if any. - string::size_type dot_pos = name.find_last_of('.'); - if (dot_pos == string::npos) { + std::string::size_type dot_pos = name.find_last_of('.'); + if (dot_pos == std::string::npos) { // No parents. ValidateSymbolName(name, name, proto); } else { // Has parent. - string* parent_name = tables_->AllocateString(name.substr(0, dot_pos)); + std::string* parent_name = + tables_->AllocateString(name.substr(0, dot_pos)); AddPackage(*parent_name, proto, file); ValidateSymbolName(name.substr(dot_pos + 1), name, proto); } @@ -4050,8 +4050,9 @@ void DescriptorBuilder::AddPackage( } } -void DescriptorBuilder::ValidateSymbolName( - const string& name, const string& full_name, const Message& proto) { +void DescriptorBuilder::ValidateSymbolName(const std::string& name, + const std::string& full_name, + const Message& proto) { if (name.empty()) { AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, "Missing name."); @@ -4096,7 +4097,7 @@ void DescriptorBuilder::AllocateOptions(const FileOptions& orig_options, template void DescriptorBuilder::AllocateOptionsImpl( - const string& name_scope, const string& element_name, + const std::string& name_scope, const std::string& element_name, const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor, const std::vector& options_path) { // We need to use a dummy pointer to work around a bug in older versions of @@ -4144,7 +4145,7 @@ void DescriptorBuilder::AllocateOptionsImpl( void DescriptorBuilder::AddRecursiveImportError( const FileDescriptorProto& proto, int from_here) { - string error_message("File recursively imports itself: "); + std::string error_message("File recursively imports itself: "); for (int i = from_here; i < tables_->pending_files_.size(); i++) { error_message.append(tables_->pending_files_[i]); error_message.append(" -> "); @@ -4163,7 +4164,7 @@ void DescriptorBuilder::AddTwiceListedError(const FileDescriptorProto& proto, void DescriptorBuilder::AddImportError(const FileDescriptorProto& proto, int index) { - string message; + std::string message; if (pool_->fallback_database_ == NULL) { message = "Import \"" + proto.dependency(index) + "\" has not been loaded."; @@ -4320,14 +4321,14 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( } // Make sure all dependencies are loaded. - std::set seen_dependencies; + std::set seen_dependencies; result->dependency_count_ = proto.dependency_size(); result->dependencies_ = tables_->AllocateArray(proto.dependency_size()); if (pool_->lazily_build_dependencies_) { result->dependencies_once_ = tables_->AllocateOnceDynamic(); result->dependencies_names_ = - tables_->AllocateArray(proto.dependency_size()); + tables_->AllocateArray(proto.dependency_size()); if (proto.dependency_size() > 0) { memset(result->dependencies_names_, 0, sizeof(*result->dependencies_names_) * proto.dependency_size()); @@ -4503,9 +4504,9 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl( void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, const Descriptor* parent, Descriptor* result) { - const string& scope = (parent == NULL) ? - file_->package() : parent->full_name(); - string* full_name = tables_->AllocateString(scope); + const std::string& scope = + (parent == NULL) ? file_->package() : parent->full_name(); + std::string* full_name = tables_->AllocateString(scope); if (!full_name->empty()) full_name->append(1, '.'); full_name->append(proto.name()); @@ -4531,7 +4532,7 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, int reserved_name_count = proto.reserved_name_size(); result->reserved_name_count_ = reserved_name_count; result->reserved_names_ = - tables_->AllocateArray(reserved_name_count); + tables_->AllocateArray(reserved_name_count); for (int i = 0; i < reserved_name_count; ++i) { result->reserved_names_[i] = tables_->AllocateString(proto.reserved_name(i)); @@ -4564,9 +4565,9 @@ void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, } } - HASH_SET reserved_name_set; + HASH_SET reserved_name_set; for (int i = 0; i < proto.reserved_name_size(); i++) { - const string& name = proto.reserved_name(i); + const std::string& name = proto.reserved_name(i); if (reserved_name_set.find(name) == reserved_name_set.end()) { reserved_name_set.insert(name); } else { @@ -4641,9 +4642,9 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, const Descriptor* parent, FieldDescriptor* result, bool is_extension) { - const string& scope = (parent == NULL) ? - file_->package() : parent->full_name(); - string* full_name = tables_->AllocateString(scope); + const std::string& scope = + (parent == NULL) ? file_->package() : parent->full_name(); + std::string* full_name = tables_->AllocateString(scope); if (!full_name->empty()) full_name->append(1, '.'); full_name->append(proto.name()); @@ -4656,9 +4657,9 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, result->is_extension_ = is_extension; // If .proto files follow the style guide then the name should already be - // lower-cased. If that's the case we can just reuse the string we already - // allocated rather than allocate a new one. - string lowercase_name(proto.name()); + // lower-cased. If that's the case we can just reuse the string we + // already allocated rather than allocate a new one. + std::string lowercase_name(proto.name()); LowerString(&lowercase_name); if (lowercase_name == proto.name()) { result->lowercase_name_ = result->name_; @@ -4684,9 +4685,9 @@ void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, // Some compilers do not allow static_cast directly between two enum types, // so we must cast to int first. result->type_ = static_cast( - ::google::protobuf::implicit_cast(proto.type())); + implicit_cast(proto.type())); result->label_ = static_cast( - ::google::protobuf::implicit_cast(proto.label())); + implicit_cast(proto.label())); // An extension cannot have a required field (b/13365836). if (result->is_extension_ && @@ -5000,7 +5001,7 @@ void DescriptorBuilder::BuildReservedRange( void DescriptorBuilder::BuildOneof(const OneofDescriptorProto& proto, Descriptor* parent, OneofDescriptor* result) { - string* full_name = tables_->AllocateString(parent->full_name()); + std::string* full_name = tables_->AllocateString(parent->full_name()); full_name->append(1, '.'); full_name->append(proto.name()); @@ -5056,12 +5057,12 @@ void DescriptorBuilder::CheckEnumValueUniqueness( // NAME_TYPE_LAST_NAME = 2, // } PrefixRemover remover(result->name()); - std::map values; + std::map values; for (int i = 0; i < result->value_count(); i++) { const EnumValueDescriptor* value = result->value(i); - string stripped = + std::string stripped = EnumValueToPascalCase(remover.MaybeRemove(value->name())); - std::pair::iterator, bool> + std::pair::iterator, bool> insert_result = values.insert(std::make_pair(stripped, value)); bool inserted = insert_result.second; @@ -5073,7 +5074,7 @@ void DescriptorBuilder::CheckEnumValueUniqueness( // stripping should de-dup the labels in this case). if (!inserted && insert_result.first->second->name() != value->name() && insert_result.first->second->number() != value->number()) { - string error_message = + std::string error_message = "Enum name " + value->name() + " has the same name as " + values[stripped]->name() + " if you ignore case and strip out the enum name prefix (if any). " @@ -5096,9 +5097,9 @@ void DescriptorBuilder::CheckEnumValueUniqueness( void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, const Descriptor* parent, EnumDescriptor* result) { - const string& scope = (parent == NULL) ? - file_->package() : parent->full_name(); - string* full_name = tables_->AllocateString(scope); + const std::string& scope = + (parent == NULL) ? file_->package() : parent->full_name(); + std::string* full_name = tables_->AllocateString(scope); if (!full_name->empty()) full_name->append(1, '.'); full_name->append(proto.name()); @@ -5126,7 +5127,7 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, int reserved_name_count = proto.reserved_name_size(); result->reserved_name_count_ = reserved_name_count; result->reserved_names_ = - tables_->AllocateArray(reserved_name_count); + tables_->AllocateArray(reserved_name_count); for (int i = 0; i < reserved_name_count; ++i) { result->reserved_names_[i] = tables_->AllocateString(proto.reserved_name(i)); @@ -5162,9 +5163,9 @@ void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, } } - HASH_SET reserved_name_set; + HASH_SET reserved_name_set; for (int i = 0; i < proto.reserved_name_size(); i++) { - const string& name = proto.reserved_name(i); + const std::string& name = proto.reserved_name(i); if (reserved_name_set.find(name) == reserved_name_set.end()) { reserved_name_set.insert(name); } else { @@ -5205,7 +5206,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, // Note: full_name for enum values is a sibling to the parent's name, not a // child of it. - string* full_name = tables_->AllocateString(*parent->full_name_); + std::string* full_name = tables_->AllocateString(*parent->full_name_); full_name->resize(full_name->size() - parent->name_->size()); full_name->append(*result->name_); result->full_name_ = full_name; @@ -5238,7 +5239,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, // This value did not conflict with any values defined in the same enum, // but it did conflict with some other symbol defined in the enum type's // scope. Let's print an additional error to explain this. - string outer_scope; + std::string outer_scope; if (parent->containing_type() == NULL) { outer_scope = file_->package(); } else { @@ -5268,7 +5269,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, const void* /* dummy */, ServiceDescriptor* result) { - string* full_name = tables_->AllocateString(file_->package()); + std::string* full_name = tables_->AllocateString(file_->package()); if (!full_name->empty()) full_name->append(1, '.'); full_name->append(proto.name()); @@ -5298,7 +5299,7 @@ void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto, result->name_ = tables_->AllocateString(proto.name()); result->service_ = parent; - string* full_name = tables_->AllocateString(parent->full_name()); + std::string* full_name = tables_->AllocateString(parent->full_name()); full_name->append(1, '.'); full_name->append(*result->name_); result->full_name_ = full_name; @@ -5525,7 +5526,7 @@ void DescriptorBuilder::CrossLinkField( if (is_lazy) { // Save the symbol names for later for lookup, and allocate the once // object needed for the accessors. - string name = proto.type_name(); + std::string name = proto.type_name(); field->type_once_ = tables_->AllocateOnceDynamic(); field->type_name_ = tables_->AllocateString(name); if (proto.has_default_value()) { @@ -5658,9 +5659,10 @@ void DescriptorBuilder::CrossLinkField( const FieldDescriptor* conflicting_field = file_tables_->FindFieldByNumber(field->containing_type(), field->number()); - string containing_type_name = field->containing_type() == NULL - ? "unknown" - : field->containing_type()->full_name(); + std::string containing_type_name = + field->containing_type() == NULL + ? "unknown" + : field->containing_type()->full_name(); if (field->is_extension()) { AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, @@ -5683,11 +5685,11 @@ void DescriptorBuilder::CrossLinkField( if (!tables_->AddExtension(field)) { const FieldDescriptor* conflicting_field = tables_->FindExtension(field->containing_type(), field->number()); - string containing_type_name = + std::string containing_type_name = field->containing_type() == NULL ? "unknown" : field->containing_type()->full_name(); - string error_msg = strings::Substitute( + std::string error_msg = strings::Substitute( "Extension number $0 has already been used in \"$1\" by extension " "\"$2\" defined in $3.", field->number(), containing_type_name, @@ -5837,8 +5839,8 @@ void DescriptorBuilder::ValidateProto3( } } -static string ToLowercaseWithoutUnderscores(const string& name) { - string result; +static std::string ToLowercaseWithoutUnderscores(const std::string& name) { + std::string result; for (int i = 0; i < name.size(); ++i) { if (name[i] != '_') { if (name[i] >= 'A' && name[i] <= 'Z') { @@ -5882,10 +5884,10 @@ void DescriptorBuilder::ValidateProto3Message( // In proto3, we reject field names if they conflict in camelCase. // Note that we currently enforce a stricter rule: Field names must be // unique after being converted to lowercase with underscores removed. - std::map name_to_field; + std::map name_to_field; for (int i = 0; i < message->field_count(); ++i) { - string lowercase_name = ToLowercaseWithoutUnderscores( - message->field(i)->name()); + std::string lowercase_name = + ToLowercaseWithoutUnderscores(message->field(i)->name()); if (name_to_field.find(lowercase_name) != name_to_field.end()) { AddError(message->full_name(), proto, DescriptorPool::ErrorCollector::OTHER, @@ -6056,14 +6058,15 @@ void DescriptorBuilder::ValidateEnumOptions(EnumDescriptor* enm, const EnumDescriptorProto& proto) { VALIDATE_OPTIONS_FROM_ARRAY(enm, value, EnumValue); if (!enm->options().has_allow_alias() || !enm->options().allow_alias()) { - std::map used_values; + std::map used_values; for (int i = 0; i < enm->value_count(); ++i) { const EnumValueDescriptor* enum_value = enm->value(i); if (used_values.find(enum_value->number()) != used_values.end()) { - string error = + std::string error = "\"" + enum_value->full_name() + "\" uses the same enum value as \"" + - used_values[enum_value->number()] + "\". If this is intended, set " + used_values[enum_value->number()] + + "\". If this is intended, set " "'option allow_alias = true;' to the enum definition."; if (!enm->options().allow_alias()) { // Generate error if duplicated enum values are explicitly disallowed. @@ -6183,10 +6186,10 @@ bool DescriptorBuilder::ValidateMapEntry(FieldDescriptor* field, void DescriptorBuilder::DetectMapConflicts(const Descriptor* message, const DescriptorProto& proto) { - std::map seen_types; + std::map seen_types; for (int i = 0; i < message->nested_type_count(); ++i) { const Descriptor* nested = message->nested_type(i); - std::pair::iterator, bool> result = + std::pair::iterator, bool> result = seen_types.insert(std::make_pair(nested->name(), nested)); if (!result.second) { if (result.first->second->options().map_entry() || @@ -6203,7 +6206,7 @@ void DescriptorBuilder::DetectMapConflicts(const Descriptor* message, // Check for conflicted field names. for (int i = 0; i < message->field_count(); ++i) { const FieldDescriptor* field = message->field(i); - std::map::iterator iter = + std::map::iterator iter = seen_types.find(field->name()); if (iter != seen_types.end() && iter->second->options().map_entry()) { AddError(message->full_name(), proto, @@ -6215,7 +6218,7 @@ void DescriptorBuilder::DetectMapConflicts(const Descriptor* message, // Check for conflicted enum names. for (int i = 0; i < message->enum_type_count(); ++i) { const EnumDescriptor* enum_desc = message->enum_type(i); - std::map::iterator iter = + std::map::iterator iter = seen_types.find(enum_desc->name()); if (iter != seen_types.end() && iter->second->options().map_entry()) { AddError(message->full_name(), proto, @@ -6227,7 +6230,7 @@ void DescriptorBuilder::DetectMapConflicts(const Descriptor* message, // Check for conflicted oneof names. for (int i = 0; i < message->oneof_decl_count(); ++i) { const OneofDescriptor* oneof_desc = message->oneof_decl(i); - std::map::iterator iter = + std::map::iterator iter = seen_types.find(oneof_desc->name()); if (iter != seen_types.end() && iter->second->options().map_entry()) { AddError(message->full_name(), proto, @@ -6346,7 +6349,7 @@ bool DescriptorBuilder::OptionInterpreter::InterpretOptions( std::unique_ptr unparsed_options(options->New()); options->GetReflection()->Swap(unparsed_options.get(), options); - string buf; + std::string buf; if (!unparsed_options->AppendToString(&buf) || !options->ParseFromString(buf)) { builder_->AddError( @@ -6409,12 +6412,12 @@ bool DescriptorBuilder::OptionInterpreter::InterpretSingleOption( const Descriptor* descriptor = options_descriptor; const FieldDescriptor* field = NULL; std::vector intermediate_fields; - string debug_msg_name = ""; + std::string debug_msg_name = ""; std::vector dest_path = options_path; for (int i = 0; i < uninterpreted_option_->name_size(); ++i) { - const string& name_part = uninterpreted_option_->name(i).name_part(); + const std::string& name_part = uninterpreted_option_->name(i).name_part(); if (debug_msg_name.size() > 0) { debug_msg_name += "."; } @@ -6677,7 +6680,7 @@ bool DescriptorBuilder::OptionInterpreter::ExamineIfOptionIsSet( std::vector::const_iterator intermediate_fields_iter, std::vector::const_iterator intermediate_fields_end, - const FieldDescriptor* innermost_field, const string& debug_msg_name, + const FieldDescriptor* innermost_field, const std::string& debug_msg_name, const UnknownFieldSet& unknown_fields) { // We do linear searches of the UnknownFieldSet and its sub-groups. This // should be fine since it's unlikely that any one options structure will @@ -6873,13 +6876,13 @@ bool DescriptorBuilder::OptionInterpreter::SetOptionValue( "\"" + option_field->full_name() + "\"."); } const EnumDescriptor* enum_type = option_field->enum_type(); - const string& value_name = uninterpreted_option_->identifier_value(); + const std::string& value_name = uninterpreted_option_->identifier_value(); const EnumValueDescriptor* enum_value = NULL; if (enum_type->file()->pool() != DescriptorPool::generated_pool()) { // Note that the enum value's fully-qualified name is a sibling of the // enum's name, not a child of it. - string fully_qualified_name = enum_type->full_name(); + std::string fully_qualified_name = enum_type->full_name(); fully_qualified_name.resize(fully_qualified_name.size() - enum_type->name().size()); fully_qualified_name += value_name; @@ -6922,8 +6925,10 @@ bool DescriptorBuilder::OptionInterpreter::SetOptionValue( case FieldDescriptor::CPPTYPE_STRING: if (!uninterpreted_option_->has_string_value()) { - return AddValueError("Value must be quoted string for string option " - "\"" + option_field->full_name() + "\"."); + return AddValueError( + "Value must be quoted string for string option " + "\"" + + option_field->full_name() + "\"."); } // The string has already been unquoted and unescaped by the parser. unknown_fields->AddLengthDelimited(option_field->number(), @@ -6946,7 +6951,7 @@ class DescriptorBuilder::OptionInterpreter::AggregateOptionFinder DescriptorBuilder* builder_; const FieldDescriptor* FindExtension(Message* message, - const string& name) const override { + const std::string& name) const override { assert_mutex_held(builder_->pool_); const Descriptor* descriptor = message->GetDescriptor(); Symbol result = builder_->LookupSymbolNoPlaceholder( @@ -6981,10 +6986,10 @@ class DescriptorBuilder::OptionInterpreter::AggregateOptionFinder namespace { class AggregateErrorCollector : public io::ErrorCollector { public: - string error_; + std::string error_; void AddError(int /* line */, int /* column */, - const string& message) override { + const std::string& message) override { if (!error_.empty()) { error_ += "; "; } @@ -6992,7 +6997,7 @@ class AggregateErrorCollector : public io::ErrorCollector { } void AddWarning(int /* line */, int /* column */, - const string& /* message */) override { + const std::string& /* message */) override { // Ignore warnings } }; @@ -7031,7 +7036,7 @@ bool DescriptorBuilder::OptionInterpreter::SetAggregateOption( option_field->name() + "\": " + collector.error_); return false; } else { - string serial; + std::string serial; dynamic->SerializeToString(&serial); // Never fails if (option_field->type() == FieldDescriptor::TYPE_MESSAGE) { unknown_fields->AddLengthDelimited(option_field->number(), serial); @@ -7127,7 +7132,7 @@ void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto, const FileDescriptor* result) { if (!unused_dependency_.empty()) { - std::set annotation_extensions; + std::set annotation_extensions; annotation_extensions.insert("google.protobuf.MessageOptions"); annotation_extensions.insert("google.protobuf.FileOptions"); annotation_extensions.insert("google.protobuf.FieldOptions"); @@ -7151,7 +7156,8 @@ void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto, } // Log warnings for unused imported files. if (i == (*it)->extension_count()) { - string error_message = "Import " + (*it)->name() + " but not used."; + std::string error_message = + "Import " + (*it)->name() + " but not used."; AddWarning((*it)->name(), proto, DescriptorPool::ErrorCollector::OTHER, error_message); } @@ -7159,9 +7165,9 @@ void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto, } } -Symbol DescriptorPool::CrossLinkOnDemandHelper(const string& name, +Symbol DescriptorPool::CrossLinkOnDemandHelper(const std::string& name, bool expecting_enum) const { - string lookup_name = name; + std::string lookup_name = name; if (!lookup_name.empty() && lookup_name[0] == '.') { lookup_name = lookup_name.substr(1); } @@ -7190,10 +7196,10 @@ void FieldDescriptor::InternalTypeOnceInit() const { if (default_value_enum_name_) { // Have to build the full name now instead of at CrossLink time, // because enum_type_ may not be known at the time. - string name = enum_type_->full_name(); + std::string name = enum_type_->full_name(); // Enum values reside in the same scope as the enum type. - string::size_type last_dot = name.find_last_of('.'); - if (last_dot != string::npos) { + std::string::size_type last_dot = name.find_last_of('.'); + if (last_dot != std::string::npos) { name = name.substr(0, last_dot) + "." + *default_value_enum_name_; } else { name = *default_value_enum_name_; @@ -7280,7 +7286,8 @@ void LazyDescriptor::Set(const Descriptor* descriptor) { descriptor_ = descriptor; } -void LazyDescriptor::SetLazy(const string& name, const FileDescriptor* file) { +void LazyDescriptor::SetLazy(const std::string& name, + const FileDescriptor* file) { // verify Init() has been called and Set hasn't been called yet. GOOGLE_CHECK(!descriptor_); GOOGLE_CHECK(!file_); diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h index 7da7546d9d..add275c55e 100644 --- a/src/google/protobuf/descriptor.h +++ b/src/google/protobuf/descriptor.h @@ -73,6 +73,7 @@ #define PROTOBUF_EXPORT #endif + namespace google { namespace protobuf { @@ -386,11 +387,13 @@ class PROTOBUF_EXPORT Descriptor { // Similar to FindFieldByLowercaseName(), but finds extensions defined within // this message type's scope. - const FieldDescriptor* FindExtensionByLowercaseName(const std::string& name) const; + const FieldDescriptor* FindExtensionByLowercaseName( + const std::string& name) const; // Similar to FindFieldByCamelcaseName(), but finds extensions defined within // this message type's scope. - const FieldDescriptor* FindExtensionByCamelcaseName(const std::string& name) const; + const FieldDescriptor* FindExtensionByCamelcaseName( + const std::string& name) const; // Reserved fields ------------------------------------------------- @@ -446,7 +449,7 @@ class PROTOBUF_EXPORT Descriptor { // correct depth. Takes |options| to control debug-string options, and // |include_opening_clause| to indicate whether the "message ... " part of the // clause has already been generated (this varies depending on context). - void DebugString(int depth, std::string *contents, + void DebugString(int depth, std::string* contents, const DebugStringOptions& options, bool include_opening_clause) const; @@ -588,9 +591,9 @@ class PROTOBUF_EXPORT FieldDescriptor { // Users may not declare fields that use reserved numbers. static const int kLastReservedNumber = 19999; - const std::string& name() const; // Name of this field within the message. - const std::string& full_name() const; // Fully-qualified name of the field. - const std::string& json_name() const; // JSON name of this field. + const std::string& name() const; // Name of this field within the message. + const std::string& full_name() const; // Fully-qualified name of the field. + const std::string& json_name() const; // JSON name of this field. const FileDescriptor* file() const;// File in which this field was defined. bool is_extension() const; // Is this an extension field? int number() const; // Declared tag number. @@ -744,7 +747,8 @@ class PROTOBUF_EXPORT FieldDescriptor { // See Descriptor::DebugString(). enum PrintLabelFlag { PRINT_LABEL, OMIT_LABEL }; void DebugString(int depth, PrintLabelFlag print_label_flag, - std::string* contents, const DebugStringOptions& options) const; + std::string* contents, + const DebugStringOptions& options) const; // formats the default value appropriately and returns it as a string. // Must have a default value to call this. If quote_string_type is true, then @@ -1012,7 +1016,7 @@ class PROTOBUF_EXPORT EnumDescriptor { // See Descriptor::DebugString(). - void DebugString(int depth, std::string *contents, + void DebugString(int depth, std::string* contents, const DebugStringOptions& options) const; // Walks up the descriptor tree to generate the source location path @@ -1094,7 +1098,6 @@ class PROTOBUF_EXPORT EnumValueDescriptor { // See Descriptor::DebugStringWithOptions(). std::string DebugStringWithOptions(const DebugStringOptions& options) const; - // Source Location --------------------------------------------------- // Updates |*out_location| to the source location of the complete @@ -1110,7 +1113,7 @@ class PROTOBUF_EXPORT EnumValueDescriptor { friend class compiler::cpp::Formatter; // See Descriptor::DebugString(). - void DebugString(int depth, std::string *contents, + void DebugString(int depth, std::string* contents, const DebugStringOptions& options) const; // Walks up the descriptor tree to generate the source location path @@ -1174,7 +1177,6 @@ class PROTOBUF_EXPORT ServiceDescriptor { // See Descriptor::DebugStringWithOptions(). std::string DebugStringWithOptions(const DebugStringOptions& options) const; - // Source Location --------------------------------------------------- // Updates |*out_location| to the source location of the complete @@ -1190,7 +1192,8 @@ class PROTOBUF_EXPORT ServiceDescriptor { friend class compiler::cpp::Formatter; // See Descriptor::DebugString(). - void DebugString(std::string *contents, const DebugStringOptions& options) const; + void DebugString(std::string* contents, + const DebugStringOptions& options) const; // Walks up the descriptor tree to generate the source location path // to this descriptor from the file root. @@ -1260,7 +1263,6 @@ class PROTOBUF_EXPORT MethodDescriptor { // See Descriptor::DebugStringWithOptions(). std::string DebugStringWithOptions(const DebugStringOptions& options) const; - // Source Location --------------------------------------------------- // Updates |*out_location| to the source location of the complete @@ -1276,7 +1278,7 @@ class PROTOBUF_EXPORT MethodDescriptor { friend class compiler::cpp::Formatter; // See Descriptor::DebugString(). - void DebugString(int depth, std::string *contents, + void DebugString(int depth, std::string* contents, const DebugStringOptions& options) const; // Walks up the descriptor tree to generate the source location path @@ -1398,10 +1400,12 @@ class PROTOBUF_EXPORT FileDescriptor { const FieldDescriptor* FindExtensionByName(const std::string& name) const; // Similar to FindExtensionByName(), but searches by lowercased-name. See // Descriptor::FindFieldByLowercaseName(). - const FieldDescriptor* FindExtensionByLowercaseName(const std::string& name) const; + const FieldDescriptor* FindExtensionByLowercaseName( + const std::string& name) const; // Similar to FindExtensionByName(), but searches by camelcased-name. See // Descriptor::FindFieldByCamelcaseName(). - const FieldDescriptor* FindExtensionByCamelcaseName(const std::string& name) const; + const FieldDescriptor* FindExtensionByCamelcaseName( + const std::string& name) const; // See Descriptor::CopyTo(). // Notes: @@ -1629,22 +1633,24 @@ class PROTOBUF_EXPORT DescriptorPool { // Reports an error in the FileDescriptorProto. Use this function if the // problem occurred should interrupt building the FileDescriptorProto. virtual void AddError( - const std::string& filename, // File name in which the error occurred. - const std::string& element_name, // Full name of the erroneous element. - const Message* descriptor, // Descriptor of the erroneous element. - ErrorLocation location, // One of the location constants, above. - const std::string& message // Human-readable error message. - ) = 0; + const std::string& filename, // File name in which the error occurred. + const std::string& element_name, // Full name of the erroneous element. + const Message* descriptor, // Descriptor of the erroneous element. + ErrorLocation location, // One of the location constants, above. + const std::string& message // Human-readable error message. + ) = 0; // Reports a warning in the FileDescriptorProto. Use this function if the // problem occurred should NOT interrupt building the FileDescriptorProto. virtual void AddWarning( - const std::string& /*filename*/, // File name in which the error occurred. - const std::string& /*element_name*/, // Full name of the erroneous element. - const Message* /*descriptor*/, // Descriptor of the erroneous element. - ErrorLocation /*location*/, // One of the location constants, above. - const std::string& /*message*/ // Human-readable error message. - ) {} + const std::string& /*filename*/, // File name in which the error + // occurred. + const std::string& /*element_name*/, // Full name of the erroneous + // element. + const Message* /*descriptor*/, // Descriptor of the erroneous element. + ErrorLocation /*location*/, // One of the location constants, above. + const std::string& /*message*/ // Human-readable error message. + ) {} private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector); @@ -1758,7 +1764,6 @@ class PROTOBUF_EXPORT DescriptorPool { // lazy descriptor initialization behavior. bool InternalIsFileLoaded(const std::string& filename) const; - // Add a file to unused_import_track_files_. DescriptorBuilder will log // warnings for those files if there is any unused import. void AddUnusedImportTrackFile(const std::string& file_name); @@ -1801,11 +1806,13 @@ class PROTOBUF_EXPORT DescriptorPool { // symbol is defined if necessary. Will create a placeholder if the type // doesn't exist in the fallback database, or the file doesn't build // successfully. - Symbol CrossLinkOnDemandHelper(const std::string& name, bool expecting_enum) const; + Symbol CrossLinkOnDemandHelper(const std::string& name, + bool expecting_enum) const; // Create a placeholder FileDescriptor of the specified name FileDescriptor* NewPlaceholderFile(const std::string& name) const; - FileDescriptor* NewPlaceholderFileWithMutexHeld(const std::string& name) const; + FileDescriptor* NewPlaceholderFileWithMutexHeld( + const std::string& name) const; enum PlaceholderType { PLACEHOLDER_MESSAGE, diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 59321e9c79..ac57cd5991 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,171 +16,169 @@ // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; -namespace google { -namespace protobuf { +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto; +PROTOBUF_NAMESPACE_OPEN class FileDescriptorSetDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _FileDescriptorSet_default_instance_; class FileDescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _FileDescriptorProto_default_instance_; class DescriptorProto_ExtensionRangeDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _DescriptorProto_ExtensionRange_default_instance_; class DescriptorProto_ReservedRangeDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _DescriptorProto_ReservedRange_default_instance_; class DescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _DescriptorProto_default_instance_; class ExtensionRangeOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ExtensionRangeOptions_default_instance_; class FieldDescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _FieldDescriptorProto_default_instance_; class OneofDescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _OneofDescriptorProto_default_instance_; class EnumDescriptorProto_EnumReservedRangeDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _EnumDescriptorProto_EnumReservedRange_default_instance_; class EnumDescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _EnumDescriptorProto_default_instance_; class EnumValueDescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _EnumValueDescriptorProto_default_instance_; class ServiceDescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ServiceDescriptorProto_default_instance_; class MethodDescriptorProtoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _MethodDescriptorProto_default_instance_; class FileOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _FileOptions_default_instance_; class MessageOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _MessageOptions_default_instance_; class FieldOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _FieldOptions_default_instance_; class OneofOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _OneofOptions_default_instance_; class EnumOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _EnumOptions_default_instance_; class EnumValueOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _EnumValueOptions_default_instance_; class ServiceOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ServiceOptions_default_instance_; class MethodOptionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _MethodOptions_default_instance_; class UninterpretedOption_NamePartDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _UninterpretedOption_NamePart_default_instance_; class UninterpretedOptionDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _UninterpretedOption_default_instance_; class SourceCodeInfo_LocationDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _SourceCodeInfo_Location_default_instance_; class SourceCodeInfoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _SourceCodeInfo_default_instance_; class GeneratedCodeInfo_AnnotationDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _GeneratedCodeInfo_Annotation_default_instance_; class GeneratedCodeInfoDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _GeneratedCodeInfo_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsFileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_FileDescriptorSet_default_instance_; - new (ptr) ::google::protobuf::FileDescriptorSet(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_FileDescriptorSet_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::FileDescriptorSet(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::FileDescriptorSet::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::FileDescriptorSet::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsFileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_FileDescriptorProto_default_instance_; - new (ptr) ::google::protobuf::FileDescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_FileDescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::FileDescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::FileDescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::FileDescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsFileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsFileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, @@ -192,44 +190,44 @@ static void InitDefaultsDescriptorProto_ExtensionRange_google_2fprotobuf_2fdescr GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_DescriptorProto_ExtensionRange_default_instance_; - new (ptr) ::google::protobuf::DescriptorProto_ExtensionRange(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_DescriptorProto_ExtensionRange_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::DescriptorProto_ExtensionRange::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsDescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_DescriptorProto_ReservedRange_default_instance_; - new (ptr) ::google::protobuf::DescriptorProto_ReservedRange(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_DescriptorProto_ReservedRange_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::DescriptorProto_ReservedRange::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_DescriptorProto_default_instance_; - new (ptr) ::google::protobuf::DescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_DescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::DescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::DescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::DescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<6> scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 6, InitDefaultsDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto.base, @@ -241,74 +239,74 @@ static void InitDefaultsExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2ep GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_ExtensionRangeOptions_default_instance_; - new (ptr) ::google::protobuf::ExtensionRangeOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_ExtensionRangeOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::ExtensionRangeOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsFieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_FieldDescriptorProto_default_instance_; - new (ptr) ::google::protobuf::FieldDescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_FieldDescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::FieldDescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::FieldDescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsOneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_OneofDescriptorProto_default_instance_; - new (ptr) ::google::protobuf::OneofDescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_OneofDescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::OneofDescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::OneofDescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::OneofDescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsOneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsOneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsEnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_EnumDescriptorProto_EnumReservedRange_default_instance_; - new (ptr) ::google::protobuf::EnumDescriptorProto_EnumReservedRange(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_EnumDescriptorProto_EnumReservedRange_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::EnumDescriptorProto_EnumReservedRange::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsEnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_EnumDescriptorProto_default_instance_; - new (ptr) ::google::protobuf::EnumDescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_EnumDescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::EnumDescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::EnumDescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<3> scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsEnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsEnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base,}}; @@ -317,30 +315,30 @@ static void InitDefaultsEnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_ GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_EnumValueDescriptorProto_default_instance_; - new (ptr) ::google::protobuf::EnumValueDescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_EnumValueDescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::EnumValueDescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_ServiceDescriptorProto_default_instance_; - new (ptr) ::google::protobuf::ServiceDescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_ServiceDescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::ServiceDescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<2> scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base, &scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; @@ -348,283 +346,283 @@ static void InitDefaultsMethodDescriptorProto_google_2fprotobuf_2fdescriptor_2ep GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_MethodDescriptorProto_default_instance_; - new (ptr) ::google::protobuf::MethodDescriptorProto(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_MethodDescriptorProto_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::MethodDescriptorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::MethodDescriptorProto::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::MethodDescriptorProto::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsFileOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_FileOptions_default_instance_; - new (ptr) ::google::protobuf::FileOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_FileOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::FileOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::FileOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::FileOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFileOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFileOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsMessageOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_MessageOptions_default_instance_; - new (ptr) ::google::protobuf::MessageOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_MessageOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::MessageOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::MessageOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::MessageOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMessageOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMessageOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsFieldOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_FieldOptions_default_instance_; - new (ptr) ::google::protobuf::FieldOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_FieldOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::FieldOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::FieldOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::FieldOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFieldOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsFieldOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsOneofOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_OneofOptions_default_instance_; - new (ptr) ::google::protobuf::OneofOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_OneofOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::OneofOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::OneofOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::OneofOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsOneofOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsOneofOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsEnumOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_EnumOptions_default_instance_; - new (ptr) ::google::protobuf::EnumOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_EnumOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::EnumOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::EnumOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::EnumOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEnumOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEnumOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsEnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_EnumValueOptions_default_instance_; - new (ptr) ::google::protobuf::EnumValueOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_EnumValueOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::EnumValueOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::EnumValueOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::EnumValueOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsServiceOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_ServiceOptions_default_instance_; - new (ptr) ::google::protobuf::ServiceOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_ServiceOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::ServiceOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::ServiceOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::ServiceOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsServiceOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsServiceOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsMethodOptions_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_MethodOptions_default_instance_; - new (ptr) ::google::protobuf::MethodOptions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_MethodOptions_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::MethodOptions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::MethodOptions::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::MethodOptions::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethodOptions_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMethodOptions_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsUninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_UninterpretedOption_NamePart_default_instance_; - new (ptr) ::google::protobuf::UninterpretedOption_NamePart(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_UninterpretedOption_NamePart_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::UninterpretedOption_NamePart::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsUninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_UninterpretedOption_default_instance_; - new (ptr) ::google::protobuf::UninterpretedOption(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_UninterpretedOption_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::UninterpretedOption(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::UninterpretedOption::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::UninterpretedOption::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsUninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsUninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsSourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_SourceCodeInfo_Location_default_instance_; - new (ptr) ::google::protobuf::SourceCodeInfo_Location(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_Location_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::SourceCodeInfo_Location::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsSourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_SourceCodeInfo_default_instance_; - new (ptr) ::google::protobuf::SourceCodeInfo(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::SourceCodeInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::SourceCodeInfo::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::SourceCodeInfo::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto.base,}}; static void InitDefaultsGeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_GeneratedCodeInfo_Annotation_default_instance_; - new (ptr) ::google::protobuf::GeneratedCodeInfo_Annotation(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_Annotation_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::GeneratedCodeInfo_Annotation::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto}, {}}; static void InitDefaultsGeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_GeneratedCodeInfo_default_instance_; - new (ptr) ::google::protobuf::GeneratedCodeInfo(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::GeneratedCodeInfo::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsGeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsGeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto}, { &scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto.base,}}; void InitDefaults_google_2fprotobuf_2fdescriptor_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); -} - -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[27]; -static const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[6]; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto = nullptr; - -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorSet, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorSet, _internal_metadata_), + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); +} + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[27]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[6]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorSet, file_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorSet, file_), ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, package_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, dependency_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, public_dependency_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, weak_dependency_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, message_type_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, enum_type_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, service_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, extension_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, options_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, source_code_info_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileDescriptorProto, syntax_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, package_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, dependency_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, public_dependency_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, weak_dependency_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, message_type_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, enum_type_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, service_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, extension_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, source_code_info_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileDescriptorProto, syntax_), 0, 1, ~0u, @@ -637,41 +635,41 @@ const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2epr 3, 4, 2, - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ExtensionRange, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ExtensionRange, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ExtensionRange, start_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ExtensionRange, end_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ExtensionRange, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, start_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, end_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange, options_), 1, 2, 0, - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ReservedRange, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ReservedRange, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ReservedRange, start_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto_ReservedRange, end_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, start_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange, end_), 0, 1, - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, field_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, extension_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, nested_type_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, enum_type_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, extension_range_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, oneof_decl_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, options_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, reserved_range_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::DescriptorProto, reserved_name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, field_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, extension_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, nested_type_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, enum_type_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, extension_range_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, oneof_decl_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, reserved_range_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::DescriptorProto, reserved_name_), 0, ~0u, ~0u, @@ -682,28 +680,28 @@ const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2epr 1, ~0u, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::ExtensionRangeOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ExtensionRangeOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ExtensionRangeOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::ExtensionRangeOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions, uninterpreted_option_), ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, number_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, label_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, type_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, type_name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, extendee_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, default_value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, oneof_index_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, json_name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldDescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, number_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, label_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, type_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, type_name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, extendee_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, default_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, oneof_index_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, json_name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto, options_), 0, 6, 8, @@ -714,104 +712,104 @@ const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2epr 7, 4, 5, - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofDescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofDescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofDescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofDescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto, options_), 0, 1, - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto_EnumReservedRange, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto_EnumReservedRange, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto_EnumReservedRange, start_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto_EnumReservedRange, end_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, start_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange, end_), 0, 1, - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto, value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto, options_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto, reserved_range_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumDescriptorProto, reserved_name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, reserved_range_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto, reserved_name_), 0, ~0u, 1, ~0u, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueDescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueDescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueDescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueDescriptorProto, number_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueDescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, number_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto, options_), 0, 2, 1, - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceDescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceDescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceDescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceDescriptorProto, method_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceDescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, method_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto, options_), 0, ~0u, 1, - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, input_type_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, output_type_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, options_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, client_streaming_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodDescriptorProto, server_streaming_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, input_type_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, output_type_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, options_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, client_streaming_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto, server_streaming_), 0, 1, 2, 3, 4, 5, - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, java_package_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, java_outer_classname_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, java_multiple_files_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, java_generate_equals_and_hash_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, java_string_check_utf8_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, optimize_for_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, go_package_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, cc_generic_services_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, java_generic_services_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, py_generic_services_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, php_generic_services_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, deprecated_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, cc_enable_arenas_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, objc_class_prefix_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, csharp_namespace_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, swift_prefix_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, php_class_prefix_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, php_namespace_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, php_metadata_namespace_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, ruby_package_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FileOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_package_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_outer_classname_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_multiple_files_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_generate_equals_and_hash_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_string_check_utf8_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, optimize_for_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, go_package_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, cc_generic_services_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, java_generic_services_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, py_generic_services_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, php_generic_services_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, deprecated_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, cc_enable_arenas_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, objc_class_prefix_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, csharp_namespace_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, swift_prefix_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, php_class_prefix_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, php_namespace_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, php_metadata_namespace_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, ruby_package_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FileOptions, uninterpreted_option_), 0, 1, 10, @@ -833,33 +831,33 @@ const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2epr 8, 9, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, message_set_wire_format_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, no_standard_descriptor_accessor_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, deprecated_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, map_entry_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MessageOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, message_set_wire_format_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, no_standard_descriptor_accessor_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, deprecated_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, map_entry_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MessageOptions, uninterpreted_option_), 0, 1, 2, 3, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, ctype_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, packed_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, jstype_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, lazy_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, deprecated_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, weak_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, ctype_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, packed_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, jstype_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, lazy_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, deprecated_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, weak_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldOptions, uninterpreted_option_), 0, 1, 5, @@ -867,74 +865,74 @@ const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2epr 3, 4, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::OneofOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::OneofOptions, uninterpreted_option_), ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumOptions, allow_alias_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumOptions, deprecated_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, allow_alias_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, deprecated_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumOptions, uninterpreted_option_), 0, 1, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, deprecated_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, deprecated_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::EnumValueOptions, uninterpreted_option_), 0, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, deprecated_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, deprecated_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ServiceOptions, uninterpreted_option_), 0, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodOptions, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodOptions, _internal_metadata_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodOptions, _extensions_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, _extensions_), ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodOptions, deprecated_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodOptions, idempotency_level_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::MethodOptions, uninterpreted_option_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, deprecated_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, idempotency_level_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::MethodOptions, uninterpreted_option_), 0, 1, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption_NamePart, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption_NamePart, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption_NamePart, name_part_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption_NamePart, is_extension_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, name_part_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart, is_extension_), 0, 1, - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, name_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, identifier_value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, positive_int_value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, negative_int_value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, double_value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, string_value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::UninterpretedOption, aggregate_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, identifier_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, positive_int_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, negative_int_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, double_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, string_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::UninterpretedOption, aggregate_value_), ~0u, 0, 3, @@ -942,110 +940,110 @@ const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fdescriptor_2epr 5, 1, 2, - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo_Location, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo_Location, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo_Location, path_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo_Location, span_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo_Location, leading_comments_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo_Location, trailing_comments_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo_Location, leading_detached_comments_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, path_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, span_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, leading_comments_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, trailing_comments_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location, leading_detached_comments_), ~0u, ~0u, 0, 1, ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceCodeInfo, location_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceCodeInfo, location_), ~0u, - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo_Annotation, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo_Annotation, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo_Annotation, path_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo_Annotation, source_file_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo_Annotation, begin_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo_Annotation, end_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, path_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, source_file_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, begin_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation, end_), ~0u, 0, 1, 2, - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::GeneratedCodeInfo, annotation_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo, annotation_), ~0u, }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 6, sizeof(::google::protobuf::FileDescriptorSet)}, - { 7, 24, sizeof(::google::protobuf::FileDescriptorProto)}, - { 36, 44, sizeof(::google::protobuf::DescriptorProto_ExtensionRange)}, - { 47, 54, sizeof(::google::protobuf::DescriptorProto_ReservedRange)}, - { 56, 71, sizeof(::google::protobuf::DescriptorProto)}, - { 81, 87, sizeof(::google::protobuf::ExtensionRangeOptions)}, - { 88, 103, sizeof(::google::protobuf::FieldDescriptorProto)}, - { 113, 120, sizeof(::google::protobuf::OneofDescriptorProto)}, - { 122, 129, sizeof(::google::protobuf::EnumDescriptorProto_EnumReservedRange)}, - { 131, 141, sizeof(::google::protobuf::EnumDescriptorProto)}, - { 146, 154, sizeof(::google::protobuf::EnumValueDescriptorProto)}, - { 157, 165, sizeof(::google::protobuf::ServiceDescriptorProto)}, - { 168, 179, sizeof(::google::protobuf::MethodDescriptorProto)}, - { 185, 211, sizeof(::google::protobuf::FileOptions)}, - { 232, 242, sizeof(::google::protobuf::MessageOptions)}, - { 247, 259, sizeof(::google::protobuf::FieldOptions)}, - { 266, 272, sizeof(::google::protobuf::OneofOptions)}, - { 273, 281, sizeof(::google::protobuf::EnumOptions)}, - { 284, 291, sizeof(::google::protobuf::EnumValueOptions)}, - { 293, 300, sizeof(::google::protobuf::ServiceOptions)}, - { 302, 310, sizeof(::google::protobuf::MethodOptions)}, - { 313, 320, sizeof(::google::protobuf::UninterpretedOption_NamePart)}, - { 322, 334, sizeof(::google::protobuf::UninterpretedOption)}, - { 341, 351, sizeof(::google::protobuf::SourceCodeInfo_Location)}, - { 356, 362, sizeof(::google::protobuf::SourceCodeInfo)}, - { 363, 372, sizeof(::google::protobuf::GeneratedCodeInfo_Annotation)}, - { 376, 382, sizeof(::google::protobuf::GeneratedCodeInfo)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 6, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorSet)}, + { 7, 24, sizeof(PROTOBUF_NAMESPACE_ID::FileDescriptorProto)}, + { 36, 44, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange)}, + { 47, 54, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange)}, + { 56, 71, sizeof(PROTOBUF_NAMESPACE_ID::DescriptorProto)}, + { 81, 87, sizeof(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions)}, + { 88, 103, sizeof(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto)}, + { 113, 120, sizeof(PROTOBUF_NAMESPACE_ID::OneofDescriptorProto)}, + { 122, 129, sizeof(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange)}, + { 131, 141, sizeof(PROTOBUF_NAMESPACE_ID::EnumDescriptorProto)}, + { 146, 154, sizeof(PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto)}, + { 157, 165, sizeof(PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto)}, + { 168, 179, sizeof(PROTOBUF_NAMESPACE_ID::MethodDescriptorProto)}, + { 185, 211, sizeof(PROTOBUF_NAMESPACE_ID::FileOptions)}, + { 232, 242, sizeof(PROTOBUF_NAMESPACE_ID::MessageOptions)}, + { 247, 259, sizeof(PROTOBUF_NAMESPACE_ID::FieldOptions)}, + { 266, 272, sizeof(PROTOBUF_NAMESPACE_ID::OneofOptions)}, + { 273, 281, sizeof(PROTOBUF_NAMESPACE_ID::EnumOptions)}, + { 284, 291, sizeof(PROTOBUF_NAMESPACE_ID::EnumValueOptions)}, + { 293, 300, sizeof(PROTOBUF_NAMESPACE_ID::ServiceOptions)}, + { 302, 310, sizeof(PROTOBUF_NAMESPACE_ID::MethodOptions)}, + { 313, 320, sizeof(PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart)}, + { 322, 334, sizeof(PROTOBUF_NAMESPACE_ID::UninterpretedOption)}, + { 341, 351, sizeof(PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location)}, + { 356, 362, sizeof(PROTOBUF_NAMESPACE_ID::SourceCodeInfo)}, + { 363, 372, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation)}, + { 376, 382, sizeof(PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_FileDescriptorSet_default_instance_), - reinterpret_cast(&::google::protobuf::_FileDescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_DescriptorProto_ExtensionRange_default_instance_), - reinterpret_cast(&::google::protobuf::_DescriptorProto_ReservedRange_default_instance_), - reinterpret_cast(&::google::protobuf::_DescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_ExtensionRangeOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_FieldDescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_OneofDescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_EnumDescriptorProto_EnumReservedRange_default_instance_), - reinterpret_cast(&::google::protobuf::_EnumDescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_EnumValueDescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_ServiceDescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_MethodDescriptorProto_default_instance_), - reinterpret_cast(&::google::protobuf::_FileOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_MessageOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_FieldOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_OneofOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_EnumOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_EnumValueOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_ServiceOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_MethodOptions_default_instance_), - reinterpret_cast(&::google::protobuf::_UninterpretedOption_NamePart_default_instance_), - reinterpret_cast(&::google::protobuf::_UninterpretedOption_default_instance_), - reinterpret_cast(&::google::protobuf::_SourceCodeInfo_Location_default_instance_), - reinterpret_cast(&::google::protobuf::_SourceCodeInfo_default_instance_), - reinterpret_cast(&::google::protobuf::_GeneratedCodeInfo_Annotation_default_instance_), - reinterpret_cast(&::google::protobuf::_GeneratedCodeInfo_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_FileDescriptorSet_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_FileDescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_DescriptorProto_ExtensionRange_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_DescriptorProto_ReservedRange_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_DescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_ExtensionRangeOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_FieldDescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_OneofDescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_EnumDescriptorProto_EnumReservedRange_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_EnumDescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_EnumValueDescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_ServiceDescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_MethodDescriptorProto_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_FileOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_MessageOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_FieldOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_OneofOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_EnumOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_EnumValueOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_ServiceOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_MethodOptions_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_UninterpretedOption_NamePart_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_UninterpretedOption_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_Location_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_Annotation_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_GeneratedCodeInfo_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto, 27, file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto, file_level_service_descriptors_google_2fprotobuf_2fdescriptor_2eproto, @@ -1204,25 +1202,24 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] = "go/descriptor;descriptor\370\001\001\242\002\003GPB\252\002\032Goog" "le.Protobuf.Reflection" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = { false, InitDefaults_google_2fprotobuf_2fdescriptor_2eproto, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, "google/protobuf/descriptor.proto", &assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto, 6022, }; void AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fdescriptor_2eproto = []() { AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto(); return true; }(); -namespace google { -namespace protobuf { -const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +PROTOBUF_NAMESPACE_OPEN +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Type_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[0]; } bool FieldDescriptorProto_Type_IsValid(int value) { @@ -1274,8 +1271,8 @@ constexpr FieldDescriptorProto_Type FieldDescriptorProto::Type_MIN; constexpr FieldDescriptorProto_Type FieldDescriptorProto::Type_MAX; constexpr int FieldDescriptorProto::Type_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Label_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[1]; } bool FieldDescriptorProto_Label_IsValid(int value) { @@ -1297,8 +1294,8 @@ constexpr FieldDescriptorProto_Label FieldDescriptorProto::Label_MIN; constexpr FieldDescriptorProto_Label FieldDescriptorProto::Label_MAX; constexpr int FieldDescriptorProto::Label_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FileOptions_OptimizeMode_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[2]; } bool FileOptions_OptimizeMode_IsValid(int value) { @@ -1320,8 +1317,8 @@ constexpr FileOptions_OptimizeMode FileOptions::OptimizeMode_MIN; constexpr FileOptions_OptimizeMode FileOptions::OptimizeMode_MAX; constexpr int FileOptions::OptimizeMode_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_CType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[3]; } bool FieldOptions_CType_IsValid(int value) { @@ -1343,8 +1340,8 @@ constexpr FieldOptions_CType FieldOptions::CType_MIN; constexpr FieldOptions_CType FieldOptions::CType_MAX; constexpr int FieldOptions::CType_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_JSType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[4]; } bool FieldOptions_JSType_IsValid(int value) { @@ -1366,8 +1363,8 @@ constexpr FieldOptions_JSType FieldOptions::JSType_MIN; constexpr FieldOptions_JSType FieldOptions::JSType_MAX; constexpr int FieldOptions::JSType_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -const ::google::protobuf::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fdescriptor_2eproto[5]; } bool MethodOptions_IdempotencyLevel_IsValid(int value) { @@ -1403,12 +1400,12 @@ const int FileDescriptorSet::kFileFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 FileDescriptorSet::FileDescriptorSet() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorSet) } -FileDescriptorSet::FileDescriptorSet(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +FileDescriptorSet::FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), file_(arena) { SharedCtor(); @@ -1416,7 +1413,7 @@ FileDescriptorSet::FileDescriptorSet(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorSet) } FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), file_(from.file_) { @@ -1425,7 +1422,7 @@ FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) } void FileDescriptorSet::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto.base); } @@ -1442,20 +1439,20 @@ void FileDescriptorSet::ArenaDtor(void* object) { FileDescriptorSet* _this = reinterpret_cast< FileDescriptorSet* >(object); (void)_this; } -void FileDescriptorSet::RegisterArenaDtor(::google::protobuf::Arena*) { +void FileDescriptorSet::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void FileDescriptorSet::SetCachedSize(int size) const { _cached_size_.Set(size); } const FileDescriptorSet& FileDescriptorSet::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FileDescriptorSet_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void FileDescriptorSet::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorSet) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1465,20 +1462,21 @@ void FileDescriptorSet::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FileDescriptorSet::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* FileDescriptorSet::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated .google.protobuf.FileDescriptorProto file = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; do { ptr = ctx->ParseMessage(add_file(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } default: { @@ -1498,19 +1496,19 @@ const char* FileDescriptorSet::_InternalParse(const char* ptr, ::google::protobu } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool FileDescriptorSet::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorSet) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.protobuf.FileDescriptorProto file = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_file())); } else { goto handle_unusual; @@ -1523,7 +1521,7 @@ bool FileDescriptorSet::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1540,43 +1538,43 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void FileDescriptorSet::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorSet) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.FileDescriptorProto file = 1; for (unsigned int i = 0, n = static_cast(this->file_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->file(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorSet) } -::google::protobuf::uint8* FileDescriptorSet::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorSet::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorSet) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.FileDescriptorProto file = 1; for (unsigned int i = 0, n = static_cast(this->file_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->file(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorSet) @@ -1589,10 +1587,10 @@ size_t FileDescriptorSet::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1602,25 +1600,25 @@ size_t FileDescriptorSet::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->file(static_cast(i))); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void FileDescriptorSet::MergeFrom(const ::google::protobuf::Message& from) { +void FileDescriptorSet::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FileDescriptorSet) GOOGLE_DCHECK_NE(&from, this); const FileDescriptorSet* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FileDescriptorSet) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FileDescriptorSet) MergeFrom(*source); @@ -1631,13 +1629,13 @@ void FileDescriptorSet::MergeFrom(const FileDescriptorSet& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorSet) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; file_.MergeFrom(from.file_); } -void FileDescriptorSet::CopyFrom(const ::google::protobuf::Message& from) { +void FileDescriptorSet::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FileDescriptorSet) if (&from == this) return; Clear(); @@ -1652,7 +1650,7 @@ void FileDescriptorSet::CopyFrom(const FileDescriptorSet& from) { } bool FileDescriptorSet::IsInitialized() const { - if (!::google::protobuf::internal::AllAreInitialized(this->file())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->file())) return false; return true; } @@ -1682,8 +1680,8 @@ void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) { CastToBase(&file_)->InternalSwap(CastToBase(&other->file_)); } -::google::protobuf::Metadata FileDescriptorSet::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorSet::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -1691,10 +1689,10 @@ void FileDescriptorSet::InternalSwap(FileDescriptorSet* other) { // =================================================================== void FileDescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_FileDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::FileOptions*>( - ::google::protobuf::FileOptions::internal_default_instance()); - ::google::protobuf::_FileDescriptorProto_default_instance_._instance.get_mutable()->source_code_info_ = const_cast< ::google::protobuf::SourceCodeInfo*>( - ::google::protobuf::SourceCodeInfo::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_FileDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::FileOptions*>( + PROTOBUF_NAMESPACE_ID::FileOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_FileDescriptorProto_default_instance_._instance.get_mutable()->source_code_info_ = const_cast< PROTOBUF_NAMESPACE_ID::SourceCodeInfo*>( + PROTOBUF_NAMESPACE_ID::SourceCodeInfo::internal_default_instance()); } class FileDescriptorProto::HasBitSetters { public: @@ -1704,11 +1702,11 @@ class FileDescriptorProto::HasBitSetters { static void set_has_package(FileDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000002u; } - static const ::google::protobuf::FileOptions& options(const FileDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::FileOptions& options(const FileDescriptorProto* msg); static void set_has_options(FileDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000008u; } - static const ::google::protobuf::SourceCodeInfo& source_code_info(const FileDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& source_code_info(const FileDescriptorProto* msg); static void set_has_source_code_info(FileDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000010u; } @@ -1717,16 +1715,16 @@ class FileDescriptorProto::HasBitSetters { } }; -const ::google::protobuf::FileOptions& +const PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::HasBitSetters::options(const FileDescriptorProto* msg) { return *msg->options_; } -const ::google::protobuf::SourceCodeInfo& +const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::HasBitSetters::source_code_info(const FileDescriptorProto* msg) { return *msg->source_code_info_; } void FileDescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::FileOptions* options) { + PROTOBUF_NAMESPACE_ID::FileOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -1739,7 +1737,7 @@ void FileDescriptorProto::unsafe_arena_set_allocated_options( // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.options) } void FileDescriptorProto::unsafe_arena_set_allocated_source_code_info( - ::google::protobuf::SourceCodeInfo* source_code_info) { + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info) { if (GetArenaNoVirtual() == nullptr) { delete source_code_info_; } @@ -1767,12 +1765,12 @@ const int FileDescriptorProto::kSyntaxFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 FileDescriptorProto::FileDescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.FileDescriptorProto) } -FileDescriptorProto::FileDescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +FileDescriptorProto::FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), dependency_(arena), message_type_(arena), @@ -1786,7 +1784,7 @@ FileDescriptorProto::FileDescriptorProto(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorProto) } FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), dependency_(from.dependency_), @@ -1797,28 +1795,28 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) public_dependency_(from.public_dependency_), weak_dependency_(from.weak_dependency_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } - package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_package()) { - package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.package(), + package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.package(), GetArenaNoVirtual()); } - syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_syntax()) { - syntax_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.syntax(), + syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.syntax(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::FileOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::FileOptions(*from.options_); } else { options_ = nullptr; } if (from.has_source_code_info()) { - source_code_info_ = new ::google::protobuf::SourceCodeInfo(*from.source_code_info_); + source_code_info_ = new PROTOBUF_NAMESPACE_ID::SourceCodeInfo(*from.source_code_info_); } else { source_code_info_ = nullptr; } @@ -1826,11 +1824,11 @@ FileDescriptorProto::FileDescriptorProto(const FileDescriptorProto& from) } void FileDescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - syntax_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + syntax_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&options_, 0, static_cast( reinterpret_cast(&source_code_info_) - reinterpret_cast(&options_)) + sizeof(source_code_info_)); @@ -1843,9 +1841,9 @@ FileDescriptorProto::~FileDescriptorProto() { void FileDescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - syntax_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + syntax_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; if (this != internal_default_instance()) delete source_code_info_; } @@ -1854,20 +1852,20 @@ void FileDescriptorProto::ArenaDtor(void* object) { FileDescriptorProto* _this = reinterpret_cast< FileDescriptorProto* >(object); (void)_this; } -void FileDescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void FileDescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void FileDescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const FileDescriptorProto& FileDescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void FileDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1903,122 +1901,123 @@ void FileDescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FileDescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* FileDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.FileDescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.FileDescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string package = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_package(), ptr, ctx, "google.protobuf.FileDescriptorProto.package"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_package(), ptr, ctx, "google.protobuf.FileDescriptorProto.package"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated string dependency = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; do { - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(add_dependency(), ptr, ctx, "google.protobuf.FileDescriptorProto.dependency"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_dependency(), ptr, ctx, "google.protobuf.FileDescriptorProto.dependency"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 26 && (ptr += 1)); break; } // repeated .google.protobuf.DescriptorProto message_type = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; do { ptr = ctx->ParseMessage(add_message_type(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 34 && (ptr += 1)); break; } // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 42) goto handle_unusual; do { ptr = ctx->ParseMessage(add_enum_type(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 42 && (ptr += 1)); break; } // repeated .google.protobuf.ServiceDescriptorProto service = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; do { ptr = ctx->ParseMessage(add_service(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 50 && (ptr += 1)); break; } // repeated .google.protobuf.FieldDescriptorProto extension = 7; case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_extension(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 58 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 58 && (ptr += 1)); break; } // optional .google.protobuf.FileOptions options = 8; case 8: { - if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 66) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.SourceCodeInfo source_code_info = 9; case 9: { - if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 74) goto handle_unusual; ptr = ctx->ParseMessage(mutable_source_code_info(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated int32 public_dependency = 10; case 10: { - if (static_cast<::google::protobuf::uint8>(tag) == 80) { + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80) { do { - add_public_dependency(::google::protobuf::internal::ReadVarint(&ptr)); + add_public_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 80 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 80 && (ptr += 1)); break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 82) goto handle_unusual; - ptr = ::google::protobuf::internal::PackedInt32Parser(mutable_public_dependency(), ptr, ctx); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 82) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_public_dependency(), ptr, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated int32 weak_dependency = 11; case 11: { - if (static_cast<::google::protobuf::uint8>(tag) == 88) { + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88) { do { - add_weak_dependency(::google::protobuf::internal::ReadVarint(&ptr)); + add_weak_dependency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 88 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 88 && (ptr += 1)); break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 90) goto handle_unusual; - ptr = ::google::protobuf::internal::PackedInt32Parser(mutable_weak_dependency(), ptr, ctx); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 90) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_weak_dependency(), ptr, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string syntax = 12; case 12: { - if (static_cast<::google::protobuf::uint8>(tag) != 98) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_syntax(), ptr, ctx, "google.protobuf.FileDescriptorProto.syntax"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 98) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_syntax(), ptr, ctx, "google.protobuf.FileDescriptorProto.syntax"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -2039,23 +2038,23 @@ const char* FileDescriptorProto::_InternalParse(const char* ptr, ::google::proto } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool FileDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.FileDescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.name"); } else { goto handle_unusual; @@ -2065,12 +2064,12 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional string package = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_package())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->package().data(), static_cast(this->package().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.package"); } else { goto handle_unusual; @@ -2080,13 +2079,13 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated string dependency = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_dependency())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->dependency(this->dependency_size() - 1).data(), static_cast(this->dependency(this->dependency_size() - 1).length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.dependency"); } else { goto handle_unusual; @@ -2096,8 +2095,8 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto message_type = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_message_type())); } else { goto handle_unusual; @@ -2107,8 +2106,8 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_enum_type())); } else { goto handle_unusual; @@ -2118,8 +2117,8 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.ServiceDescriptorProto service = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_service())); } else { goto handle_unusual; @@ -2129,8 +2128,8 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.FieldDescriptorProto extension = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_extension())); } else { goto handle_unusual; @@ -2140,8 +2139,8 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FileOptions options = 8; case 8: { - if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -2151,8 +2150,8 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.SourceCodeInfo source_code_info = 9; case 9: { - if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_source_code_info())); } else { goto handle_unusual; @@ -2162,13 +2161,13 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated int32 public_dependency = 10; case 10: { - if (static_cast< ::google::protobuf::uint8>(tag) == (80 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( 1, 80u, input, this->mutable_public_dependency()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_public_dependency()))); } else { goto handle_unusual; @@ -2178,13 +2177,13 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // repeated int32 weak_dependency = 11; case 11: { - if (static_cast< ::google::protobuf::uint8>(tag) == (88 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( 1, 88u, input, this->mutable_weak_dependency()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (90 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_weak_dependency()))); } else { goto handle_unusual; @@ -2194,12 +2193,12 @@ bool FileDescriptorProto::MergePartialFromCodedStream( // optional string syntax = 12; case 12: { - if (static_cast< ::google::protobuf::uint8>(tag) == (98 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (98 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_syntax())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->syntax().data(), static_cast(this->syntax().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileDescriptorProto.syntax"); } else { goto handle_unusual; @@ -2212,7 +2211,7 @@ bool FileDescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -2229,46 +2228,46 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void FileDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.FileDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // optional string package = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->package().data(), static_cast(this->package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.package"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->package(), output); } // repeated string dependency = 3; for (int i = 0, n = this->dependency_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->dependency(i).data(), static_cast(this->dependency(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.dependency"); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( 3, this->dependency(i), output); } // repeated .google.protobuf.DescriptorProto message_type = 4; for (unsigned int i = 0, n = static_cast(this->message_type_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->message_type(static_cast(i)), output); @@ -2277,7 +2276,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; for (unsigned int i = 0, n = static_cast(this->enum_type_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->enum_type(static_cast(i)), output); @@ -2286,7 +2285,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.ServiceDescriptorProto service = 6; for (unsigned int i = 0, n = static_cast(this->service_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 6, this->service(static_cast(i)), output); @@ -2295,7 +2294,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.FieldDescriptorProto extension = 7; for (unsigned int i = 0, n = static_cast(this->extension_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 7, this->extension(static_cast(i)), output); @@ -2303,88 +2302,88 @@ void FileDescriptorProto::SerializeWithCachedSizes( // optional .google.protobuf.FileOptions options = 8; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 8, HasBitSetters::options(this), output); } // optional .google.protobuf.SourceCodeInfo source_code_info = 9; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 9, HasBitSetters::source_code_info(this), output); } // repeated int32 public_dependency = 10; for (int i = 0, n = this->public_dependency_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32( 10, this->public_dependency(i), output); } // repeated int32 weak_dependency = 11; for (int i = 0, n = this->weak_dependency_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32( 11, this->weak_dependency(i), output); } // optional string syntax = 12; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->syntax().data(), static_cast(this->syntax().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.syntax"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 12, this->syntax(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FileDescriptorProto) } -::google::protobuf::uint8* FileDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FileDescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // optional string package = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->package().data(), static_cast(this->package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.package"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->package(), target); } // repeated string dependency = 3; for (int i = 0, n = this->dependency_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->dependency(i).data(), static_cast(this->dependency(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.dependency"); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteStringToArray(3, this->dependency(i), target); } // repeated .google.protobuf.DescriptorProto message_type = 4; for (unsigned int i = 0, n = static_cast(this->message_type_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->message_type(static_cast(i)), target); } @@ -2392,7 +2391,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; for (unsigned int i = 0, n = static_cast(this->enum_type_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 5, this->enum_type(static_cast(i)), target); } @@ -2400,7 +2399,7 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.ServiceDescriptorProto service = 6; for (unsigned int i = 0, n = static_cast(this->service_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 6, this->service(static_cast(i)), target); } @@ -2408,46 +2407,46 @@ void FileDescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.FieldDescriptorProto extension = 7; for (unsigned int i = 0, n = static_cast(this->extension_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 7, this->extension(static_cast(i)), target); } // optional .google.protobuf.FileOptions options = 8; if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 8, HasBitSetters::options(this), target); } // optional .google.protobuf.SourceCodeInfo source_code_info = 9; if (cached_has_bits & 0x00000010u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 9, HasBitSetters::source_code_info(this), target); } // repeated int32 public_dependency = 10; - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteInt32ToArray(10, this->public_dependency_, target); // repeated int32 weak_dependency = 11; - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteInt32ToArray(11, this->weak_dependency_, target); // optional string syntax = 12; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->syntax().data(), static_cast(this->syntax().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileDescriptorProto.syntax"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 12, this->syntax(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileDescriptorProto) @@ -2460,18 +2459,18 @@ size_t FileDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string dependency = 3; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->dependency_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->dependency_size()); for (int i = 0, n = this->dependency_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->dependency(i)); } @@ -2481,7 +2480,7 @@ size_t FileDescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->message_type(static_cast(i))); } } @@ -2492,7 +2491,7 @@ size_t FileDescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->enum_type(static_cast(i))); } } @@ -2503,7 +2502,7 @@ size_t FileDescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->service(static_cast(i))); } } @@ -2514,26 +2513,26 @@ size_t FileDescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->extension(static_cast(i))); } } // repeated int32 public_dependency = 10; { - size_t data_size = ::google::protobuf::internal::WireFormatLite:: + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->public_dependency_); total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->public_dependency_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->public_dependency_size()); total_size += data_size; } // repeated int32 weak_dependency = 11; { - size_t data_size = ::google::protobuf::internal::WireFormatLite:: + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->weak_dependency_); total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->weak_dependency_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->weak_dependency_size()); total_size += data_size; } @@ -2542,53 +2541,53 @@ size_t FileDescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional string package = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->package()); } // optional string syntax = 12; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->syntax()); } // optional .google.protobuf.FileOptions options = 8; if (cached_has_bits & 0x00000008u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } // optional .google.protobuf.SourceCodeInfo source_code_info = 9; if (cached_has_bits & 0x00000010u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *source_code_info_); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void FileDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void FileDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FileDescriptorProto) GOOGLE_DCHECK_NE(&from, this); const FileDescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FileDescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FileDescriptorProto) MergeFrom(*source); @@ -2599,7 +2598,7 @@ void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; dependency_.MergeFrom(from.dependency_); @@ -2621,15 +2620,15 @@ void FileDescriptorProto::MergeFrom(const FileDescriptorProto& from) { set_syntax(from.syntax()); } if (cached_has_bits & 0x00000008u) { - mutable_options()->::google::protobuf::FileOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::FileOptions::MergeFrom(from.options()); } if (cached_has_bits & 0x00000010u) { - mutable_source_code_info()->::google::protobuf::SourceCodeInfo::MergeFrom(from.source_code_info()); + mutable_source_code_info()->PROTOBUF_NAMESPACE_ID::SourceCodeInfo::MergeFrom(from.source_code_info()); } } } -void FileDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void FileDescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FileDescriptorProto) if (&from == this) return; Clear(); @@ -2644,10 +2643,10 @@ void FileDescriptorProto::CopyFrom(const FileDescriptorProto& from) { } bool FileDescriptorProto::IsInitialized() const { - if (!::google::protobuf::internal::AllAreInitialized(this->message_type())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->service())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->message_type())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->enum_type())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->service())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->extension())) return false; if (has_options()) { if (!this->options_->IsInitialized()) return false; } @@ -2684,18 +2683,18 @@ void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { CastToBase(&extension_)->InternalSwap(CastToBase(&other->extension_)); public_dependency_.InternalSwap(&other->public_dependency_); weak_dependency_.InternalSwap(&other->weak_dependency_); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - package_.Swap(&other->package_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + package_.Swap(&other->package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - syntax_.Swap(&other->syntax_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + syntax_.Swap(&other->syntax_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); swap(source_code_info_, other->source_code_info_); } -::google::protobuf::Metadata FileDescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata FileDescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -2703,8 +2702,8 @@ void FileDescriptorProto::InternalSwap(FileDescriptorProto* other) { // =================================================================== void DescriptorProto_ExtensionRange::InitAsDefaultInstance() { - ::google::protobuf::_DescriptorProto_ExtensionRange_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::ExtensionRangeOptions*>( - ::google::protobuf::ExtensionRangeOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_DescriptorProto_ExtensionRange_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions*>( + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::internal_default_instance()); } class DescriptorProto_ExtensionRange::HasBitSetters { public: @@ -2714,18 +2713,18 @@ class DescriptorProto_ExtensionRange::HasBitSetters { static void set_has_end(DescriptorProto_ExtensionRange* msg) { msg->_has_bits_[0] |= 0x00000004u; } - static const ::google::protobuf::ExtensionRangeOptions& options(const DescriptorProto_ExtensionRange* msg); + static const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& options(const DescriptorProto_ExtensionRange* msg); static void set_has_options(DescriptorProto_ExtensionRange* msg) { msg->_has_bits_[0] |= 0x00000001u; } }; -const ::google::protobuf::ExtensionRangeOptions& +const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::HasBitSetters::options(const DescriptorProto_ExtensionRange* msg) { return *msg->options_; } void DescriptorProto_ExtensionRange::unsafe_arena_set_allocated_options( - ::google::protobuf::ExtensionRangeOptions* options) { + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -2744,24 +2743,24 @@ const int DescriptorProto_ExtensionRange::kOptionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ExtensionRange) } -DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ExtensionRange) } DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_options()) { - options_ = new ::google::protobuf::ExtensionRangeOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions(*from.options_); } else { options_ = nullptr; } @@ -2772,7 +2771,7 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorP } void DescriptorProto_ExtensionRange::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto.base); ::memset(&options_, 0, static_cast( reinterpret_cast(&end_) - @@ -2793,20 +2792,20 @@ void DescriptorProto_ExtensionRange::ArenaDtor(void* object) { DescriptorProto_ExtensionRange* _this = reinterpret_cast< DescriptorProto_ExtensionRange* >(object); (void)_this; } -void DescriptorProto_ExtensionRange::RegisterArenaDtor(::google::protobuf::Arena*) { +void DescriptorProto_ExtensionRange::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void DescriptorProto_ExtensionRange::SetCachedSize(int size) const { _cached_size_.Set(size); } const DescriptorProto_ExtensionRange& DescriptorProto_ExtensionRange::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DescriptorProto_ExtensionRange_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void DescriptorProto_ExtensionRange::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ExtensionRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2825,29 +2824,30 @@ void DescriptorProto_ExtensionRange::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional int32 start = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_start(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_start(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 end = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_end(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_end(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.ExtensionRangeOptions options = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; @@ -2869,21 +2869,21 @@ const char* DescriptorProto_ExtensionRange::_InternalParse(const char* ptr, ::go } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ExtensionRange) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional int32 start = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { HasBitSetters::set_has_start(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &start_))); } else { goto handle_unusual; @@ -2893,10 +2893,10 @@ bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( // optional int32 end = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_end(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &end_))); } else { goto handle_unusual; @@ -2906,8 +2906,8 @@ bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( // optional .google.protobuf.ExtensionRangeOptions options = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -2920,7 +2920,7 @@ bool DescriptorProto_ExtensionRange::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -2937,61 +2937,61 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void DescriptorProto_ExtensionRange::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ExtensionRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->start(), output); } // optional int32 end = 2; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->end(), output); } // optional .google.protobuf.ExtensionRangeOptions options = 3; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, HasBitSetters::options(this), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ExtensionRange) } -::google::protobuf::uint8* DescriptorProto_ExtensionRange::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ExtensionRange::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ExtensionRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); } // optional int32 end = 2; if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); } // optional .google.protobuf.ExtensionRangeOptions options = 3; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, HasBitSetters::options(this), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ExtensionRange) @@ -3004,10 +3004,10 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3016,39 +3016,39 @@ size_t DescriptorProto_ExtensionRange::ByteSizeLong() const { // optional .google.protobuf.ExtensionRangeOptions options = 3; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } // optional int32 start = 1; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->start()); } // optional int32 end = 2; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->end()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void DescriptorProto_ExtensionRange::MergeFrom(const ::google::protobuf::Message& from) { +void DescriptorProto_ExtensionRange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange) GOOGLE_DCHECK_NE(&from, this); const DescriptorProto_ExtensionRange* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.DescriptorProto.ExtensionRange) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.DescriptorProto.ExtensionRange) MergeFrom(*source); @@ -3059,13 +3059,13 @@ void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRa // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ExtensionRange) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { - mutable_options()->::google::protobuf::ExtensionRangeOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions::MergeFrom(from.options()); } if (cached_has_bits & 0x00000002u) { start_ = from.start_; @@ -3077,7 +3077,7 @@ void DescriptorProto_ExtensionRange::MergeFrom(const DescriptorProto_ExtensionRa } } -void DescriptorProto_ExtensionRange::CopyFrom(const ::google::protobuf::Message& from) { +void DescriptorProto_ExtensionRange::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.DescriptorProto.ExtensionRange) if (&from == this) return; Clear(); @@ -3126,8 +3126,8 @@ void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange swap(end_, other->end_); } -::google::protobuf::Metadata DescriptorProto_ExtensionRange::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ExtensionRange::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -3152,19 +3152,19 @@ const int DescriptorProto_ReservedRange::kEndFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 DescriptorProto_ReservedRange::DescriptorProto_ReservedRange() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto.ReservedRange) } -DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto.ReservedRange) } DescriptorProto_ReservedRange::DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -3193,20 +3193,20 @@ void DescriptorProto_ReservedRange::ArenaDtor(void* object) { DescriptorProto_ReservedRange* _this = reinterpret_cast< DescriptorProto_ReservedRange* >(object); (void)_this; } -void DescriptorProto_ReservedRange::RegisterArenaDtor(::google::protobuf::Arena*) { +void DescriptorProto_ReservedRange::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void DescriptorProto_ReservedRange::SetCachedSize(int size) const { _cached_size_.Set(size); } const DescriptorProto_ReservedRange& DescriptorProto_ReservedRange::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DescriptorProto_ReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void DescriptorProto_ReservedRange::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto.ReservedRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3221,23 +3221,24 @@ void DescriptorProto_ReservedRange::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional int32 start = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_start(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_start(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 end = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_end(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_end(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -3258,21 +3259,21 @@ const char* DescriptorProto_ReservedRange::_InternalParse(const char* ptr, ::goo } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto.ReservedRange) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional int32 start = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { HasBitSetters::set_has_start(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &start_))); } else { goto handle_unusual; @@ -3282,10 +3283,10 @@ bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( // optional int32 end = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_end(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &end_))); } else { goto handle_unusual; @@ -3298,7 +3299,7 @@ bool DescriptorProto_ReservedRange::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -3315,48 +3316,48 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void DescriptorProto_ReservedRange::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto.ReservedRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->start(), output); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->end(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto.ReservedRange) } -::google::protobuf::uint8* DescriptorProto_ReservedRange::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto_ReservedRange::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto.ReservedRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto.ReservedRange) @@ -3369,10 +3370,10 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3381,32 +3382,32 @@ size_t DescriptorProto_ReservedRange::ByteSizeLong() const { // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->start()); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->end()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void DescriptorProto_ReservedRange::MergeFrom(const ::google::protobuf::Message& from) { +void DescriptorProto_ReservedRange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.DescriptorProto.ReservedRange) GOOGLE_DCHECK_NE(&from, this); const DescriptorProto_ReservedRange* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.DescriptorProto.ReservedRange) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.DescriptorProto.ReservedRange) MergeFrom(*source); @@ -3417,7 +3418,7 @@ void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRang // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto.ReservedRange) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; @@ -3432,7 +3433,7 @@ void DescriptorProto_ReservedRange::MergeFrom(const DescriptorProto_ReservedRang } } -void DescriptorProto_ReservedRange::CopyFrom(const ::google::protobuf::Message& from) { +void DescriptorProto_ReservedRange::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.DescriptorProto.ReservedRange) if (&from == this) return; Clear(); @@ -3477,8 +3478,8 @@ void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* swap(end_, other->end_); } -::google::protobuf::Metadata DescriptorProto_ReservedRange::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto_ReservedRange::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -3486,26 +3487,26 @@ void DescriptorProto_ReservedRange::InternalSwap(DescriptorProto_ReservedRange* // =================================================================== void DescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_DescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::MessageOptions*>( - ::google::protobuf::MessageOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_DescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::MessageOptions*>( + PROTOBUF_NAMESPACE_ID::MessageOptions::internal_default_instance()); } class DescriptorProto::HasBitSetters { public: static void set_has_name(DescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000001u; } - static const ::google::protobuf::MessageOptions& options(const DescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::MessageOptions& options(const DescriptorProto* msg); static void set_has_options(DescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000002u; } }; -const ::google::protobuf::MessageOptions& +const PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::HasBitSetters::options(const DescriptorProto* msg) { return *msg->options_; } void DescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::MessageOptions* options) { + PROTOBUF_NAMESPACE_ID::MessageOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -3531,12 +3532,12 @@ const int DescriptorProto::kReservedNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 DescriptorProto::DescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.DescriptorProto) } -DescriptorProto::DescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +DescriptorProto::DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), field_(arena), nested_type_(arena), @@ -3551,7 +3552,7 @@ DescriptorProto::DescriptorProto(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.DescriptorProto) } DescriptorProto::DescriptorProto(const DescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), field_(from.field_), @@ -3563,13 +3564,13 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from) reserved_range_(from.reserved_range_), reserved_name_(from.reserved_name_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::MessageOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::MessageOptions(*from.options_); } else { options_ = nullptr; } @@ -3577,9 +3578,9 @@ DescriptorProto::DescriptorProto(const DescriptorProto& from) } void DescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -3590,7 +3591,7 @@ DescriptorProto::~DescriptorProto() { void DescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -3598,20 +3599,20 @@ void DescriptorProto::ArenaDtor(void* object) { DescriptorProto* _this = reinterpret_cast< DescriptorProto* >(object); (void)_this; } -void DescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void DescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void DescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const DescriptorProto& DescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void DescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.DescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3638,104 +3639,105 @@ void DescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* DescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* DescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.DescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.DescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.FieldDescriptorProto field = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; do { ptr = ctx->ParseMessage(add_field(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 18 && (ptr += 1)); break; } // repeated .google.protobuf.DescriptorProto nested_type = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; do { ptr = ctx->ParseMessage(add_nested_type(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 26 && (ptr += 1)); break; } // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; do { ptr = ctx->ParseMessage(add_enum_type(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 34 && (ptr += 1)); break; } // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 42) goto handle_unusual; do { ptr = ctx->ParseMessage(add_extension_range(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 42 && (ptr += 1)); break; } // repeated .google.protobuf.FieldDescriptorProto extension = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; do { ptr = ctx->ParseMessage(add_extension(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 50 && (ptr += 1)); break; } // optional .google.protobuf.MessageOptions options = 7; case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; case 8: { - if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 66) goto handle_unusual; do { ptr = ctx->ParseMessage(add_oneof_decl(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 66 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 66 && (ptr += 1)); break; } // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; case 9: { - if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 74) goto handle_unusual; do { ptr = ctx->ParseMessage(add_reserved_range(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 74 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 74 && (ptr += 1)); break; } // repeated string reserved_name = 10; case 10: { - if (static_cast<::google::protobuf::uint8>(tag) != 82) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 82) goto handle_unusual; do { - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(add_reserved_name(), ptr, ctx, "google.protobuf.DescriptorProto.reserved_name"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_reserved_name(), ptr, ctx, "google.protobuf.DescriptorProto.reserved_name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 82 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 82 && (ptr += 1)); break; } default: { @@ -3755,23 +3757,23 @@ const char* DescriptorProto::_InternalParse(const char* ptr, ::google::protobuf: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool DescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.DescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.DescriptorProto.name"); } else { goto handle_unusual; @@ -3781,8 +3783,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.FieldDescriptorProto field = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_field())); } else { goto handle_unusual; @@ -3792,8 +3794,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto nested_type = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_nested_type())); } else { goto handle_unusual; @@ -3803,8 +3805,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_enum_type())); } else { goto handle_unusual; @@ -3814,8 +3816,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_extension_range())); } else { goto handle_unusual; @@ -3825,8 +3827,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.FieldDescriptorProto extension = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_extension())); } else { goto handle_unusual; @@ -3836,8 +3838,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.MessageOptions options = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -3847,8 +3849,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; case 8: { - if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_oneof_decl())); } else { goto handle_unusual; @@ -3858,8 +3860,8 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; case 9: { - if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_reserved_range())); } else { goto handle_unusual; @@ -3869,13 +3871,13 @@ bool DescriptorProto::MergePartialFromCodedStream( // repeated string reserved_name = 10; case 10: { - if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_reserved_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->reserved_name(this->reserved_name_size() - 1).data(), static_cast(this->reserved_name(this->reserved_name_size() - 1).length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.DescriptorProto.reserved_name"); } else { goto handle_unusual; @@ -3888,7 +3890,7 @@ bool DescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -3905,26 +3907,26 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void DescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.DescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // repeated .google.protobuf.FieldDescriptorProto field = 2; for (unsigned int i = 0, n = static_cast(this->field_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->field(static_cast(i)), output); @@ -3933,7 +3935,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.DescriptorProto nested_type = 3; for (unsigned int i = 0, n = static_cast(this->nested_type_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->nested_type(static_cast(i)), output); @@ -3942,7 +3944,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; for (unsigned int i = 0, n = static_cast(this->enum_type_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->enum_type(static_cast(i)), output); @@ -3951,7 +3953,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; for (unsigned int i = 0, n = static_cast(this->extension_range_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->extension_range(static_cast(i)), output); @@ -3960,7 +3962,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.FieldDescriptorProto extension = 6; for (unsigned int i = 0, n = static_cast(this->extension_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 6, this->extension(static_cast(i)), output); @@ -3968,14 +3970,14 @@ void DescriptorProto::SerializeWithCachedSizes( // optional .google.protobuf.MessageOptions options = 7; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 7, HasBitSetters::options(this), output); } // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; for (unsigned int i = 0, n = static_cast(this->oneof_decl_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 8, this->oneof_decl(static_cast(i)), output); @@ -3984,7 +3986,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; for (unsigned int i = 0, n = static_cast(this->reserved_range_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 9, this->reserved_range(static_cast(i)), output); @@ -3992,43 +3994,43 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated string reserved_name = 10; for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.reserved_name"); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( 10, this->reserved_name(i), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.DescriptorProto) } -::google::protobuf::uint8* DescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // repeated .google.protobuf.FieldDescriptorProto field = 2; for (unsigned int i = 0, n = static_cast(this->field_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->field(static_cast(i)), target); } @@ -4036,7 +4038,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.DescriptorProto nested_type = 3; for (unsigned int i = 0, n = static_cast(this->nested_type_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, this->nested_type(static_cast(i)), target); } @@ -4044,7 +4046,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; for (unsigned int i = 0, n = static_cast(this->enum_type_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->enum_type(static_cast(i)), target); } @@ -4052,7 +4054,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; for (unsigned int i = 0, n = static_cast(this->extension_range_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 5, this->extension_range(static_cast(i)), target); } @@ -4060,14 +4062,14 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.FieldDescriptorProto extension = 6; for (unsigned int i = 0, n = static_cast(this->extension_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 6, this->extension(static_cast(i)), target); } // optional .google.protobuf.MessageOptions options = 7; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 7, HasBitSetters::options(this), target); } @@ -4075,7 +4077,7 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; for (unsigned int i = 0, n = static_cast(this->oneof_decl_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 8, this->oneof_decl(static_cast(i)), target); } @@ -4083,23 +4085,23 @@ void DescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; for (unsigned int i = 0, n = static_cast(this->reserved_range_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 9, this->reserved_range(static_cast(i)), target); } // repeated string reserved_name = 10; for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.DescriptorProto.reserved_name"); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteStringToArray(10, this->reserved_name(i), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.DescriptorProto) @@ -4112,10 +4114,10 @@ size_t DescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4125,7 +4127,7 @@ size_t DescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->field(static_cast(i))); } } @@ -4136,7 +4138,7 @@ size_t DescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->nested_type(static_cast(i))); } } @@ -4147,7 +4149,7 @@ size_t DescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->enum_type(static_cast(i))); } } @@ -4158,7 +4160,7 @@ size_t DescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->extension_range(static_cast(i))); } } @@ -4169,7 +4171,7 @@ size_t DescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->extension(static_cast(i))); } } @@ -4180,7 +4182,7 @@ size_t DescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->oneof_decl(static_cast(i))); } } @@ -4191,16 +4193,16 @@ size_t DescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->reserved_range(static_cast(i))); } } // repeated string reserved_name = 10; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->reserved_name_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->reserved_name_size()); for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->reserved_name(i)); } @@ -4209,32 +4211,32 @@ size_t DescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional .google.protobuf.MessageOptions options = 7; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void DescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void DescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.DescriptorProto) GOOGLE_DCHECK_NE(&from, this); const DescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.DescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.DescriptorProto) MergeFrom(*source); @@ -4245,7 +4247,7 @@ void DescriptorProto::MergeFrom(const DescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; field_.MergeFrom(from.field_); @@ -4262,12 +4264,12 @@ void DescriptorProto::MergeFrom(const DescriptorProto& from) { set_name(from.name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->::google::protobuf::MessageOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::MessageOptions::MergeFrom(from.options()); } } } -void DescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void DescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.DescriptorProto) if (&from == this) return; Clear(); @@ -4282,12 +4284,12 @@ void DescriptorProto::CopyFrom(const DescriptorProto& from) { } bool DescriptorProto::IsInitialized() const { - if (!::google::protobuf::internal::AllAreInitialized(this->field())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->nested_type())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->enum_type())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->extension_range())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->extension())) return false; - if (!::google::protobuf::internal::AllAreInitialized(this->oneof_decl())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->field())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->nested_type())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->enum_type())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->extension_range())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->extension())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->oneof_decl())) return false; if (has_options()) { if (!this->options_->IsInitialized()) return false; } @@ -4325,13 +4327,13 @@ void DescriptorProto::InternalSwap(DescriptorProto* other) { CastToBase(&oneof_decl_)->InternalSwap(CastToBase(&other->oneof_decl_)); CastToBase(&reserved_range_)->InternalSwap(CastToBase(&other->reserved_range_)); reserved_name_.InternalSwap(CastToBase(&other->reserved_name_)); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); } -::google::protobuf::Metadata DescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata DescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -4349,12 +4351,12 @@ const int ExtensionRangeOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ExtensionRangeOptions::ExtensionRangeOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.ExtensionRangeOptions) } -ExtensionRangeOptions::ExtensionRangeOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -4363,7 +4365,7 @@ ExtensionRangeOptions::ExtensionRangeOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.ExtensionRangeOptions) } ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -4373,7 +4375,7 @@ ExtensionRangeOptions::ExtensionRangeOptions(const ExtensionRangeOptions& from) } void ExtensionRangeOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto.base); } @@ -4390,20 +4392,20 @@ void ExtensionRangeOptions::ArenaDtor(void* object) { ExtensionRangeOptions* _this = reinterpret_cast< ExtensionRangeOptions* >(object); (void)_this; } -void ExtensionRangeOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void ExtensionRangeOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void ExtensionRangeOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const ExtensionRangeOptions& ExtensionRangeOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ExtensionRangeOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void ExtensionRangeOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4414,20 +4416,21 @@ void ExtensionRangeOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -4453,19 +4456,19 @@ const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::google::pro } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool ExtensionRangeOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.ExtensionRangeOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -4484,7 +4487,7 @@ bool ExtensionRangeOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -4501,15 +4504,15 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void ExtensionRangeOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.ExtensionRangeOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -4519,22 +4522,22 @@ void ExtensionRangeOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.ExtensionRangeOptions) } -::google::protobuf::uint8* ExtensionRangeOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ExtensionRangeOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -4544,7 +4547,7 @@ void ExtensionRangeOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ExtensionRangeOptions) @@ -4559,10 +4562,10 @@ size_t ExtensionRangeOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4572,25 +4575,25 @@ size_t ExtensionRangeOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ExtensionRangeOptions::MergeFrom(const ::google::protobuf::Message& from) { +void ExtensionRangeOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ExtensionRangeOptions) GOOGLE_DCHECK_NE(&from, this); const ExtensionRangeOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ExtensionRangeOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.ExtensionRangeOptions) MergeFrom(*source); @@ -4602,13 +4605,13 @@ void ExtensionRangeOptions::MergeFrom(const ExtensionRangeOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); } -void ExtensionRangeOptions::CopyFrom(const ::google::protobuf::Message& from) { +void ExtensionRangeOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ExtensionRangeOptions) if (&from == this) return; Clear(); @@ -4627,7 +4630,7 @@ bool ExtensionRangeOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -4658,8 +4661,8 @@ void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* other) { CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); } -::google::protobuf::Metadata ExtensionRangeOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata ExtensionRangeOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -4667,8 +4670,8 @@ void ExtensionRangeOptions::InternalSwap(ExtensionRangeOptions* other) { // =================================================================== void FieldDescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_FieldDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::FieldOptions*>( - ::google::protobuf::FieldOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_FieldDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::FieldOptions*>( + PROTOBUF_NAMESPACE_ID::FieldOptions::internal_default_instance()); } class FieldDescriptorProto::HasBitSetters { public: @@ -4699,18 +4702,18 @@ class FieldDescriptorProto::HasBitSetters { static void set_has_json_name(FieldDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000010u; } - static const ::google::protobuf::FieldOptions& options(const FieldDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::FieldOptions& options(const FieldDescriptorProto* msg); static void set_has_options(FieldDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000020u; } }; -const ::google::protobuf::FieldOptions& +const PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::HasBitSetters::options(const FieldDescriptorProto* msg) { return *msg->options_; } void FieldDescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::FieldOptions* options) { + PROTOBUF_NAMESPACE_ID::FieldOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -4736,49 +4739,49 @@ const int FieldDescriptorProto::kOptionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 FieldDescriptorProto::FieldDescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.FieldDescriptorProto) } -FieldDescriptorProto::FieldDescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +FieldDescriptorProto::FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldDescriptorProto) } FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } - extendee_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_extendee()) { - extendee_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extendee(), + extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extendee(), GetArenaNoVirtual()); } - type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_type_name()) { - type_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_name(), + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_name(), GetArenaNoVirtual()); } - default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_default_value()) { - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_value(), + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.default_value(), GetArenaNoVirtual()); } - json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_json_name()) { - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_name(), + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.json_name(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::FieldOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::FieldOptions(*from.options_); } else { options_ = nullptr; } @@ -4789,13 +4792,13 @@ FieldDescriptorProto::FieldDescriptorProto(const FieldDescriptorProto& from) } void FieldDescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - extendee_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - default_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - json_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + extendee_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + default_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + json_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&options_, 0, static_cast( reinterpret_cast(&oneof_index_) - reinterpret_cast(&options_)) + sizeof(oneof_index_)); @@ -4810,11 +4813,11 @@ FieldDescriptorProto::~FieldDescriptorProto() { void FieldDescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - extendee_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - default_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - json_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + extendee_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + type_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + default_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + json_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -4822,20 +4825,20 @@ void FieldDescriptorProto::ArenaDtor(void* object) { FieldDescriptorProto* _this = reinterpret_cast< FieldDescriptorProto* >(object); (void)_this; } -void FieldDescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void FieldDescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void FieldDescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const FieldDescriptorProto& FieldDescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FieldDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void FieldDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4875,89 +4878,90 @@ void FieldDescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string extendee = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_extendee(), ptr, ctx, "google.protobuf.FieldDescriptorProto.extendee"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_extendee(), ptr, ctx, "google.protobuf.FieldDescriptorProto.extendee"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 number = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - set_number(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 24) goto handle_unusual; + set_number(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.FieldDescriptorProto.Label label = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 32) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (!::google::protobuf::FieldDescriptorProto_Label_IsValid(val)) { - ::google::protobuf::internal::WriteVarint(4, val, mutable_unknown_fields()); + if (!PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(val)) { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); break; } - set_label(static_cast<::google::protobuf::FieldDescriptorProto_Label>(val)); + set_label(static_cast(val)); break; } // optional .google.protobuf.FieldDescriptorProto.Type type = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 40) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (!::google::protobuf::FieldDescriptorProto_Type_IsValid(val)) { - ::google::protobuf::internal::WriteVarint(5, val, mutable_unknown_fields()); + if (!PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(val)) { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); break; } - set_type(static_cast<::google::protobuf::FieldDescriptorProto_Type>(val)); + set_type(static_cast(val)); break; } // optional string type_name = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_type_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.type_name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_type_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.type_name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string default_value = 7; case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_default_value(), ptr, ctx, "google.protobuf.FieldDescriptorProto.default_value"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_default_value(), ptr, ctx, "google.protobuf.FieldDescriptorProto.default_value"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.FieldOptions options = 8; case 8: { - if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 66) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 oneof_index = 9; case 9: { - if (static_cast<::google::protobuf::uint8>(tag) != 72) goto handle_unusual; - set_oneof_index(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 72) goto handle_unusual; + set_oneof_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string json_name = 10; case 10: { - if (static_cast<::google::protobuf::uint8>(tag) != 82) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_json_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.json_name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 82) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_json_name(), ptr, ctx, "google.protobuf.FieldDescriptorProto.json_name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -4978,23 +4982,23 @@ const char* FieldDescriptorProto::_InternalParse(const char* ptr, ::google::prot } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool FieldDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.FieldDescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.name"); } else { goto handle_unusual; @@ -5004,12 +5008,12 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string extendee = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_extendee())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->extendee().data(), static_cast(this->extendee().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.extendee"); } else { goto handle_unusual; @@ -5019,10 +5023,10 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional int32 number = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { HasBitSetters::set_has_number(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &number_))); } else { goto handle_unusual; @@ -5032,16 +5036,16 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FieldDescriptorProto.Label label = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - if (::google::protobuf::FieldDescriptorProto_Label_IsValid(value)) { - set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value)); + if (PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(value)) { + set_label(static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label >(value)); } else { mutable_unknown_fields()->AddVarint( - 4, static_cast<::google::protobuf::uint64>(value)); + 4, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); } } else { goto handle_unusual; @@ -5051,16 +5055,16 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FieldDescriptorProto.Type type = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - if (::google::protobuf::FieldDescriptorProto_Type_IsValid(value)) { - set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value)); + if (PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(value)) { + set_type(static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type >(value)); } else { mutable_unknown_fields()->AddVarint( - 5, static_cast<::google::protobuf::uint64>(value)); + 5, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); } } else { goto handle_unusual; @@ -5070,12 +5074,12 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string type_name = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_type_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->type_name().data(), static_cast(this->type_name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.type_name"); } else { goto handle_unusual; @@ -5085,12 +5089,12 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string default_value = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_default_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->default_value().data(), static_cast(this->default_value().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.default_value"); } else { goto handle_unusual; @@ -5100,8 +5104,8 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.FieldOptions options = 8; case 8: { - if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -5111,10 +5115,10 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional int32 oneof_index = 9; case 9: { - if (static_cast< ::google::protobuf::uint8>(tag) == (72 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { HasBitSetters::set_has_oneof_index(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &oneof_index_))); } else { goto handle_unusual; @@ -5124,12 +5128,12 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( // optional string json_name = 10; case 10: { - if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_json_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->json_name().data(), static_cast(this->json_name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FieldDescriptorProto.json_name"); } else { goto handle_unusual; @@ -5142,7 +5146,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -5159,190 +5163,190 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void FieldDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.FieldDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // optional string extendee = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->extendee().data(), static_cast(this->extendee().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.extendee"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->extendee(), output); } // optional int32 number = 3; if (cached_has_bits & 0x00000040u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->number(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->number(), output); } // optional .google.protobuf.FieldDescriptorProto.Label label = 4; if (cached_has_bits & 0x00000100u) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 4, this->label(), output); } // optional .google.protobuf.FieldDescriptorProto.Type type = 5; if (cached_has_bits & 0x00000200u) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 5, this->type(), output); } // optional string type_name = 6; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->type_name().data(), static_cast(this->type_name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.type_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->type_name(), output); } // optional string default_value = 7; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->default_value().data(), static_cast(this->default_value().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.default_value"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->default_value(), output); } // optional .google.protobuf.FieldOptions options = 8; if (cached_has_bits & 0x00000020u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 8, HasBitSetters::options(this), output); } // optional int32 oneof_index = 9; if (cached_has_bits & 0x00000080u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(9, this->oneof_index(), output); } // optional string json_name = 10; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->json_name().data(), static_cast(this->json_name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.json_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 10, this->json_name(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FieldDescriptorProto) } -::google::protobuf::uint8* FieldDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FieldDescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // optional string extendee = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->extendee().data(), static_cast(this->extendee().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.extendee"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->extendee(), target); } // optional int32 number = 3; if (cached_has_bits & 0x00000040u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->number(), target); } // optional .google.protobuf.FieldDescriptorProto.Label label = 4; if (cached_has_bits & 0x00000100u) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 4, this->label(), target); } // optional .google.protobuf.FieldDescriptorProto.Type type = 5; if (cached_has_bits & 0x00000200u) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 5, this->type(), target); } // optional string type_name = 6; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->type_name().data(), static_cast(this->type_name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.type_name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 6, this->type_name(), target); } // optional string default_value = 7; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->default_value().data(), static_cast(this->default_value().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.default_value"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 7, this->default_value(), target); } // optional .google.protobuf.FieldOptions options = 8; if (cached_has_bits & 0x00000020u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 8, HasBitSetters::options(this), target); } // optional int32 oneof_index = 9; if (cached_has_bits & 0x00000080u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->oneof_index(), target); } // optional string json_name = 10; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->json_name().data(), static_cast(this->json_name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FieldDescriptorProto.json_name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 10, this->json_name(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldDescriptorProto) @@ -5355,10 +5359,10 @@ size_t FieldDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5367,56 +5371,56 @@ size_t FieldDescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional string extendee = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->extendee()); } // optional string type_name = 6; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->type_name()); } // optional string default_value = 7; if (cached_has_bits & 0x00000008u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->default_value()); } // optional string json_name = 10; if (cached_has_bits & 0x00000010u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->json_name()); } // optional .google.protobuf.FieldOptions options = 8; if (cached_has_bits & 0x00000020u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } // optional int32 number = 3; if (cached_has_bits & 0x00000040u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->number()); } // optional int32 oneof_index = 9; if (cached_has_bits & 0x00000080u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->oneof_index()); } @@ -5425,30 +5429,30 @@ size_t FieldDescriptorProto::ByteSizeLong() const { // optional .google.protobuf.FieldDescriptorProto.Label label = 4; if (cached_has_bits & 0x00000100u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->label()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->label()); } // optional .google.protobuf.FieldDescriptorProto.Type type = 5; if (cached_has_bits & 0x00000200u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->type()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void FieldDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void FieldDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldDescriptorProto) GOOGLE_DCHECK_NE(&from, this); const FieldDescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldDescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldDescriptorProto) MergeFrom(*source); @@ -5459,7 +5463,7 @@ void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldDescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; @@ -5480,7 +5484,7 @@ void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { set_json_name(from.json_name()); } if (cached_has_bits & 0x00000020u) { - mutable_options()->::google::protobuf::FieldOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::FieldOptions::MergeFrom(from.options()); } if (cached_has_bits & 0x00000040u) { number_ = from.number_; @@ -5501,7 +5505,7 @@ void FieldDescriptorProto::MergeFrom(const FieldDescriptorProto& from) { } } -void FieldDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void FieldDescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldDescriptorProto) if (&from == this) return; Clear(); @@ -5545,15 +5549,15 @@ void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - extendee_.Swap(&other->extendee_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + extendee_.Swap(&other->extendee_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - type_name_.Swap(&other->type_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_name_.Swap(&other->type_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - default_value_.Swap(&other->default_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + default_value_.Swap(&other->default_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - json_name_.Swap(&other->json_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + json_name_.Swap(&other->json_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); swap(number_, other->number_); @@ -5562,8 +5566,8 @@ void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { swap(type_, other->type_); } -::google::protobuf::Metadata FieldDescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata FieldDescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -5571,26 +5575,26 @@ void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { // =================================================================== void OneofDescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_OneofDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::OneofOptions*>( - ::google::protobuf::OneofOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_OneofDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::OneofOptions*>( + PROTOBUF_NAMESPACE_ID::OneofOptions::internal_default_instance()); } class OneofDescriptorProto::HasBitSetters { public: static void set_has_name(OneofDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000001u; } - static const ::google::protobuf::OneofOptions& options(const OneofDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::OneofOptions& options(const OneofDescriptorProto* msg); static void set_has_options(OneofDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000002u; } }; -const ::google::protobuf::OneofOptions& +const PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::HasBitSetters::options(const OneofDescriptorProto* msg) { return *msg->options_; } void OneofDescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::OneofOptions* options) { + PROTOBUF_NAMESPACE_ID::OneofOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -5608,29 +5612,29 @@ const int OneofDescriptorProto::kOptionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OneofDescriptorProto::OneofDescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.OneofDescriptorProto) } -OneofDescriptorProto::OneofDescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +OneofDescriptorProto::OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.OneofDescriptorProto) } OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::OneofOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::OneofOptions(*from.options_); } else { options_ = nullptr; } @@ -5638,9 +5642,9 @@ OneofDescriptorProto::OneofDescriptorProto(const OneofDescriptorProto& from) } void OneofDescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -5651,7 +5655,7 @@ OneofDescriptorProto::~OneofDescriptorProto() { void OneofDescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -5659,20 +5663,20 @@ void OneofDescriptorProto::ArenaDtor(void* object) { OneofDescriptorProto* _this = reinterpret_cast< OneofDescriptorProto* >(object); (void)_this; } -void OneofDescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void OneofDescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void OneofDescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const OneofDescriptorProto& OneofDescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_OneofDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void OneofDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.OneofDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5691,22 +5695,23 @@ void OneofDescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.OneofDescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.OneofDescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.OneofOptions options = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; @@ -5728,23 +5733,23 @@ const char* OneofDescriptorProto::_InternalParse(const char* ptr, ::google::prot } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool OneofDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.OneofDescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.OneofDescriptorProto.name"); } else { goto handle_unusual; @@ -5754,8 +5759,8 @@ bool OneofDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.OneofOptions options = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -5768,7 +5773,7 @@ bool OneofDescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -5785,62 +5790,62 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void OneofDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.OneofDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.OneofDescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // optional .google.protobuf.OneofOptions options = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, HasBitSetters::options(this), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.OneofDescriptorProto) } -::google::protobuf::uint8* OneofDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* OneofDescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.OneofDescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // optional .google.protobuf.OneofOptions options = 2; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, HasBitSetters::options(this), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofDescriptorProto) @@ -5853,10 +5858,10 @@ size_t OneofDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5865,32 +5870,32 @@ size_t OneofDescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional .google.protobuf.OneofOptions options = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void OneofDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void OneofDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.OneofDescriptorProto) GOOGLE_DCHECK_NE(&from, this); const OneofDescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.OneofDescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.OneofDescriptorProto) MergeFrom(*source); @@ -5901,7 +5906,7 @@ void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.OneofDescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; @@ -5910,12 +5915,12 @@ void OneofDescriptorProto::MergeFrom(const OneofDescriptorProto& from) { set_name(from.name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->::google::protobuf::OneofOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::OneofOptions::MergeFrom(from.options()); } } } -void OneofDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void OneofDescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.OneofDescriptorProto) if (&from == this) return; Clear(); @@ -5959,13 +5964,13 @@ void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); } -::google::protobuf::Metadata OneofDescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata OneofDescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -5990,19 +5995,19 @@ const int EnumDescriptorProto_EnumReservedRange::kEndFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } -EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) } EnumDescriptorProto_EnumReservedRange::EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -6031,20 +6036,20 @@ void EnumDescriptorProto_EnumReservedRange::ArenaDtor(void* object) { EnumDescriptorProto_EnumReservedRange* _this = reinterpret_cast< EnumDescriptorProto_EnumReservedRange* >(object); (void)_this; } -void EnumDescriptorProto_EnumReservedRange::RegisterArenaDtor(::google::protobuf::Arena*) { +void EnumDescriptorProto_EnumReservedRange::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void EnumDescriptorProto_EnumReservedRange::SetCachedSize(int size) const { _cached_size_.Set(size); } const EnumDescriptorProto_EnumReservedRange& EnumDescriptorProto_EnumReservedRange::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EnumDescriptorProto_EnumReservedRange_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void EnumDescriptorProto_EnumReservedRange::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6059,23 +6064,24 @@ void EnumDescriptorProto_EnumReservedRange::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional int32 start = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_start(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_start(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 end = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_end(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_end(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -6096,21 +6102,21 @@ const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* pt } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool EnumDescriptorProto_EnumReservedRange::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional int32 start = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { HasBitSetters::set_has_start(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &start_))); } else { goto handle_unusual; @@ -6120,10 +6126,10 @@ bool EnumDescriptorProto_EnumReservedRange::MergePartialFromCodedStream( // optional int32 end = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_end(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &end_))); } else { goto handle_unusual; @@ -6136,7 +6142,7 @@ bool EnumDescriptorProto_EnumReservedRange::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -6153,48 +6159,48 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void EnumDescriptorProto_EnumReservedRange::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->start(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->start(), output); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->end(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto.EnumReservedRange) } -::google::protobuf::uint8* EnumDescriptorProto_EnumReservedRange::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto_EnumReservedRange::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->start(), target); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->end(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto.EnumReservedRange) @@ -6207,10 +6213,10 @@ size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6219,32 +6225,32 @@ size_t EnumDescriptorProto_EnumReservedRange::ByteSizeLong() const { // optional int32 start = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->start()); } // optional int32 end = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->end()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void EnumDescriptorProto_EnumReservedRange::MergeFrom(const ::google::protobuf::Message& from) { +void EnumDescriptorProto_EnumReservedRange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) GOOGLE_DCHECK_NE(&from, this); const EnumDescriptorProto_EnumReservedRange* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumDescriptorProto.EnumReservedRange) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumDescriptorProto.EnumReservedRange) MergeFrom(*source); @@ -6255,7 +6261,7 @@ void EnumDescriptorProto_EnumReservedRange::MergeFrom(const EnumDescriptorProto_ // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; @@ -6270,7 +6276,7 @@ void EnumDescriptorProto_EnumReservedRange::MergeFrom(const EnumDescriptorProto_ } } -void EnumDescriptorProto_EnumReservedRange::CopyFrom(const ::google::protobuf::Message& from) { +void EnumDescriptorProto_EnumReservedRange::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumDescriptorProto.EnumReservedRange) if (&from == this) return; Clear(); @@ -6315,8 +6321,8 @@ void EnumDescriptorProto_EnumReservedRange::InternalSwap(EnumDescriptorProto_Enu swap(end_, other->end_); } -::google::protobuf::Metadata EnumDescriptorProto_EnumReservedRange::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto_EnumReservedRange::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -6324,26 +6330,26 @@ void EnumDescriptorProto_EnumReservedRange::InternalSwap(EnumDescriptorProto_Enu // =================================================================== void EnumDescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_EnumDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::EnumOptions*>( - ::google::protobuf::EnumOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_EnumDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::EnumOptions*>( + PROTOBUF_NAMESPACE_ID::EnumOptions::internal_default_instance()); } class EnumDescriptorProto::HasBitSetters { public: static void set_has_name(EnumDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000001u; } - static const ::google::protobuf::EnumOptions& options(const EnumDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::EnumOptions& options(const EnumDescriptorProto* msg); static void set_has_options(EnumDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000002u; } }; -const ::google::protobuf::EnumOptions& +const PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::HasBitSetters::options(const EnumDescriptorProto* msg) { return *msg->options_; } void EnumDescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::EnumOptions* options) { + PROTOBUF_NAMESPACE_ID::EnumOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -6364,12 +6370,12 @@ const int EnumDescriptorProto::kReservedNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 EnumDescriptorProto::EnumDescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.EnumDescriptorProto) } -EnumDescriptorProto::EnumDescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +EnumDescriptorProto::EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), value_(arena), reserved_range_(arena), @@ -6379,20 +6385,20 @@ EnumDescriptorProto::EnumDescriptorProto(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumDescriptorProto) } EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), value_(from.value_), reserved_range_(from.reserved_range_), reserved_name_(from.reserved_name_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::EnumOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::EnumOptions(*from.options_); } else { options_ = nullptr; } @@ -6400,9 +6406,9 @@ EnumDescriptorProto::EnumDescriptorProto(const EnumDescriptorProto& from) } void EnumDescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -6413,7 +6419,7 @@ EnumDescriptorProto::~EnumDescriptorProto() { void EnumDescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -6421,20 +6427,20 @@ void EnumDescriptorProto::ArenaDtor(void* object) { EnumDescriptorProto* _this = reinterpret_cast< EnumDescriptorProto* >(object); (void)_this; } -void EnumDescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void EnumDescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void EnumDescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const EnumDescriptorProto& EnumDescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EnumDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void EnumDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6456,54 +6462,55 @@ void EnumDescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.EnumDescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.EnumDescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; do { ptr = ctx->ParseMessage(add_value(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 18 && (ptr += 1)); break; } // optional .google.protobuf.EnumOptions options = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; do { ptr = ctx->ParseMessage(add_reserved_range(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 34 && (ptr += 1)); break; } // repeated string reserved_name = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 42) goto handle_unusual; do { - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(add_reserved_name(), ptr, ctx, "google.protobuf.EnumDescriptorProto.reserved_name"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_reserved_name(), ptr, ctx, "google.protobuf.EnumDescriptorProto.reserved_name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 42 && (ptr += 1)); break; } default: { @@ -6523,23 +6530,23 @@ const char* EnumDescriptorProto::_InternalParse(const char* ptr, ::google::proto } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool EnumDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.EnumDescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.EnumDescriptorProto.name"); } else { goto handle_unusual; @@ -6549,8 +6556,8 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.EnumValueDescriptorProto value = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_value())); } else { goto handle_unusual; @@ -6560,8 +6567,8 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.EnumOptions options = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -6571,8 +6578,8 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_reserved_range())); } else { goto handle_unusual; @@ -6582,13 +6589,13 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( // repeated string reserved_name = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_reserved_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->reserved_name(this->reserved_name_size() - 1).data(), static_cast(this->reserved_name(this->reserved_name_size() - 1).length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.EnumDescriptorProto.reserved_name"); } else { goto handle_unusual; @@ -6601,7 +6608,7 @@ bool EnumDescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -6618,26 +6625,26 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void EnumDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.EnumDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; for (unsigned int i = 0, n = static_cast(this->value_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->value(static_cast(i)), output); @@ -6645,14 +6652,14 @@ void EnumDescriptorProto::SerializeWithCachedSizes( // optional .google.protobuf.EnumOptions options = 3; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, HasBitSetters::options(this), output); } // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; for (unsigned int i = 0, n = static_cast(this->reserved_range_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->reserved_range(static_cast(i)), output); @@ -6660,50 +6667,50 @@ void EnumDescriptorProto::SerializeWithCachedSizes( // repeated string reserved_name = 5; for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.reserved_name"); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( 5, this->reserved_name(i), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumDescriptorProto) } -::google::protobuf::uint8* EnumDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumDescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // repeated .google.protobuf.EnumValueDescriptorProto value = 2; for (unsigned int i = 0, n = static_cast(this->value_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->value(static_cast(i)), target); } // optional .google.protobuf.EnumOptions options = 3; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, HasBitSetters::options(this), target); } @@ -6711,23 +6718,23 @@ void EnumDescriptorProto::SerializeWithCachedSizes( // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; for (unsigned int i = 0, n = static_cast(this->reserved_range_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->reserved_range(static_cast(i)), target); } // repeated string reserved_name = 5; for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->reserved_name(i).data(), static_cast(this->reserved_name(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumDescriptorProto.reserved_name"); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteStringToArray(5, this->reserved_name(i), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumDescriptorProto) @@ -6740,10 +6747,10 @@ size_t EnumDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6753,7 +6760,7 @@ size_t EnumDescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->value(static_cast(i))); } } @@ -6764,16 +6771,16 @@ size_t EnumDescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->reserved_range(static_cast(i))); } } // repeated string reserved_name = 5; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->reserved_name_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->reserved_name_size()); for (int i = 0, n = this->reserved_name_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->reserved_name(i)); } @@ -6782,32 +6789,32 @@ size_t EnumDescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional .google.protobuf.EnumOptions options = 3; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void EnumDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void EnumDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumDescriptorProto) GOOGLE_DCHECK_NE(&from, this); const EnumDescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumDescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumDescriptorProto) MergeFrom(*source); @@ -6818,7 +6825,7 @@ void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumDescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; value_.MergeFrom(from.value_); @@ -6830,12 +6837,12 @@ void EnumDescriptorProto::MergeFrom(const EnumDescriptorProto& from) { set_name(from.name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->::google::protobuf::EnumOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::EnumOptions::MergeFrom(from.options()); } } } -void EnumDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void EnumDescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumDescriptorProto) if (&from == this) return; Clear(); @@ -6850,7 +6857,7 @@ void EnumDescriptorProto::CopyFrom(const EnumDescriptorProto& from) { } bool EnumDescriptorProto::IsInitialized() const { - if (!::google::protobuf::internal::AllAreInitialized(this->value())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->value())) return false; if (has_options()) { if (!this->options_->IsInitialized()) return false; } @@ -6883,13 +6890,13 @@ void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) { CastToBase(&value_)->InternalSwap(CastToBase(&other->value_)); CastToBase(&reserved_range_)->InternalSwap(CastToBase(&other->reserved_range_)); reserved_name_.InternalSwap(CastToBase(&other->reserved_name_)); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); } -::google::protobuf::Metadata EnumDescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata EnumDescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -6897,8 +6904,8 @@ void EnumDescriptorProto::InternalSwap(EnumDescriptorProto* other) { // =================================================================== void EnumValueDescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_EnumValueDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::EnumValueOptions*>( - ::google::protobuf::EnumValueOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_EnumValueDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::EnumValueOptions*>( + PROTOBUF_NAMESPACE_ID::EnumValueOptions::internal_default_instance()); } class EnumValueDescriptorProto::HasBitSetters { public: @@ -6908,18 +6915,18 @@ class EnumValueDescriptorProto::HasBitSetters { static void set_has_number(EnumValueDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000004u; } - static const ::google::protobuf::EnumValueOptions& options(const EnumValueDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::EnumValueOptions& options(const EnumValueDescriptorProto* msg); static void set_has_options(EnumValueDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000002u; } }; -const ::google::protobuf::EnumValueOptions& +const PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::HasBitSetters::options(const EnumValueDescriptorProto* msg) { return *msg->options_; } void EnumValueDescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::EnumValueOptions* options) { + PROTOBUF_NAMESPACE_ID::EnumValueOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -6938,29 +6945,29 @@ const int EnumValueDescriptorProto::kOptionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 EnumValueDescriptorProto::EnumValueDescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.EnumValueDescriptorProto) } -EnumValueDescriptorProto::EnumValueDescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +EnumValueDescriptorProto::EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueDescriptorProto) } EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::EnumValueOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::EnumValueOptions(*from.options_); } else { options_ = nullptr; } @@ -6969,9 +6976,9 @@ EnumValueDescriptorProto::EnumValueDescriptorProto(const EnumValueDescriptorProt } void EnumValueDescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&options_, 0, static_cast( reinterpret_cast(&number_) - reinterpret_cast(&options_)) + sizeof(number_)); @@ -6984,7 +6991,7 @@ EnumValueDescriptorProto::~EnumValueDescriptorProto() { void EnumValueDescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -6992,20 +6999,20 @@ void EnumValueDescriptorProto::ArenaDtor(void* object) { EnumValueDescriptorProto* _this = reinterpret_cast< EnumValueDescriptorProto* >(object); (void)_this; } -void EnumValueDescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void EnumValueDescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void EnumValueDescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const EnumValueDescriptorProto& EnumValueDescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EnumValueDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void EnumValueDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7025,29 +7032,30 @@ void EnumValueDescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.EnumValueDescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.EnumValueDescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 number = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_number(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_number(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.EnumValueOptions options = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; @@ -7069,23 +7077,23 @@ const char* EnumValueDescriptorProto::_InternalParse(const char* ptr, ::google:: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool EnumValueDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueDescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.EnumValueDescriptorProto.name"); } else { goto handle_unusual; @@ -7095,10 +7103,10 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream( // optional int32 number = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_number(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &number_))); } else { goto handle_unusual; @@ -7108,8 +7116,8 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.EnumValueOptions options = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -7122,7 +7130,7 @@ bool EnumValueDescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -7139,72 +7147,72 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void EnumValueDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumValueDescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // optional int32 number = 2; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->number(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->number(), output); } // optional .google.protobuf.EnumValueOptions options = 3; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, HasBitSetters::options(this), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueDescriptorProto) } -::google::protobuf::uint8* EnumValueDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumValueDescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.EnumValueDescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // optional int32 number = 2; if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->number(), target); } // optional .google.protobuf.EnumValueOptions options = 3; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, HasBitSetters::options(this), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueDescriptorProto) @@ -7217,10 +7225,10 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7229,39 +7237,39 @@ size_t EnumValueDescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional .google.protobuf.EnumValueOptions options = 3; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } // optional int32 number = 2; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->number()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void EnumValueDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void EnumValueDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumValueDescriptorProto) GOOGLE_DCHECK_NE(&from, this); const EnumValueDescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumValueDescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumValueDescriptorProto) MergeFrom(*source); @@ -7272,7 +7280,7 @@ void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.EnumValueDescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; @@ -7281,7 +7289,7 @@ void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) { set_name(from.name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->::google::protobuf::EnumValueOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::EnumValueOptions::MergeFrom(from.options()); } if (cached_has_bits & 0x00000004u) { number_ = from.number_; @@ -7290,7 +7298,7 @@ void EnumValueDescriptorProto::MergeFrom(const EnumValueDescriptorProto& from) { } } -void EnumValueDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void EnumValueDescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumValueDescriptorProto) if (&from == this) return; Clear(); @@ -7334,14 +7342,14 @@ void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); swap(number_, other->number_); } -::google::protobuf::Metadata EnumValueDescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata EnumValueDescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -7349,26 +7357,26 @@ void EnumValueDescriptorProto::InternalSwap(EnumValueDescriptorProto* other) { // =================================================================== void ServiceDescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_ServiceDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::ServiceOptions*>( - ::google::protobuf::ServiceOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_ServiceDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::ServiceOptions*>( + PROTOBUF_NAMESPACE_ID::ServiceOptions::internal_default_instance()); } class ServiceDescriptorProto::HasBitSetters { public: static void set_has_name(ServiceDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000001u; } - static const ::google::protobuf::ServiceOptions& options(const ServiceDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::ServiceOptions& options(const ServiceDescriptorProto* msg); static void set_has_options(ServiceDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000002u; } }; -const ::google::protobuf::ServiceOptions& +const PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::HasBitSetters::options(const ServiceDescriptorProto* msg) { return *msg->options_; } void ServiceDescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::ServiceOptions* options) { + PROTOBUF_NAMESPACE_ID::ServiceOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -7387,12 +7395,12 @@ const int ServiceDescriptorProto::kOptionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ServiceDescriptorProto::ServiceDescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.ServiceDescriptorProto) } -ServiceDescriptorProto::ServiceDescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +ServiceDescriptorProto::ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), method_(arena) { SharedCtor(); @@ -7400,18 +7408,18 @@ ServiceDescriptorProto::ServiceDescriptorProto(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceDescriptorProto) } ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), method_(from.method_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::ServiceOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::ServiceOptions(*from.options_); } else { options_ = nullptr; } @@ -7419,9 +7427,9 @@ ServiceDescriptorProto::ServiceDescriptorProto(const ServiceDescriptorProto& fro } void ServiceDescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); options_ = nullptr; } @@ -7432,7 +7440,7 @@ ServiceDescriptorProto::~ServiceDescriptorProto() { void ServiceDescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -7440,20 +7448,20 @@ void ServiceDescriptorProto::ArenaDtor(void* object) { ServiceDescriptorProto* _this = reinterpret_cast< ServiceDescriptorProto* >(object); (void)_this; } -void ServiceDescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void ServiceDescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void ServiceDescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const ServiceDescriptorProto& ServiceDescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ServiceDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void ServiceDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7473,32 +7481,33 @@ void ServiceDescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.ServiceDescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.ServiceDescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.MethodDescriptorProto method = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; do { ptr = ctx->ParseMessage(add_method(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 18 && (ptr += 1)); break; } // optional .google.protobuf.ServiceOptions options = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; @@ -7520,23 +7529,23 @@ const char* ServiceDescriptorProto::_InternalParse(const char* ptr, ::google::pr } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool ServiceDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.ServiceDescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.ServiceDescriptorProto.name"); } else { goto handle_unusual; @@ -7546,8 +7555,8 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream( // repeated .google.protobuf.MethodDescriptorProto method = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_method())); } else { goto handle_unusual; @@ -7557,8 +7566,8 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.ServiceOptions options = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -7571,7 +7580,7 @@ bool ServiceDescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -7588,26 +7597,26 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void ServiceDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.ServiceDescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // repeated .google.protobuf.MethodDescriptorProto method = 2; for (unsigned int i = 0, n = static_cast(this->method_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->method(static_cast(i)), output); @@ -7615,52 +7624,52 @@ void ServiceDescriptorProto::SerializeWithCachedSizes( // optional .google.protobuf.ServiceOptions options = 3; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 3, HasBitSetters::options(this), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceDescriptorProto) } -::google::protobuf::uint8* ServiceDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ServiceDescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.ServiceDescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // repeated .google.protobuf.MethodDescriptorProto method = 2; for (unsigned int i = 0, n = static_cast(this->method_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->method(static_cast(i)), target); } // optional .google.protobuf.ServiceOptions options = 3; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 3, HasBitSetters::options(this), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto) @@ -7673,10 +7682,10 @@ size_t ServiceDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7686,7 +7695,7 @@ size_t ServiceDescriptorProto::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->method(static_cast(i))); } } @@ -7696,32 +7705,32 @@ size_t ServiceDescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional .google.protobuf.ServiceOptions options = 3; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ServiceDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void ServiceDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ServiceDescriptorProto) GOOGLE_DCHECK_NE(&from, this); const ServiceDescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ServiceDescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.ServiceDescriptorProto) MergeFrom(*source); @@ -7732,7 +7741,7 @@ void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ServiceDescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; method_.MergeFrom(from.method_); @@ -7742,12 +7751,12 @@ void ServiceDescriptorProto::MergeFrom(const ServiceDescriptorProto& from) { set_name(from.name()); } if (cached_has_bits & 0x00000002u) { - mutable_options()->::google::protobuf::ServiceOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::ServiceOptions::MergeFrom(from.options()); } } } -void ServiceDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void ServiceDescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ServiceDescriptorProto) if (&from == this) return; Clear(); @@ -7762,7 +7771,7 @@ void ServiceDescriptorProto::CopyFrom(const ServiceDescriptorProto& from) { } bool ServiceDescriptorProto::IsInitialized() const { - if (!::google::protobuf::internal::AllAreInitialized(this->method())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->method())) return false; if (has_options()) { if (!this->options_->IsInitialized()) return false; } @@ -7793,13 +7802,13 @@ void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) { _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); CastToBase(&method_)->InternalSwap(CastToBase(&other->method_)); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); } -::google::protobuf::Metadata ServiceDescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata ServiceDescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -7807,8 +7816,8 @@ void ServiceDescriptorProto::InternalSwap(ServiceDescriptorProto* other) { // =================================================================== void MethodDescriptorProto::InitAsDefaultInstance() { - ::google::protobuf::_MethodDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::protobuf::MethodOptions*>( - ::google::protobuf::MethodOptions::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_MethodDescriptorProto_default_instance_._instance.get_mutable()->options_ = const_cast< PROTOBUF_NAMESPACE_ID::MethodOptions*>( + PROTOBUF_NAMESPACE_ID::MethodOptions::internal_default_instance()); } class MethodDescriptorProto::HasBitSetters { public: @@ -7821,7 +7830,7 @@ class MethodDescriptorProto::HasBitSetters { static void set_has_output_type(MethodDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000004u; } - static const ::google::protobuf::MethodOptions& options(const MethodDescriptorProto* msg); + static const PROTOBUF_NAMESPACE_ID::MethodOptions& options(const MethodDescriptorProto* msg); static void set_has_options(MethodDescriptorProto* msg) { msg->_has_bits_[0] |= 0x00000008u; } @@ -7833,12 +7842,12 @@ class MethodDescriptorProto::HasBitSetters { } }; -const ::google::protobuf::MethodOptions& +const PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::HasBitSetters::options(const MethodDescriptorProto* msg) { return *msg->options_; } void MethodDescriptorProto::unsafe_arena_set_allocated_options( - ::google::protobuf::MethodOptions* options) { + PROTOBUF_NAMESPACE_ID::MethodOptions* options) { if (GetArenaNoVirtual() == nullptr) { delete options_; } @@ -7860,39 +7869,39 @@ const int MethodDescriptorProto::kServerStreamingFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MethodDescriptorProto::MethodDescriptorProto() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.MethodDescriptorProto) } -MethodDescriptorProto::MethodDescriptorProto(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +MethodDescriptorProto::MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.MethodDescriptorProto) } MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name()) { - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } - input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_input_type()) { - input_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.input_type(), + input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.input_type(), GetArenaNoVirtual()); } - output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_output_type()) { - output_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.output_type(), + output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.output_type(), GetArenaNoVirtual()); } if (from.has_options()) { - options_ = new ::google::protobuf::MethodOptions(*from.options_); + options_ = new PROTOBUF_NAMESPACE_ID::MethodOptions(*from.options_); } else { options_ = nullptr; } @@ -7903,11 +7912,11 @@ MethodDescriptorProto::MethodDescriptorProto(const MethodDescriptorProto& from) } void MethodDescriptorProto::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - input_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - output_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + input_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + output_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&options_, 0, static_cast( reinterpret_cast(&server_streaming_) - reinterpret_cast(&options_)) + sizeof(server_streaming_)); @@ -7920,9 +7929,9 @@ MethodDescriptorProto::~MethodDescriptorProto() { void MethodDescriptorProto::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - input_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - output_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + input_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + output_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete options_; } @@ -7930,20 +7939,20 @@ void MethodDescriptorProto::ArenaDtor(void* object) { MethodDescriptorProto* _this = reinterpret_cast< MethodDescriptorProto* >(object); (void)_this; } -void MethodDescriptorProto::RegisterArenaDtor(::google::protobuf::Arena*) { +void MethodDescriptorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MethodDescriptorProto::SetCachedSize(int size) const { _cached_size_.Set(size); } const MethodDescriptorProto& MethodDescriptorProto::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MethodDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void MethodDescriptorProto::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.MethodDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7971,51 +7980,52 @@ void MethodDescriptorProto::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.MethodDescriptorProto.name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name(), ptr, ctx, "google.protobuf.MethodDescriptorProto.name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string input_type = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_input_type(), ptr, ctx, "google.protobuf.MethodDescriptorProto.input_type"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_input_type(), ptr, ctx, "google.protobuf.MethodDescriptorProto.input_type"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string output_type = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_output_type(), ptr, ctx, "google.protobuf.MethodDescriptorProto.output_type"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_output_type(), ptr, ctx, "google.protobuf.MethodDescriptorProto.output_type"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.MethodOptions options = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; ptr = ctx->ParseMessage(mutable_options(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool client_streaming = 5 [default = false]; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; - set_client_streaming(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 40) goto handle_unusual; + set_client_streaming(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool server_streaming = 6 [default = false]; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; - set_server_streaming(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 48) goto handle_unusual; + set_server_streaming(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -8036,23 +8046,23 @@ const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::google::pro } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool MethodDescriptorProto::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.MethodDescriptorProto) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.MethodDescriptorProto.name"); } else { goto handle_unusual; @@ -8062,12 +8072,12 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional string input_type = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_input_type())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->input_type().data(), static_cast(this->input_type().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.MethodDescriptorProto.input_type"); } else { goto handle_unusual; @@ -8077,12 +8087,12 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional string output_type = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_output_type())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->output_type().data(), static_cast(this->output_type().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.MethodDescriptorProto.output_type"); } else { goto handle_unusual; @@ -8092,8 +8102,8 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional .google.protobuf.MethodOptions options = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_options())); } else { goto handle_unusual; @@ -8103,10 +8113,10 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional bool client_streaming = 5 [default = false]; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { HasBitSetters::set_has_client_streaming(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &client_streaming_))); } else { goto handle_unusual; @@ -8116,10 +8126,10 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( // optional bool server_streaming = 6 [default = false]; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { HasBitSetters::set_has_server_streaming(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &server_streaming_))); } else { goto handle_unusual; @@ -8132,7 +8142,7 @@ bool MethodDescriptorProto::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -8149,124 +8159,124 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void MethodDescriptorProto::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.MethodDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->input_type().data(), static_cast(this->input_type().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.input_type"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->input_type(), output); } // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->output_type().data(), static_cast(this->output_type().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.output_type"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->output_type(), output); } // optional .google.protobuf.MethodOptions options = 4; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 4, HasBitSetters::options(this), output); } // optional bool client_streaming = 5 [default = false]; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(5, this->client_streaming(), output); } // optional bool server_streaming = 6 [default = false]; if (cached_has_bits & 0x00000020u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(6, this->server_streaming(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.MethodDescriptorProto) } -::google::protobuf::uint8* MethodDescriptorProto::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* MethodDescriptorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->input_type().data(), static_cast(this->input_type().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.input_type"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->input_type(), target); } // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->output_type().data(), static_cast(this->output_type().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.output_type"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 3, this->output_type(), target); } // optional .google.protobuf.MethodOptions options = 4; if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 4, HasBitSetters::options(this), target); } // optional bool client_streaming = 5 [default = false]; if (cached_has_bits & 0x00000010u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->client_streaming(), target); } // optional bool server_streaming = 6 [default = false]; if (cached_has_bits & 0x00000020u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->server_streaming(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodDescriptorProto) @@ -8279,10 +8289,10 @@ size_t MethodDescriptorProto::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -8291,28 +8301,28 @@ size_t MethodDescriptorProto::ByteSizeLong() const { // optional string name = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name()); } // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->input_type()); } // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->output_type()); } // optional .google.protobuf.MethodOptions options = 4; if (cached_has_bits & 0x00000008u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *options_); } @@ -8327,20 +8337,20 @@ size_t MethodDescriptorProto::ByteSizeLong() const { } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void MethodDescriptorProto::MergeFrom(const ::google::protobuf::Message& from) { +void MethodDescriptorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.MethodDescriptorProto) GOOGLE_DCHECK_NE(&from, this); const MethodDescriptorProto* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.MethodDescriptorProto) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.MethodDescriptorProto) MergeFrom(*source); @@ -8351,7 +8361,7 @@ void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.MethodDescriptorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; @@ -8366,7 +8376,7 @@ void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) { set_output_type(from.output_type()); } if (cached_has_bits & 0x00000008u) { - mutable_options()->::google::protobuf::MethodOptions::MergeFrom(from.options()); + mutable_options()->PROTOBUF_NAMESPACE_ID::MethodOptions::MergeFrom(from.options()); } if (cached_has_bits & 0x00000010u) { client_streaming_ = from.client_streaming_; @@ -8378,7 +8388,7 @@ void MethodDescriptorProto::MergeFrom(const MethodDescriptorProto& from) { } } -void MethodDescriptorProto::CopyFrom(const ::google::protobuf::Message& from) { +void MethodDescriptorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.MethodDescriptorProto) if (&from == this) return; Clear(); @@ -8422,19 +8432,19 @@ void MethodDescriptorProto::InternalSwap(MethodDescriptorProto* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - input_type_.Swap(&other->input_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + input_type_.Swap(&other->input_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - output_type_.Swap(&other->output_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + output_type_.Swap(&other->output_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(options_, other->options_); swap(client_streaming_, other->client_streaming_); swap(server_streaming_, other->server_streaming_); } -::google::protobuf::Metadata MethodDescriptorProto::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata MethodDescriptorProto::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -8532,12 +8542,12 @@ const int FileOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 FileOptions::FileOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.FileOptions) } -FileOptions::FileOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +FileOptions::FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -8546,60 +8556,60 @@ FileOptions::FileOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.FileOptions) } FileOptions::FileOptions(const FileOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { _internal_metadata_.MergeFrom(from._internal_metadata_); _extensions_.MergeFrom(from._extensions_); - java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_java_package()) { - java_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_package(), + java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.java_package(), GetArenaNoVirtual()); } - java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_java_outer_classname()) { - java_outer_classname_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname(), + java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.java_outer_classname(), GetArenaNoVirtual()); } - go_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_go_package()) { - go_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.go_package(), + go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.go_package(), GetArenaNoVirtual()); } - objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + objc_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_objc_class_prefix()) { - objc_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix(), + objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.objc_class_prefix(), GetArenaNoVirtual()); } - csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + csharp_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_csharp_namespace()) { - csharp_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace(), + csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.csharp_namespace(), GetArenaNoVirtual()); } - swift_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + swift_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_swift_prefix()) { - swift_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.swift_prefix(), + swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.swift_prefix(), GetArenaNoVirtual()); } - php_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + php_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_php_class_prefix()) { - php_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.php_class_prefix(), + php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.php_class_prefix(), GetArenaNoVirtual()); } - php_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + php_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_php_namespace()) { - php_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.php_namespace(), + php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.php_namespace(), GetArenaNoVirtual()); } - php_metadata_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + php_metadata_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_php_metadata_namespace()) { - php_metadata_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.php_metadata_namespace(), + php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.php_metadata_namespace(), GetArenaNoVirtual()); } - ruby_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ruby_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_ruby_package()) { - ruby_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ruby_package(), + ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.ruby_package(), GetArenaNoVirtual()); } ::memcpy(&java_multiple_files_, &from.java_multiple_files_, @@ -8609,18 +8619,18 @@ FileOptions::FileOptions(const FileOptions& from) } void FileOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto.base); - java_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - java_outer_classname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - go_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - objc_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - csharp_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - swift_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - php_class_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - php_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - php_metadata_namespace_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ruby_package_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + java_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + java_outer_classname_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + go_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + objc_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + csharp_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + swift_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + php_class_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + php_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + php_metadata_namespace_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ruby_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&java_multiple_files_, 0, static_cast( reinterpret_cast(&cc_enable_arenas_) - reinterpret_cast(&java_multiple_files_)) + sizeof(cc_enable_arenas_)); @@ -8634,36 +8644,36 @@ FileOptions::~FileOptions() { void FileOptions::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - java_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - java_outer_classname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - go_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - objc_class_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - csharp_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - swift_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - php_class_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - php_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - php_metadata_namespace_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ruby_package_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + java_package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + java_outer_classname_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + go_package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + objc_class_prefix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + csharp_namespace_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + swift_prefix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + php_class_prefix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + php_namespace_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + php_metadata_namespace_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ruby_package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void FileOptions::ArenaDtor(void* object) { FileOptions* _this = reinterpret_cast< FileOptions* >(object); (void)_this; } -void FileOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void FileOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void FileOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const FileOptions& FileOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FileOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void FileOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -8720,165 +8730,166 @@ void FileOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FileOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* FileOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional string java_package = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_java_package(), ptr, ctx, "google.protobuf.FileOptions.java_package"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_java_package(), ptr, ctx, "google.protobuf.FileOptions.java_package"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string java_outer_classname = 8; case 8: { - if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_java_outer_classname(), ptr, ctx, "google.protobuf.FileOptions.java_outer_classname"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 66) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_java_outer_classname(), ptr, ctx, "google.protobuf.FileOptions.java_outer_classname"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; case 9: { - if (static_cast<::google::protobuf::uint8>(tag) != 72) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 72) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (!::google::protobuf::FileOptions_OptimizeMode_IsValid(val)) { - ::google::protobuf::internal::WriteVarint(9, val, mutable_unknown_fields()); + if (!PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(val)) { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields()); break; } - set_optimize_for(static_cast<::google::protobuf::FileOptions_OptimizeMode>(val)); + set_optimize_for(static_cast(val)); break; } // optional bool java_multiple_files = 10 [default = false]; case 10: { - if (static_cast<::google::protobuf::uint8>(tag) != 80) goto handle_unusual; - set_java_multiple_files(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 80) goto handle_unusual; + set_java_multiple_files(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string go_package = 11; case 11: { - if (static_cast<::google::protobuf::uint8>(tag) != 90) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_go_package(), ptr, ctx, "google.protobuf.FileOptions.go_package"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 90) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_go_package(), ptr, ctx, "google.protobuf.FileOptions.go_package"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool cc_generic_services = 16 [default = false]; case 16: { - if (static_cast<::google::protobuf::uint8>(tag) != 128) goto handle_unusual; - set_cc_generic_services(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 128) goto handle_unusual; + set_cc_generic_services(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool java_generic_services = 17 [default = false]; case 17: { - if (static_cast<::google::protobuf::uint8>(tag) != 136) goto handle_unusual; - set_java_generic_services(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 136) goto handle_unusual; + set_java_generic_services(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool py_generic_services = 18 [default = false]; case 18: { - if (static_cast<::google::protobuf::uint8>(tag) != 144) goto handle_unusual; - set_py_generic_services(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 144) goto handle_unusual; + set_py_generic_services(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; case 20: { - if (static_cast<::google::protobuf::uint8>(tag) != 160) goto handle_unusual; - set_java_generate_equals_and_hash(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 160) goto handle_unusual; + set_java_generate_equals_and_hash(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool deprecated = 23 [default = false]; case 23: { - if (static_cast<::google::protobuf::uint8>(tag) != 184) goto handle_unusual; - set_deprecated(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 184) goto handle_unusual; + set_deprecated(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool java_string_check_utf8 = 27 [default = false]; case 27: { - if (static_cast<::google::protobuf::uint8>(tag) != 216) goto handle_unusual; - set_java_string_check_utf8(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 216) goto handle_unusual; + set_java_string_check_utf8(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool cc_enable_arenas = 31 [default = false]; case 31: { - if (static_cast<::google::protobuf::uint8>(tag) != 248) goto handle_unusual; - set_cc_enable_arenas(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 248) goto handle_unusual; + set_cc_enable_arenas(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string objc_class_prefix = 36; case 36: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_objc_class_prefix(), ptr, ctx, "google.protobuf.FileOptions.objc_class_prefix"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_objc_class_prefix(), ptr, ctx, "google.protobuf.FileOptions.objc_class_prefix"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string csharp_namespace = 37; case 37: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_csharp_namespace(), ptr, ctx, "google.protobuf.FileOptions.csharp_namespace"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 42) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_csharp_namespace(), ptr, ctx, "google.protobuf.FileOptions.csharp_namespace"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string swift_prefix = 39; case 39: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_swift_prefix(), ptr, ctx, "google.protobuf.FileOptions.swift_prefix"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_swift_prefix(), ptr, ctx, "google.protobuf.FileOptions.swift_prefix"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string php_class_prefix = 40; case 40: { - if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_php_class_prefix(), ptr, ctx, "google.protobuf.FileOptions.php_class_prefix"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 66) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_php_class_prefix(), ptr, ctx, "google.protobuf.FileOptions.php_class_prefix"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string php_namespace = 41; case 41: { - if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_php_namespace(), ptr, ctx, "google.protobuf.FileOptions.php_namespace"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 74) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_php_namespace(), ptr, ctx, "google.protobuf.FileOptions.php_namespace"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool php_generic_services = 42 [default = false]; case 42: { - if (static_cast<::google::protobuf::uint8>(tag) != 80) goto handle_unusual; - set_php_generic_services(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 80) goto handle_unusual; + set_php_generic_services(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string php_metadata_namespace = 44; case 44: { - if (static_cast<::google::protobuf::uint8>(tag) != 98) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_php_metadata_namespace(), ptr, ctx, "google.protobuf.FileOptions.php_metadata_namespace"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 98) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_php_metadata_namespace(), ptr, ctx, "google.protobuf.FileOptions.php_metadata_namespace"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string ruby_package = 45; case 45: { - if (static_cast<::google::protobuf::uint8>(tag) != 106) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_ruby_package(), ptr, ctx, "google.protobuf.FileOptions.ruby_package"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 106) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_ruby_package(), ptr, ctx, "google.protobuf.FileOptions.ruby_package"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -8904,23 +8915,23 @@ const char* FileOptions::_InternalParse(const char* ptr, ::google::protobuf::int } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool FileOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.FileOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string java_package = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_java_package())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->java_package().data(), static_cast(this->java_package().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.java_package"); } else { goto handle_unusual; @@ -8930,12 +8941,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string java_outer_classname = 8; case 8: { - if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_java_outer_classname())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.java_outer_classname"); } else { goto handle_unusual; @@ -8945,16 +8956,16 @@ bool FileOptions::MergePartialFromCodedStream( // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; case 9: { - if (static_cast< ::google::protobuf::uint8>(tag) == (72 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - if (::google::protobuf::FileOptions_OptimizeMode_IsValid(value)) { - set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value)); + if (PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(value)) { + set_optimize_for(static_cast< PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode >(value)); } else { mutable_unknown_fields()->AddVarint( - 9, static_cast<::google::protobuf::uint64>(value)); + 9, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); } } else { goto handle_unusual; @@ -8964,10 +8975,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_multiple_files = 10 [default = false]; case 10: { - if (static_cast< ::google::protobuf::uint8>(tag) == (80 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { HasBitSetters::set_has_java_multiple_files(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &java_multiple_files_))); } else { goto handle_unusual; @@ -8977,12 +8988,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string go_package = 11; case 11: { - if (static_cast< ::google::protobuf::uint8>(tag) == (90 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_go_package())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->go_package().data(), static_cast(this->go_package().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.go_package"); } else { goto handle_unusual; @@ -8992,10 +9003,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool cc_generic_services = 16 [default = false]; case 16: { - if (static_cast< ::google::protobuf::uint8>(tag) == (128 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (128 & 0xFF)) { HasBitSetters::set_has_cc_generic_services(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &cc_generic_services_))); } else { goto handle_unusual; @@ -9005,10 +9016,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_generic_services = 17 [default = false]; case 17: { - if (static_cast< ::google::protobuf::uint8>(tag) == (136 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (136 & 0xFF)) { HasBitSetters::set_has_java_generic_services(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &java_generic_services_))); } else { goto handle_unusual; @@ -9018,10 +9029,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool py_generic_services = 18 [default = false]; case 18: { - if (static_cast< ::google::protobuf::uint8>(tag) == (144 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (144 & 0xFF)) { HasBitSetters::set_has_py_generic_services(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &py_generic_services_))); } else { goto handle_unusual; @@ -9031,10 +9042,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; case 20: { - if (static_cast< ::google::protobuf::uint8>(tag) == (160 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (160 & 0xFF)) { HasBitSetters::set_has_java_generate_equals_and_hash(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &java_generate_equals_and_hash_))); } else { goto handle_unusual; @@ -9044,10 +9055,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool deprecated = 23 [default = false]; case 23: { - if (static_cast< ::google::protobuf::uint8>(tag) == (184 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (184 & 0xFF)) { HasBitSetters::set_has_deprecated(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &deprecated_))); } else { goto handle_unusual; @@ -9057,10 +9068,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool java_string_check_utf8 = 27 [default = false]; case 27: { - if (static_cast< ::google::protobuf::uint8>(tag) == (216 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (216 & 0xFF)) { HasBitSetters::set_has_java_string_check_utf8(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &java_string_check_utf8_))); } else { goto handle_unusual; @@ -9070,10 +9081,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool cc_enable_arenas = 31 [default = false]; case 31: { - if (static_cast< ::google::protobuf::uint8>(tag) == (248 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (248 & 0xFF)) { HasBitSetters::set_has_cc_enable_arenas(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &cc_enable_arenas_))); } else { goto handle_unusual; @@ -9083,12 +9094,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string objc_class_prefix = 36; case 36: { - if (static_cast< ::google::protobuf::uint8>(tag) == (290 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (290 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_objc_class_prefix())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.objc_class_prefix"); } else { goto handle_unusual; @@ -9098,12 +9109,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string csharp_namespace = 37; case 37: { - if (static_cast< ::google::protobuf::uint8>(tag) == (298 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (298 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_csharp_namespace())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.csharp_namespace"); } else { goto handle_unusual; @@ -9113,12 +9124,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string swift_prefix = 39; case 39: { - if (static_cast< ::google::protobuf::uint8>(tag) == (314 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (314 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_swift_prefix())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->swift_prefix().data(), static_cast(this->swift_prefix().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.swift_prefix"); } else { goto handle_unusual; @@ -9128,12 +9139,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string php_class_prefix = 40; case 40: { - if (static_cast< ::google::protobuf::uint8>(tag) == (322 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (322 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_php_class_prefix())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.php_class_prefix"); } else { goto handle_unusual; @@ -9143,12 +9154,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string php_namespace = 41; case 41: { - if (static_cast< ::google::protobuf::uint8>(tag) == (330 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (330 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_php_namespace())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_namespace().data(), static_cast(this->php_namespace().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.php_namespace"); } else { goto handle_unusual; @@ -9158,10 +9169,10 @@ bool FileOptions::MergePartialFromCodedStream( // optional bool php_generic_services = 42 [default = false]; case 42: { - if (static_cast< ::google::protobuf::uint8>(tag) == (336 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (336 & 0xFF)) { HasBitSetters::set_has_php_generic_services(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &php_generic_services_))); } else { goto handle_unusual; @@ -9171,12 +9182,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string php_metadata_namespace = 44; case 44: { - if (static_cast< ::google::protobuf::uint8>(tag) == (354 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (354 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_php_metadata_namespace())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_metadata_namespace().data(), static_cast(this->php_metadata_namespace().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.php_metadata_namespace"); } else { goto handle_unusual; @@ -9186,12 +9197,12 @@ bool FileOptions::MergePartialFromCodedStream( // optional string ruby_package = 45; case 45: { - if (static_cast< ::google::protobuf::uint8>(tag) == (362 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (362 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_ruby_package())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->ruby_package().data(), static_cast(this->ruby_package().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.FileOptions.ruby_package"); } else { goto handle_unusual; @@ -9201,8 +9212,8 @@ bool FileOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -9221,7 +9232,7 @@ bool FileOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -9238,167 +9249,167 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void FileOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.FileOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string java_package = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->java_package().data(), static_cast(this->java_package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_package"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->java_package(), output); } // optional string java_outer_classname = 8; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_outer_classname"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 8, this->java_outer_classname(), output); } // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; if (cached_has_bits & 0x00080000u) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 9, this->optimize_for(), output); } // optional bool java_multiple_files = 10 [default = false]; if (cached_has_bits & 0x00000400u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(10, this->java_multiple_files(), output); } // optional string go_package = 11; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->go_package().data(), static_cast(this->go_package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.go_package"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 11, this->go_package(), output); } // optional bool cc_generic_services = 16 [default = false]; if (cached_has_bits & 0x00002000u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(16, this->cc_generic_services(), output); } // optional bool java_generic_services = 17 [default = false]; if (cached_has_bits & 0x00004000u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(17, this->java_generic_services(), output); } // optional bool py_generic_services = 18 [default = false]; if (cached_has_bits & 0x00008000u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(18, this->py_generic_services(), output); } // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; if (cached_has_bits & 0x00000800u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(20, this->java_generate_equals_and_hash(), output); } // optional bool deprecated = 23 [default = false]; if (cached_has_bits & 0x00020000u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->deprecated(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(23, this->deprecated(), output); } // optional bool java_string_check_utf8 = 27 [default = false]; if (cached_has_bits & 0x00001000u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(27, this->java_string_check_utf8(), output); } // optional bool cc_enable_arenas = 31 [default = false]; if (cached_has_bits & 0x00040000u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(31, this->cc_enable_arenas(), output); } // optional string objc_class_prefix = 36; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.objc_class_prefix"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 36, this->objc_class_prefix(), output); } // optional string csharp_namespace = 37; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.csharp_namespace"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 37, this->csharp_namespace(), output); } // optional string swift_prefix = 39; if (cached_has_bits & 0x00000020u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->swift_prefix().data(), static_cast(this->swift_prefix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.swift_prefix"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 39, this->swift_prefix(), output); } // optional string php_class_prefix = 40; if (cached_has_bits & 0x00000040u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_class_prefix"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 40, this->php_class_prefix(), output); } // optional string php_namespace = 41; if (cached_has_bits & 0x00000080u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_namespace().data(), static_cast(this->php_namespace().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_namespace"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 41, this->php_namespace(), output); } // optional bool php_generic_services = 42 [default = false]; if (cached_has_bits & 0x00010000u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(42, this->php_generic_services(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(42, this->php_generic_services(), output); } // optional string php_metadata_namespace = 44; if (cached_has_bits & 0x00000100u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_metadata_namespace().data(), static_cast(this->php_metadata_namespace().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_metadata_namespace"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 44, this->php_metadata_namespace(), output); } // optional string ruby_package = 45; if (cached_has_bits & 0x00000200u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->ruby_package().data(), static_cast(this->ruby_package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.ruby_package"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 45, this->ruby_package(), output); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -9408,184 +9419,184 @@ void FileOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FileOptions) } -::google::protobuf::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FileOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional string java_package = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->java_package().data(), static_cast(this->java_package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_package"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->java_package(), target); } // optional string java_outer_classname = 8; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->java_outer_classname().data(), static_cast(this->java_outer_classname().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.java_outer_classname"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 8, this->java_outer_classname(), target); } // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; if (cached_has_bits & 0x00080000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 9, this->optimize_for(), target); } // optional bool java_multiple_files = 10 [default = false]; if (cached_has_bits & 0x00000400u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->java_multiple_files(), target); } // optional string go_package = 11; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->go_package().data(), static_cast(this->go_package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.go_package"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 11, this->go_package(), target); } // optional bool cc_generic_services = 16 [default = false]; if (cached_has_bits & 0x00002000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->cc_generic_services(), target); } // optional bool java_generic_services = 17 [default = false]; if (cached_has_bits & 0x00004000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->java_generic_services(), target); } // optional bool py_generic_services = 18 [default = false]; if (cached_has_bits & 0x00008000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->py_generic_services(), target); } // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; if (cached_has_bits & 0x00000800u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->java_generate_equals_and_hash(), target); } // optional bool deprecated = 23 [default = false]; if (cached_has_bits & 0x00020000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->deprecated(), target); } // optional bool java_string_check_utf8 = 27 [default = false]; if (cached_has_bits & 0x00001000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(27, this->java_string_check_utf8(), target); } // optional bool cc_enable_arenas = 31 [default = false]; if (cached_has_bits & 0x00040000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(31, this->cc_enable_arenas(), target); } // optional string objc_class_prefix = 36; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->objc_class_prefix().data(), static_cast(this->objc_class_prefix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.objc_class_prefix"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 36, this->objc_class_prefix(), target); } // optional string csharp_namespace = 37; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->csharp_namespace().data(), static_cast(this->csharp_namespace().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.csharp_namespace"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 37, this->csharp_namespace(), target); } // optional string swift_prefix = 39; if (cached_has_bits & 0x00000020u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->swift_prefix().data(), static_cast(this->swift_prefix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.swift_prefix"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 39, this->swift_prefix(), target); } // optional string php_class_prefix = 40; if (cached_has_bits & 0x00000040u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_class_prefix().data(), static_cast(this->php_class_prefix().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_class_prefix"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 40, this->php_class_prefix(), target); } // optional string php_namespace = 41; if (cached_has_bits & 0x00000080u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_namespace().data(), static_cast(this->php_namespace().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_namespace"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 41, this->php_namespace(), target); } // optional bool php_generic_services = 42 [default = false]; if (cached_has_bits & 0x00010000u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(42, this->php_generic_services(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->php_generic_services(), target); } // optional string php_metadata_namespace = 44; if (cached_has_bits & 0x00000100u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->php_metadata_namespace().data(), static_cast(this->php_metadata_namespace().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.php_metadata_namespace"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 44, this->php_metadata_namespace(), target); } // optional string ruby_package = 45; if (cached_has_bits & 0x00000200u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->ruby_package().data(), static_cast(this->ruby_package().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.FileOptions.ruby_package"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 45, this->ruby_package(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -9595,7 +9606,7 @@ void FileOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions) @@ -9610,10 +9621,10 @@ size_t FileOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -9623,7 +9634,7 @@ size_t FileOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } @@ -9633,56 +9644,56 @@ size_t FileOptions::ByteSizeLong() const { // optional string java_package = 1; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->java_package()); } // optional string java_outer_classname = 8; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->java_outer_classname()); } // optional string go_package = 11; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->go_package()); } // optional string objc_class_prefix = 36; if (cached_has_bits & 0x00000008u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->objc_class_prefix()); } // optional string csharp_namespace = 37; if (cached_has_bits & 0x00000010u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->csharp_namespace()); } // optional string swift_prefix = 39; if (cached_has_bits & 0x00000020u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->swift_prefix()); } // optional string php_class_prefix = 40; if (cached_has_bits & 0x00000040u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->php_class_prefix()); } // optional string php_namespace = 41; if (cached_has_bits & 0x00000080u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->php_namespace()); } @@ -9691,14 +9702,14 @@ size_t FileOptions::ByteSizeLong() const { // optional string php_metadata_namespace = 44; if (cached_has_bits & 0x00000100u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->php_metadata_namespace()); } // optional string ruby_package = 45; if (cached_has_bits & 0x00000200u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->ruby_package()); } @@ -9752,24 +9763,24 @@ size_t FileOptions::ByteSizeLong() const { // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; if (cached_has_bits & 0x00080000u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->optimize_for()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->optimize_for()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void FileOptions::MergeFrom(const ::google::protobuf::Message& from) { +void FileOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FileOptions) GOOGLE_DCHECK_NE(&from, this); const FileOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FileOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FileOptions) MergeFrom(*source); @@ -9781,7 +9792,7 @@ void FileOptions::MergeFrom(const FileOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); @@ -9856,7 +9867,7 @@ void FileOptions::MergeFrom(const FileOptions& from) { } } -void FileOptions::CopyFrom(const ::google::protobuf::Message& from) { +void FileOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FileOptions) if (&from == this) return; Clear(); @@ -9875,7 +9886,7 @@ bool FileOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -9904,25 +9915,25 @@ void FileOptions::InternalSwap(FileOptions* other) { _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); - java_package_.Swap(&other->java_package_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + java_package_.Swap(&other->java_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - java_outer_classname_.Swap(&other->java_outer_classname_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + java_outer_classname_.Swap(&other->java_outer_classname_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - go_package_.Swap(&other->go_package_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + go_package_.Swap(&other->go_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - objc_class_prefix_.Swap(&other->objc_class_prefix_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + objc_class_prefix_.Swap(&other->objc_class_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - csharp_namespace_.Swap(&other->csharp_namespace_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + csharp_namespace_.Swap(&other->csharp_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - swift_prefix_.Swap(&other->swift_prefix_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + swift_prefix_.Swap(&other->swift_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - php_class_prefix_.Swap(&other->php_class_prefix_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + php_class_prefix_.Swap(&other->php_class_prefix_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - php_namespace_.Swap(&other->php_namespace_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + php_namespace_.Swap(&other->php_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - php_metadata_namespace_.Swap(&other->php_metadata_namespace_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + php_metadata_namespace_.Swap(&other->php_metadata_namespace_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - ruby_package_.Swap(&other->ruby_package_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ruby_package_.Swap(&other->ruby_package_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(java_multiple_files_, other->java_multiple_files_); swap(java_generate_equals_and_hash_, other->java_generate_equals_and_hash_); @@ -9936,8 +9947,8 @@ void FileOptions::InternalSwap(FileOptions* other) { swap(optimize_for_, other->optimize_for_); } -::google::protobuf::Metadata FileOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata FileOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -9971,12 +9982,12 @@ const int MessageOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MessageOptions::MessageOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.MessageOptions) } -MessageOptions::MessageOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +MessageOptions::MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -9985,7 +9996,7 @@ MessageOptions::MessageOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.MessageOptions) } MessageOptions::MessageOptions(const MessageOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -9998,7 +10009,7 @@ MessageOptions::MessageOptions(const MessageOptions& from) } void MessageOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto.base); ::memset(&message_set_wire_format_, 0, static_cast( reinterpret_cast(&map_entry_) - @@ -10018,20 +10029,20 @@ void MessageOptions::ArenaDtor(void* object) { MessageOptions* _this = reinterpret_cast< MessageOptions* >(object); (void)_this; } -void MessageOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void MessageOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MessageOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const MessageOptions& MessageOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MessageOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void MessageOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.MessageOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -10045,48 +10056,49 @@ void MessageOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* MessageOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* MessageOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional bool message_set_wire_format = 1 [default = false]; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_message_set_wire_format(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_message_set_wire_format(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool no_standard_descriptor_accessor = 2 [default = false]; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_no_standard_descriptor_accessor(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_no_standard_descriptor_accessor(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool deprecated = 3 [default = false]; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - set_deprecated(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 24) goto handle_unusual; + set_deprecated(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool map_entry = 7; case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; - set_map_entry(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 56) goto handle_unusual; + set_map_entry(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -10112,21 +10124,21 @@ const char* MessageOptions::_InternalParse(const char* ptr, ::google::protobuf:: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool MessageOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.MessageOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional bool message_set_wire_format = 1 [default = false]; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { HasBitSetters::set_has_message_set_wire_format(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &message_set_wire_format_))); } else { goto handle_unusual; @@ -10136,10 +10148,10 @@ bool MessageOptions::MergePartialFromCodedStream( // optional bool no_standard_descriptor_accessor = 2 [default = false]; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_no_standard_descriptor_accessor(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &no_standard_descriptor_accessor_))); } else { goto handle_unusual; @@ -10149,10 +10161,10 @@ bool MessageOptions::MergePartialFromCodedStream( // optional bool deprecated = 3 [default = false]; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { HasBitSetters::set_has_deprecated(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &deprecated_))); } else { goto handle_unusual; @@ -10162,10 +10174,10 @@ bool MessageOptions::MergePartialFromCodedStream( // optional bool map_entry = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { HasBitSetters::set_has_map_entry(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &map_entry_))); } else { goto handle_unusual; @@ -10175,8 +10187,8 @@ bool MessageOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -10195,7 +10207,7 @@ bool MessageOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -10212,36 +10224,36 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void MessageOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.MessageOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool message_set_wire_format = 1 [default = false]; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->message_set_wire_format(), output); } // optional bool no_standard_descriptor_accessor = 2 [default = false]; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->no_standard_descriptor_accessor(), output); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); } // optional bool map_entry = 7; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->map_entry(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(7, this->map_entry(), output); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -10251,43 +10263,43 @@ void MessageOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.MessageOptions) } -::google::protobuf::uint8* MessageOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* MessageOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MessageOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool message_set_wire_format = 1 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->message_set_wire_format(), target); } // optional bool no_standard_descriptor_accessor = 2 [default = false]; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->no_standard_descriptor_accessor(), target); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); } // optional bool map_entry = 7; if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->map_entry(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -10297,7 +10309,7 @@ void MessageOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MessageOptions) @@ -10312,10 +10324,10 @@ size_t MessageOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -10325,7 +10337,7 @@ size_t MessageOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } @@ -10353,20 +10365,20 @@ size_t MessageOptions::ByteSizeLong() const { } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void MessageOptions::MergeFrom(const ::google::protobuf::Message& from) { +void MessageOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.MessageOptions) GOOGLE_DCHECK_NE(&from, this); const MessageOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.MessageOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.MessageOptions) MergeFrom(*source); @@ -10378,7 +10390,7 @@ void MessageOptions::MergeFrom(const MessageOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); @@ -10400,7 +10412,7 @@ void MessageOptions::MergeFrom(const MessageOptions& from) { } } -void MessageOptions::CopyFrom(const ::google::protobuf::Message& from) { +void MessageOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.MessageOptions) if (&from == this) return; Clear(); @@ -10419,7 +10431,7 @@ bool MessageOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -10454,8 +10466,8 @@ void MessageOptions::InternalSwap(MessageOptions* other) { swap(map_entry_, other->map_entry_); } -::google::protobuf::Metadata MessageOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata MessageOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -10497,12 +10509,12 @@ const int FieldOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 FieldOptions::FieldOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.FieldOptions) } -FieldOptions::FieldOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +FieldOptions::FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -10511,7 +10523,7 @@ FieldOptions::FieldOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldOptions) } FieldOptions::FieldOptions(const FieldOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -10524,7 +10536,7 @@ FieldOptions::FieldOptions(const FieldOptions& from) } void FieldOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto.base); ::memset(&ctype_, 0, static_cast( reinterpret_cast(&jstype_) - @@ -10544,20 +10556,20 @@ void FieldOptions::ArenaDtor(void* object) { FieldOptions* _this = reinterpret_cast< FieldOptions* >(object); (void)_this; } -void FieldOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void FieldOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void FieldOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const FieldOptions& FieldOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FieldOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void FieldOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -10574,72 +10586,73 @@ void FieldOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FieldOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* FieldOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (!::google::protobuf::FieldOptions_CType_IsValid(val)) { - ::google::protobuf::internal::WriteVarint(1, val, mutable_unknown_fields()); + if (!PROTOBUF_NAMESPACE_ID::FieldOptions_CType_IsValid(val)) { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); break; } - set_ctype(static_cast<::google::protobuf::FieldOptions_CType>(val)); + set_ctype(static_cast(val)); break; } // optional bool packed = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_packed(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_packed(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool deprecated = 3 [default = false]; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - set_deprecated(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 24) goto handle_unusual; + set_deprecated(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool lazy = 5 [default = false]; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; - set_lazy(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 40) goto handle_unusual; + set_lazy(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 48) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (!::google::protobuf::FieldOptions_JSType_IsValid(val)) { - ::google::protobuf::internal::WriteVarint(6, val, mutable_unknown_fields()); + if (!PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(val)) { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields()); break; } - set_jstype(static_cast<::google::protobuf::FieldOptions_JSType>(val)); + set_jstype(static_cast(val)); break; } // optional bool weak = 10 [default = false]; case 10: { - if (static_cast<::google::protobuf::uint8>(tag) != 80) goto handle_unusual; - set_weak(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 80) goto handle_unusual; + set_weak(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -10665,27 +10678,27 @@ const char* FieldOptions::_InternalParse(const char* ptr, ::google::protobuf::in } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool FieldOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.FieldOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - if (::google::protobuf::FieldOptions_CType_IsValid(value)) { - set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value)); + if (PROTOBUF_NAMESPACE_ID::FieldOptions_CType_IsValid(value)) { + set_ctype(static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_CType >(value)); } else { mutable_unknown_fields()->AddVarint( - 1, static_cast<::google::protobuf::uint64>(value)); + 1, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); } } else { goto handle_unusual; @@ -10695,10 +10708,10 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool packed = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_packed(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &packed_))); } else { goto handle_unusual; @@ -10708,10 +10721,10 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool deprecated = 3 [default = false]; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { HasBitSetters::set_has_deprecated(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &deprecated_))); } else { goto handle_unusual; @@ -10721,10 +10734,10 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool lazy = 5 [default = false]; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { HasBitSetters::set_has_lazy(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &lazy_))); } else { goto handle_unusual; @@ -10734,16 +10747,16 @@ bool FieldOptions::MergePartialFromCodedStream( // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - if (::google::protobuf::FieldOptions_JSType_IsValid(value)) { - set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value)); + if (PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(value)) { + set_jstype(static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_JSType >(value)); } else { mutable_unknown_fields()->AddVarint( - 6, static_cast<::google::protobuf::uint64>(value)); + 6, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); } } else { goto handle_unusual; @@ -10753,10 +10766,10 @@ bool FieldOptions::MergePartialFromCodedStream( // optional bool weak = 10 [default = false]; case 10: { - if (static_cast< ::google::protobuf::uint8>(tag) == (80 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { HasBitSetters::set_has_weak(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &weak_))); } else { goto handle_unusual; @@ -10766,8 +10779,8 @@ bool FieldOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -10786,7 +10799,7 @@ bool FieldOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -10803,48 +10816,48 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void FieldOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.FieldOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 1, this->ctype(), output); } // optional bool packed = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->packed(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->packed(), output); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); } // optional bool lazy = 5 [default = false]; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->lazy(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(5, this->lazy(), output); } // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; if (cached_has_bits & 0x00000020u) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 6, this->jstype(), output); } // optional bool weak = 10 [default = false]; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->weak(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(10, this->weak(), output); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -10854,55 +10867,55 @@ void FieldOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FieldOptions) } -::google::protobuf::uint8* FieldOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FieldOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 1, this->ctype(), target); } // optional bool packed = 2; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->packed(), target); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); } // optional bool lazy = 5 [default = false]; if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->lazy(), target); } // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; if (cached_has_bits & 0x00000020u) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 6, this->jstype(), target); } // optional bool weak = 10 [default = false]; if (cached_has_bits & 0x00000010u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->weak(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -10912,7 +10925,7 @@ void FieldOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions) @@ -10927,10 +10940,10 @@ size_t FieldOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -10940,7 +10953,7 @@ size_t FieldOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } @@ -10950,7 +10963,7 @@ size_t FieldOptions::ByteSizeLong() const { // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->ctype()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->ctype()); } // optional bool packed = 2; @@ -10976,24 +10989,24 @@ size_t FieldOptions::ByteSizeLong() const { // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; if (cached_has_bits & 0x00000020u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->jstype()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->jstype()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void FieldOptions::MergeFrom(const ::google::protobuf::Message& from) { +void FieldOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldOptions) GOOGLE_DCHECK_NE(&from, this); const FieldOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldOptions) MergeFrom(*source); @@ -11005,7 +11018,7 @@ void FieldOptions::MergeFrom(const FieldOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); @@ -11033,7 +11046,7 @@ void FieldOptions::MergeFrom(const FieldOptions& from) { } } -void FieldOptions::CopyFrom(const ::google::protobuf::Message& from) { +void FieldOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldOptions) if (&from == this) return; Clear(); @@ -11052,7 +11065,7 @@ bool FieldOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -11089,8 +11102,8 @@ void FieldOptions::InternalSwap(FieldOptions* other) { swap(jstype_, other->jstype_); } -::google::protobuf::Metadata FieldOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata FieldOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -11108,12 +11121,12 @@ const int OneofOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 OneofOptions::OneofOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.OneofOptions) } -OneofOptions::OneofOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +OneofOptions::OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -11122,7 +11135,7 @@ OneofOptions::OneofOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.OneofOptions) } OneofOptions::OneofOptions(const OneofOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -11132,7 +11145,7 @@ OneofOptions::OneofOptions(const OneofOptions& from) } void OneofOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto.base); } @@ -11149,20 +11162,20 @@ void OneofOptions::ArenaDtor(void* object) { OneofOptions* _this = reinterpret_cast< OneofOptions* >(object); (void)_this; } -void OneofOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void OneofOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void OneofOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const OneofOptions& OneofOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_OneofOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void OneofOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.OneofOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11173,20 +11186,21 @@ void OneofOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* OneofOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* OneofOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -11212,19 +11226,19 @@ const char* OneofOptions::_InternalParse(const char* ptr, ::google::protobuf::in } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool OneofOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.OneofOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -11243,7 +11257,7 @@ bool OneofOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -11260,15 +11274,15 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void OneofOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.OneofOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -11278,22 +11292,22 @@ void OneofOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.OneofOptions) } -::google::protobuf::uint8* OneofOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* OneofOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.OneofOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -11303,7 +11317,7 @@ void OneofOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.OneofOptions) @@ -11318,10 +11332,10 @@ size_t OneofOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11331,25 +11345,25 @@ size_t OneofOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void OneofOptions::MergeFrom(const ::google::protobuf::Message& from) { +void OneofOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.OneofOptions) GOOGLE_DCHECK_NE(&from, this); const OneofOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.OneofOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.OneofOptions) MergeFrom(*source); @@ -11361,13 +11375,13 @@ void OneofOptions::MergeFrom(const OneofOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); } -void OneofOptions::CopyFrom(const ::google::protobuf::Message& from) { +void OneofOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.OneofOptions) if (&from == this) return; Clear(); @@ -11386,7 +11400,7 @@ bool OneofOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -11417,8 +11431,8 @@ void OneofOptions::InternalSwap(OneofOptions* other) { CastToBase(&uninterpreted_option_)->InternalSwap(CastToBase(&other->uninterpreted_option_)); } -::google::protobuf::Metadata OneofOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata OneofOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -11444,12 +11458,12 @@ const int EnumOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 EnumOptions::EnumOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.EnumOptions) } -EnumOptions::EnumOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +EnumOptions::EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -11458,7 +11472,7 @@ EnumOptions::EnumOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumOptions) } EnumOptions::EnumOptions(const EnumOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -11471,7 +11485,7 @@ EnumOptions::EnumOptions(const EnumOptions& from) } void EnumOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto.base); ::memset(&allow_alias_, 0, static_cast( reinterpret_cast(&deprecated_) - @@ -11491,20 +11505,20 @@ void EnumOptions::ArenaDtor(void* object) { EnumOptions* _this = reinterpret_cast< EnumOptions* >(object); (void)_this; } -void EnumOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void EnumOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void EnumOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const EnumOptions& EnumOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EnumOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void EnumOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11518,34 +11532,35 @@ void EnumOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* EnumOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* EnumOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional bool allow_alias = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_allow_alias(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_allow_alias(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional bool deprecated = 3 [default = false]; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - set_deprecated(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 24) goto handle_unusual; + set_deprecated(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -11571,21 +11586,21 @@ const char* EnumOptions::_InternalParse(const char* ptr, ::google::protobuf::int } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool EnumOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.EnumOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional bool allow_alias = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_allow_alias(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &allow_alias_))); } else { goto handle_unusual; @@ -11595,10 +11610,10 @@ bool EnumOptions::MergePartialFromCodedStream( // optional bool deprecated = 3 [default = false]; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { HasBitSetters::set_has_deprecated(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &deprecated_))); } else { goto handle_unusual; @@ -11608,8 +11623,8 @@ bool EnumOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -11628,7 +11643,7 @@ bool EnumOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -11645,26 +11660,26 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void EnumOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.EnumOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool allow_alias = 2; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->allow_alias(), output); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->deprecated(), output); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -11674,33 +11689,33 @@ void EnumOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumOptions) } -::google::protobuf::uint8* EnumOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool allow_alias = 2; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->allow_alias(), target); } // optional bool deprecated = 3 [default = false]; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->deprecated(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -11710,7 +11725,7 @@ void EnumOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumOptions) @@ -11725,10 +11740,10 @@ size_t EnumOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11738,7 +11753,7 @@ size_t EnumOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } @@ -11756,20 +11771,20 @@ size_t EnumOptions::ByteSizeLong() const { } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void EnumOptions::MergeFrom(const ::google::protobuf::Message& from) { +void EnumOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumOptions) GOOGLE_DCHECK_NE(&from, this); const EnumOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumOptions) MergeFrom(*source); @@ -11781,7 +11796,7 @@ void EnumOptions::MergeFrom(const EnumOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); @@ -11797,7 +11812,7 @@ void EnumOptions::MergeFrom(const EnumOptions& from) { } } -void EnumOptions::CopyFrom(const ::google::protobuf::Message& from) { +void EnumOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumOptions) if (&from == this) return; Clear(); @@ -11816,7 +11831,7 @@ bool EnumOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -11849,8 +11864,8 @@ void EnumOptions::InternalSwap(EnumOptions* other) { swap(deprecated_, other->deprecated_); } -::google::protobuf::Metadata EnumOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata EnumOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -11872,12 +11887,12 @@ const int EnumValueOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 EnumValueOptions::EnumValueOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.EnumValueOptions) } -EnumValueOptions::EnumValueOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +EnumValueOptions::EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -11886,7 +11901,7 @@ EnumValueOptions::EnumValueOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.EnumValueOptions) } EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -11897,7 +11912,7 @@ EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) } void EnumValueOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto.base); deprecated_ = false; } @@ -11915,20 +11930,20 @@ void EnumValueOptions::ArenaDtor(void* object) { EnumValueOptions* _this = reinterpret_cast< EnumValueOptions* >(object); (void)_this; } -void EnumValueOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void EnumValueOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void EnumValueOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const EnumValueOptions& EnumValueOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EnumValueOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void EnumValueOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.EnumValueOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11940,27 +11955,28 @@ void EnumValueOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* EnumValueOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* EnumValueOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional bool deprecated = 1 [default = false]; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_deprecated(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_deprecated(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -11986,21 +12002,21 @@ const char* EnumValueOptions::_InternalParse(const char* ptr, ::google::protobuf } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool EnumValueOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.EnumValueOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional bool deprecated = 1 [default = false]; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { HasBitSetters::set_has_deprecated(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &deprecated_))); } else { goto handle_unusual; @@ -12010,8 +12026,8 @@ bool EnumValueOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -12030,7 +12046,7 @@ bool EnumValueOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -12047,21 +12063,21 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void EnumValueOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.EnumValueOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool deprecated = 1 [default = false]; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->deprecated(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->deprecated(), output); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -12071,28 +12087,28 @@ void EnumValueOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.EnumValueOptions) } -::google::protobuf::uint8* EnumValueOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* EnumValueOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.EnumValueOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool deprecated = 1 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->deprecated(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -12102,7 +12118,7 @@ void EnumValueOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.EnumValueOptions) @@ -12117,10 +12133,10 @@ size_t EnumValueOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -12130,7 +12146,7 @@ size_t EnumValueOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } @@ -12141,20 +12157,20 @@ size_t EnumValueOptions::ByteSizeLong() const { total_size += 1 + 1; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void EnumValueOptions::MergeFrom(const ::google::protobuf::Message& from) { +void EnumValueOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.EnumValueOptions) GOOGLE_DCHECK_NE(&from, this); const EnumValueOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.EnumValueOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.EnumValueOptions) MergeFrom(*source); @@ -12166,7 +12182,7 @@ void EnumValueOptions::MergeFrom(const EnumValueOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); @@ -12175,7 +12191,7 @@ void EnumValueOptions::MergeFrom(const EnumValueOptions& from) { } } -void EnumValueOptions::CopyFrom(const ::google::protobuf::Message& from) { +void EnumValueOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.EnumValueOptions) if (&from == this) return; Clear(); @@ -12194,7 +12210,7 @@ bool EnumValueOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -12226,8 +12242,8 @@ void EnumValueOptions::InternalSwap(EnumValueOptions* other) { swap(deprecated_, other->deprecated_); } -::google::protobuf::Metadata EnumValueOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata EnumValueOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -12249,12 +12265,12 @@ const int ServiceOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ServiceOptions::ServiceOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.ServiceOptions) } -ServiceOptions::ServiceOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +ServiceOptions::ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -12263,7 +12279,7 @@ ServiceOptions::ServiceOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.ServiceOptions) } ServiceOptions::ServiceOptions(const ServiceOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -12274,7 +12290,7 @@ ServiceOptions::ServiceOptions(const ServiceOptions& from) } void ServiceOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto.base); deprecated_ = false; } @@ -12292,20 +12308,20 @@ void ServiceOptions::ArenaDtor(void* object) { ServiceOptions* _this = reinterpret_cast< ServiceOptions* >(object); (void)_this; } -void ServiceOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void ServiceOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void ServiceOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const ServiceOptions& ServiceOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ServiceOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void ServiceOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -12317,27 +12333,28 @@ void ServiceOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ServiceOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* ServiceOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional bool deprecated = 33 [default = false]; case 33: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_deprecated(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_deprecated(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -12363,21 +12380,21 @@ const char* ServiceOptions::_InternalParse(const char* ptr, ::google::protobuf:: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool ServiceOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.ServiceOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional bool deprecated = 33 [default = false]; case 33: { - if (static_cast< ::google::protobuf::uint8>(tag) == (264 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (264 & 0xFF)) { HasBitSetters::set_has_deprecated(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &deprecated_))); } else { goto handle_unusual; @@ -12387,8 +12404,8 @@ bool ServiceOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -12407,7 +12424,7 @@ bool ServiceOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -12424,21 +12441,21 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void ServiceOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.ServiceOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool deprecated = 33 [default = false]; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -12448,28 +12465,28 @@ void ServiceOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.ServiceOptions) } -::google::protobuf::uint8* ServiceOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ServiceOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool deprecated = 33 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -12479,7 +12496,7 @@ void ServiceOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceOptions) @@ -12494,10 +12511,10 @@ size_t ServiceOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -12507,7 +12524,7 @@ size_t ServiceOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } @@ -12518,20 +12535,20 @@ size_t ServiceOptions::ByteSizeLong() const { total_size += 2 + 1; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ServiceOptions::MergeFrom(const ::google::protobuf::Message& from) { +void ServiceOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ServiceOptions) GOOGLE_DCHECK_NE(&from, this); const ServiceOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ServiceOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.ServiceOptions) MergeFrom(*source); @@ -12543,7 +12560,7 @@ void ServiceOptions::MergeFrom(const ServiceOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); @@ -12552,7 +12569,7 @@ void ServiceOptions::MergeFrom(const ServiceOptions& from) { } } -void ServiceOptions::CopyFrom(const ::google::protobuf::Message& from) { +void ServiceOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ServiceOptions) if (&from == this) return; Clear(); @@ -12571,7 +12588,7 @@ bool ServiceOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -12603,8 +12620,8 @@ void ServiceOptions::InternalSwap(ServiceOptions* other) { swap(deprecated_, other->deprecated_); } -::google::protobuf::Metadata ServiceOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata ServiceOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -12630,12 +12647,12 @@ const int MethodOptions::kUninterpretedOptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MethodOptions::MethodOptions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.MethodOptions) } -MethodOptions::MethodOptions(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +MethodOptions::MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _extensions_(arena), _internal_metadata_(arena), uninterpreted_option_(arena) { @@ -12644,7 +12661,7 @@ MethodOptions::MethodOptions(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.MethodOptions) } MethodOptions::MethodOptions(const MethodOptions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), uninterpreted_option_(from.uninterpreted_option_) { @@ -12657,7 +12674,7 @@ MethodOptions::MethodOptions(const MethodOptions& from) } void MethodOptions::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto.base); ::memset(&deprecated_, 0, static_cast( reinterpret_cast(&idempotency_level_) - @@ -12677,20 +12694,20 @@ void MethodOptions::ArenaDtor(void* object) { MethodOptions* _this = reinterpret_cast< MethodOptions* >(object); (void)_this; } -void MethodOptions::RegisterArenaDtor(::google::protobuf::Arena*) { +void MethodOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void MethodOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const MethodOptions& MethodOptions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MethodOptions_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void MethodOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.MethodOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -12707,39 +12724,40 @@ void MethodOptions::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* MethodOptions::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* MethodOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // optional bool deprecated = 33 [default = false]; case 33: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_deprecated(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_deprecated(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; case 34: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (!::google::protobuf::MethodOptions_IdempotencyLevel_IsValid(val)) { - ::google::protobuf::internal::WriteVarint(34, val, mutable_unknown_fields()); + if (!PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(val)) { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(34, val, mutable_unknown_fields()); break; } - set_idempotency_level(static_cast<::google::protobuf::MethodOptions_IdempotencyLevel>(val)); + set_idempotency_level(static_cast(val)); break; } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; do { ptr = ctx->ParseMessage(add_uninterpreted_option(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 65535) == 16058 && (ptr += 2)); break; } default: { @@ -12765,21 +12783,21 @@ const char* MethodOptions::_InternalParse(const char* ptr, ::google::protobuf::i } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool MethodOptions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.MethodOptions) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional bool deprecated = 33 [default = false]; case 33: { - if (static_cast< ::google::protobuf::uint8>(tag) == (264 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (264 & 0xFF)) { HasBitSetters::set_has_deprecated(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &deprecated_))); } else { goto handle_unusual; @@ -12789,16 +12807,16 @@ bool MethodOptions::MergePartialFromCodedStream( // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; case 34: { - if (static_cast< ::google::protobuf::uint8>(tag) == (272 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (272 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - if (::google::protobuf::MethodOptions_IdempotencyLevel_IsValid(value)) { - set_idempotency_level(static_cast< ::google::protobuf::MethodOptions_IdempotencyLevel >(value)); + if (PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(value)) { + set_idempotency_level(static_cast< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel >(value)); } else { mutable_unknown_fields()->AddVarint( - 34, static_cast<::google::protobuf::uint64>(value)); + 34, static_cast<::PROTOBUF_NAMESPACE_ID::uint64>(value)); } } else { goto handle_unusual; @@ -12808,8 +12826,8 @@ bool MethodOptions::MergePartialFromCodedStream( // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: { - if (static_cast< ::google::protobuf::uint8>(tag) == (7994 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (7994 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_uninterpreted_option())); } else { goto handle_unusual; @@ -12828,7 +12846,7 @@ bool MethodOptions::MergePartialFromCodedStream( _internal_metadata_.mutable_unknown_fields())); continue; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -12845,27 +12863,27 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void MethodOptions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.MethodOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool deprecated = 33 [default = false]; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(33, this->deprecated(), output); } // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 34, this->idempotency_level(), output); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 999, this->uninterpreted_option(static_cast(i)), output); @@ -12875,34 +12893,34 @@ void MethodOptions::SerializeWithCachedSizes( _extensions_.SerializeWithCachedSizes(1000, 536870912, output); if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.MethodOptions) } -::google::protobuf::uint8* MethodOptions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* MethodOptions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // optional bool deprecated = 33 [default = false]; if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->deprecated(), target); } // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 34, this->idempotency_level(), target); } // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned int i = 0, n = static_cast(this->uninterpreted_option_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 999, this->uninterpreted_option(static_cast(i)), target); } @@ -12912,7 +12930,7 @@ void MethodOptions::SerializeWithCachedSizes( 1000, 536870912, target); if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions) @@ -12927,10 +12945,10 @@ size_t MethodOptions::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -12940,7 +12958,7 @@ size_t MethodOptions::ByteSizeLong() const { total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->uninterpreted_option(static_cast(i))); } } @@ -12955,24 +12973,24 @@ size_t MethodOptions::ByteSizeLong() const { // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; if (cached_has_bits & 0x00000002u) { total_size += 2 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->idempotency_level()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->idempotency_level()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void MethodOptions::MergeFrom(const ::google::protobuf::Message& from) { +void MethodOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.MethodOptions) GOOGLE_DCHECK_NE(&from, this); const MethodOptions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.MethodOptions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.MethodOptions) MergeFrom(*source); @@ -12984,7 +13002,7 @@ void MethodOptions::MergeFrom(const MethodOptions& from) { GOOGLE_DCHECK_NE(&from, this); _extensions_.MergeFrom(from._extensions_); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; uninterpreted_option_.MergeFrom(from.uninterpreted_option_); @@ -13000,7 +13018,7 @@ void MethodOptions::MergeFrom(const MethodOptions& from) { } } -void MethodOptions::CopyFrom(const ::google::protobuf::Message& from) { +void MethodOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.MethodOptions) if (&from == this) return; Clear(); @@ -13019,7 +13037,7 @@ bool MethodOptions::IsInitialized() const { return false; } - if (!::google::protobuf::internal::AllAreInitialized(this->uninterpreted_option())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->uninterpreted_option())) return false; return true; } @@ -13052,8 +13070,8 @@ void MethodOptions::InternalSwap(MethodOptions* other) { swap(idempotency_level_, other->idempotency_level_); } -::google::protobuf::Metadata MethodOptions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata MethodOptions::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -13078,25 +13096,25 @@ const int UninterpretedOption_NamePart::kIsExtensionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 UninterpretedOption_NamePart::UninterpretedOption_NamePart() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption.NamePart) } -UninterpretedOption_NamePart::UninterpretedOption_NamePart(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +UninterpretedOption_NamePart::UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption.NamePart) } UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_part_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_part_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_name_part()) { - name_part_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_part(), + name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_part(), GetArenaNoVirtual()); } is_extension_ = from.is_extension_; @@ -13104,9 +13122,9 @@ UninterpretedOption_NamePart::UninterpretedOption_NamePart(const UninterpretedOp } void UninterpretedOption_NamePart::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base); - name_part_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_part_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); is_extension_ = false; } @@ -13117,27 +13135,27 @@ UninterpretedOption_NamePart::~UninterpretedOption_NamePart() { void UninterpretedOption_NamePart::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - name_part_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_part_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void UninterpretedOption_NamePart::ArenaDtor(void* object) { UninterpretedOption_NamePart* _this = reinterpret_cast< UninterpretedOption_NamePart* >(object); (void)_this; } -void UninterpretedOption_NamePart::RegisterArenaDtor(::google::protobuf::Arena*) { +void UninterpretedOption_NamePart::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void UninterpretedOption_NamePart::SetCachedSize(int size) const { _cached_size_.Set(size); } const UninterpretedOption_NamePart& UninterpretedOption_NamePart::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UninterpretedOption_NamePart_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void UninterpretedOption_NamePart::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption.NamePart) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -13151,23 +13169,24 @@ void UninterpretedOption_NamePart::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // required string name_part = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_name_part(), ptr, ctx, "google.protobuf.UninterpretedOption.NamePart.name_part"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_name_part(), ptr, ctx, "google.protobuf.UninterpretedOption.NamePart.name_part"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // required bool is_extension = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_is_extension(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_is_extension(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -13188,23 +13207,23 @@ const char* UninterpretedOption_NamePart::_InternalParse(const char* ptr, ::goog } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool UninterpretedOption_NamePart::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption.NamePart) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // required string name_part = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_name_part())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name_part().data(), static_cast(this->name_part().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.UninterpretedOption.NamePart.name_part"); } else { goto handle_unusual; @@ -13214,10 +13233,10 @@ bool UninterpretedOption_NamePart::MergePartialFromCodedStream( // required bool is_extension = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { HasBitSetters::set_has_is_extension(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &is_extension_))); } else { goto handle_unusual; @@ -13230,7 +13249,7 @@ bool UninterpretedOption_NamePart::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -13247,59 +13266,59 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void UninterpretedOption_NamePart::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption.NamePart) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // required string name_part = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name_part().data(), static_cast(this->name_part().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.NamePart.name_part"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name_part(), output); } // required bool is_extension = 2; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_extension(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->is_extension(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption.NamePart) } -::google::protobuf::uint8* UninterpretedOption_NamePart::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption_NamePart::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _has_bits_[0]; // required string name_part = 1; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->name_part().data(), static_cast(this->name_part().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.NamePart.name_part"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->name_part(), target); } // required bool is_extension = 2; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->is_extension(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart) @@ -13313,7 +13332,7 @@ size_t UninterpretedOption_NamePart::RequiredFieldsByteSizeFallback() const { if (has_name_part()) { // required string name_part = 1; total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name_part()); } @@ -13330,13 +13349,13 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. // required string name_part = 1; total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->name_part()); // required bool is_extension = 2; @@ -13345,24 +13364,24 @@ size_t UninterpretedOption_NamePart::ByteSizeLong() const { } else { total_size += RequiredFieldsByteSizeFallback(); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void UninterpretedOption_NamePart::MergeFrom(const ::google::protobuf::Message& from) { +void UninterpretedOption_NamePart::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.UninterpretedOption.NamePart) GOOGLE_DCHECK_NE(&from, this); const UninterpretedOption_NamePart* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.UninterpretedOption.NamePart) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.UninterpretedOption.NamePart) MergeFrom(*source); @@ -13373,7 +13392,7 @@ void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption.NamePart) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = from._has_bits_[0]; @@ -13388,7 +13407,7 @@ void UninterpretedOption_NamePart::MergeFrom(const UninterpretedOption_NamePart& } } -void UninterpretedOption_NamePart::CopyFrom(const ::google::protobuf::Message& from) { +void UninterpretedOption_NamePart::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.UninterpretedOption.NamePart) if (&from == this) return; Clear(); @@ -13430,13 +13449,13 @@ void UninterpretedOption_NamePart::InternalSwap(UninterpretedOption_NamePart* ot using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); - name_part_.Swap(&other->name_part_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_part_.Swap(&other->name_part_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(is_extension_, other->is_extension_); } -::google::protobuf::Metadata UninterpretedOption_NamePart::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption_NamePart::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -13478,12 +13497,12 @@ const int UninterpretedOption::kAggregateValueFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 UninterpretedOption::UninterpretedOption() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.UninterpretedOption) } -UninterpretedOption::UninterpretedOption(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +UninterpretedOption::UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), name_(arena) { SharedCtor(); @@ -13491,24 +13510,24 @@ UninterpretedOption::UninterpretedOption(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.UninterpretedOption) } UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), name_(from.name_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_identifier_value()) { - identifier_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.identifier_value(), + identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.identifier_value(), GetArenaNoVirtual()); } - string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_string_value()) { - string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.string_value(), + string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.string_value(), GetArenaNoVirtual()); } - aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_aggregate_value()) { - aggregate_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.aggregate_value(), + aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.aggregate_value(), GetArenaNoVirtual()); } ::memcpy(&positive_int_value_, &from.positive_int_value_, @@ -13518,11 +13537,11 @@ UninterpretedOption::UninterpretedOption(const UninterpretedOption& from) } void UninterpretedOption::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base); - identifier_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - aggregate_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + identifier_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + aggregate_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&positive_int_value_, 0, static_cast( reinterpret_cast(&double_value_) - reinterpret_cast(&positive_int_value_)) + sizeof(double_value_)); @@ -13535,29 +13554,29 @@ UninterpretedOption::~UninterpretedOption() { void UninterpretedOption::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - identifier_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - aggregate_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + identifier_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + string_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + aggregate_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void UninterpretedOption::ArenaDtor(void* object) { UninterpretedOption* _this = reinterpret_cast< UninterpretedOption* >(object); (void)_this; } -void UninterpretedOption::RegisterArenaDtor(::google::protobuf::Arena*) { +void UninterpretedOption::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void UninterpretedOption::SetCachedSize(int size) const { _cached_size_.Set(size); } const UninterpretedOption& UninterpretedOption::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UninterpretedOption_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void UninterpretedOption::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.UninterpretedOption) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -13584,61 +13603,62 @@ void UninterpretedOption::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* UninterpretedOption::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* UninterpretedOption::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; do { ptr = ctx->ParseMessage(add_name(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 18 && (ptr += 1)); break; } // optional string identifier_value = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_identifier_value(), ptr, ctx, "google.protobuf.UninterpretedOption.identifier_value"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_identifier_value(), ptr, ctx, "google.protobuf.UninterpretedOption.identifier_value"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional uint64 positive_int_value = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - set_positive_int_value(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 32) goto handle_unusual; + set_positive_int_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int64 negative_int_value = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; - set_negative_int_value(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 40) goto handle_unusual; + set_negative_int_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional double double_value = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 49) goto handle_unusual; - set_double_value(::google::protobuf::internal::UnalignedLoad(ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 49) goto handle_unusual; + set_double_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); break; } // optional bytes string_value = 7; case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParser(mutable_string_value(), ptr, ctx); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 58) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_string_value(), ptr, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string aggregate_value = 8; case 8: { - if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_aggregate_value(), ptr, ctx, "google.protobuf.UninterpretedOption.aggregate_value"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 66) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_aggregate_value(), ptr, ctx, "google.protobuf.UninterpretedOption.aggregate_value"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -13659,19 +13679,19 @@ const char* UninterpretedOption::_InternalParse(const char* ptr, ::google::proto } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool UninterpretedOption::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.UninterpretedOption) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_name())); } else { goto handle_unusual; @@ -13681,12 +13701,12 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional string identifier_value = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_identifier_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->identifier_value().data(), static_cast(this->identifier_value().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.UninterpretedOption.identifier_value"); } else { goto handle_unusual; @@ -13696,10 +13716,10 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional uint64 positive_int_value = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { HasBitSetters::set_has_positive_int_value(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( input, &positive_int_value_))); } else { goto handle_unusual; @@ -13709,10 +13729,10 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional int64 negative_int_value = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { HasBitSetters::set_has_negative_int_value(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( input, &negative_int_value_))); } else { goto handle_unusual; @@ -13722,10 +13742,10 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional double double_value = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (49 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (49 & 0xFF)) { HasBitSetters::set_has_double_value(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( input, &double_value_))); } else { goto handle_unusual; @@ -13735,8 +13755,8 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional bytes string_value = 7; case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( input, this->mutable_string_value())); } else { goto handle_unusual; @@ -13746,12 +13766,12 @@ bool UninterpretedOption::MergePartialFromCodedStream( // optional string aggregate_value = 8; case 8: { - if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_aggregate_value())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->aggregate_value().data(), static_cast(this->aggregate_value().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.UninterpretedOption.aggregate_value"); } else { goto handle_unusual; @@ -13764,7 +13784,7 @@ bool UninterpretedOption::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -13781,15 +13801,15 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void UninterpretedOption::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.UninterpretedOption) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; for (unsigned int i = 0, n = static_cast(this->name_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->name(static_cast(i)), output); @@ -13798,62 +13818,62 @@ void UninterpretedOption::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional string identifier_value = 3; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->identifier_value().data(), static_cast(this->identifier_value().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.identifier_value"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->identifier_value(), output); } // optional uint64 positive_int_value = 4; if (cached_has_bits & 0x00000008u) { - ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(4, this->positive_int_value(), output); } // optional int64 negative_int_value = 5; if (cached_has_bits & 0x00000010u) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->negative_int_value(), output); } // optional double double_value = 6; if (cached_has_bits & 0x00000020u) { - ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->double_value(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(6, this->double_value(), output); } // optional bytes string_value = 7; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( 7, this->string_value(), output); } // optional string aggregate_value = 8; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->aggregate_value().data(), static_cast(this->aggregate_value().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.aggregate_value"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 8, this->aggregate_value(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.UninterpretedOption) } -::google::protobuf::uint8* UninterpretedOption::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* UninterpretedOption::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; for (unsigned int i = 0, n = static_cast(this->name_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->name(static_cast(i)), target); } @@ -13861,50 +13881,50 @@ void UninterpretedOption::SerializeWithCachedSizes( cached_has_bits = _has_bits_[0]; // optional string identifier_value = 3; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->identifier_value().data(), static_cast(this->identifier_value().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.identifier_value"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 3, this->identifier_value(), target); } // optional uint64 positive_int_value = 4; if (cached_has_bits & 0x00000008u) { - target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->positive_int_value(), target); } // optional int64 negative_int_value = 5; if (cached_has_bits & 0x00000010u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->negative_int_value(), target); } // optional double double_value = 6; if (cached_has_bits & 0x00000020u) { - target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->double_value(), target); } // optional bytes string_value = 7; if (cached_has_bits & 0x00000002u) { target = - ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( 7, this->string_value(), target); } // optional string aggregate_value = 8; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->aggregate_value().data(), static_cast(this->aggregate_value().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.aggregate_value"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 8, this->aggregate_value(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption) @@ -13917,10 +13937,10 @@ size_t UninterpretedOption::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -13930,7 +13950,7 @@ size_t UninterpretedOption::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->name(static_cast(i))); } } @@ -13940,35 +13960,35 @@ size_t UninterpretedOption::ByteSizeLong() const { // optional string identifier_value = 3; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->identifier_value()); } // optional bytes string_value = 7; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::BytesSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( this->string_value()); } // optional string aggregate_value = 8; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->aggregate_value()); } // optional uint64 positive_int_value = 4; if (cached_has_bits & 0x00000008u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::UInt64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( this->positive_int_value()); } // optional int64 negative_int_value = 5; if (cached_has_bits & 0x00000010u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( this->negative_int_value()); } @@ -13978,20 +13998,20 @@ size_t UninterpretedOption::ByteSizeLong() const { } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void UninterpretedOption::MergeFrom(const ::google::protobuf::Message& from) { +void UninterpretedOption::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.UninterpretedOption) GOOGLE_DCHECK_NE(&from, this); const UninterpretedOption* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.UninterpretedOption) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.UninterpretedOption) MergeFrom(*source); @@ -14002,7 +14022,7 @@ void UninterpretedOption::MergeFrom(const UninterpretedOption& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UninterpretedOption) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; name_.MergeFrom(from.name_); @@ -14030,7 +14050,7 @@ void UninterpretedOption::MergeFrom(const UninterpretedOption& from) { } } -void UninterpretedOption::CopyFrom(const ::google::protobuf::Message& from) { +void UninterpretedOption::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.UninterpretedOption) if (&from == this) return; Clear(); @@ -14045,7 +14065,7 @@ void UninterpretedOption::CopyFrom(const UninterpretedOption& from) { } bool UninterpretedOption::IsInitialized() const { - if (!::google::protobuf::internal::AllAreInitialized(this->name())) return false; + if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(this->name())) return false; return true; } @@ -14073,19 +14093,19 @@ void UninterpretedOption::InternalSwap(UninterpretedOption* other) { _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); CastToBase(&name_)->InternalSwap(CastToBase(&other->name_)); - identifier_value_.Swap(&other->identifier_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + identifier_value_.Swap(&other->identifier_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - string_value_.Swap(&other->string_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + string_value_.Swap(&other->string_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - aggregate_value_.Swap(&other->aggregate_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + aggregate_value_.Swap(&other->aggregate_value_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(positive_int_value_, other->positive_int_value_); swap(negative_int_value_, other->negative_int_value_); swap(double_value_, other->double_value_); } -::google::protobuf::Metadata UninterpretedOption::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata UninterpretedOption::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -14113,12 +14133,12 @@ const int SourceCodeInfo_Location::kLeadingDetachedCommentsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SourceCodeInfo_Location::SourceCodeInfo_Location() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo.Location) } -SourceCodeInfo_Location::SourceCodeInfo_Location(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +SourceCodeInfo_Location::SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), path_(arena), span_(arena), @@ -14128,31 +14148,31 @@ SourceCodeInfo_Location::SourceCodeInfo_Location(::google::protobuf::Arena* aren // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo.Location) } SourceCodeInfo_Location::SourceCodeInfo_Location(const SourceCodeInfo_Location& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), path_(from.path_), span_(from.span_), leading_detached_comments_(from.leading_detached_comments_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - leading_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_leading_comments()) { - leading_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.leading_comments(), + leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.leading_comments(), GetArenaNoVirtual()); } - trailing_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_trailing_comments()) { - trailing_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.trailing_comments(), + trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.trailing_comments(), GetArenaNoVirtual()); } // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo.Location) } void SourceCodeInfo_Location::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto.base); - leading_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - trailing_comments_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + leading_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + trailing_comments_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } SourceCodeInfo_Location::~SourceCodeInfo_Location() { @@ -14162,28 +14182,28 @@ SourceCodeInfo_Location::~SourceCodeInfo_Location() { void SourceCodeInfo_Location::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - leading_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - trailing_comments_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + leading_comments_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + trailing_comments_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void SourceCodeInfo_Location::ArenaDtor(void* object) { SourceCodeInfo_Location* _this = reinterpret_cast< SourceCodeInfo_Location* >(object); (void)_this; } -void SourceCodeInfo_Location::RegisterArenaDtor(::google::protobuf::Arena*) { +void SourceCodeInfo_Location::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void SourceCodeInfo_Location::SetCachedSize(int size) const { _cached_size_.Set(size); } const SourceCodeInfo_Location& SourceCodeInfo_Location::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SourceCodeInfo_Location_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void SourceCodeInfo_Location::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo.Location) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -14204,62 +14224,63 @@ void SourceCodeInfo_Location::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated int32 path = 1 [packed = true]; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == 10) { - ptr = ::google::protobuf::internal::PackedInt32Parser(mutable_path(), ptr, ctx); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_path(), ptr, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; do { - add_path(::google::protobuf::internal::ReadVarint(&ptr)); + add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 8 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 8 && (ptr += 1)); break; } // repeated int32 span = 2 [packed = true]; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == 18) { - ptr = ::google::protobuf::internal::PackedInt32Parser(mutable_span(), ptr, ctx); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_span(), ptr, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; do { - add_span(::google::protobuf::internal::ReadVarint(&ptr)); + add_span(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 16 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 16 && (ptr += 1)); break; } // optional string leading_comments = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_leading_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.leading_comments"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_leading_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.leading_comments"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional string trailing_comments = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_trailing_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 34) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_trailing_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // repeated string leading_detached_comments = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; do { - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(add_leading_detached_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(add_leading_detached_comments(), ptr, ctx, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 50 && (ptr += 1)); break; } default: { @@ -14279,24 +14300,24 @@ const char* SourceCodeInfo_Location::_InternalParse(const char* ptr, ::google::p } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool SourceCodeInfo_Location::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo.Location) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated int32 path = 1 [packed = true]; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_path()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( 1, 10u, input, this->mutable_path()))); } else { goto handle_unusual; @@ -14306,13 +14327,13 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // repeated int32 span = 2 [packed = true]; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_span()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( 1, 18u, input, this->mutable_span()))); } else { goto handle_unusual; @@ -14322,12 +14343,12 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // optional string leading_comments = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_leading_comments())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->leading_comments().data(), static_cast(this->leading_comments().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.SourceCodeInfo.Location.leading_comments"); } else { goto handle_unusual; @@ -14337,12 +14358,12 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // optional string trailing_comments = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_trailing_comments())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->trailing_comments().data(), static_cast(this->trailing_comments().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); } else { goto handle_unusual; @@ -14352,13 +14373,13 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( // repeated string leading_detached_comments = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_leading_detached_comments())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->leading_detached_comments(this->leading_detached_comments_size() - 1).data(), static_cast(this->leading_detached_comments(this->leading_detached_comments_size() - 1).length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); } else { goto handle_unusual; @@ -14371,7 +14392,7 @@ bool SourceCodeInfo_Location::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -14388,138 +14409,138 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SourceCodeInfo_Location::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo.Location) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); output->WriteVarint32(_path_cached_byte_size_.load( std::memory_order_relaxed)); } for (int i = 0, n = this->path_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( this->path(i), output); } // repeated int32 span = 2 [packed = true]; if (this->span_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); output->WriteVarint32(_span_cached_byte_size_.load( std::memory_order_relaxed)); } for (int i = 0, n = this->span_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( this->span(i), output); } cached_has_bits = _has_bits_[0]; // optional string leading_comments = 3; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->leading_comments().data(), static_cast(this->leading_comments().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_comments"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->leading_comments(), output); } // optional string trailing_comments = 4; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->trailing_comments().data(), static_cast(this->trailing_comments().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->trailing_comments(), output); } // repeated string leading_detached_comments = 6; for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->leading_detached_comments(i).data(), static_cast(this->leading_detached_comments(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( 6, this->leading_detached_comments(i), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo.Location) } -::google::protobuf::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo_Location::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo.Location) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( _path_cached_byte_size_.load(std::memory_order_relaxed), target); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteInt32NoTagToArray(this->path_, target); } // repeated int32 span = 2 [packed = true]; if (this->span_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( 2, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( _span_cached_byte_size_.load(std::memory_order_relaxed), target); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteInt32NoTagToArray(this->span_, target); } cached_has_bits = _has_bits_[0]; // optional string leading_comments = 3; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->leading_comments().data(), static_cast(this->leading_comments().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_comments"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 3, this->leading_comments(), target); } // optional string trailing_comments = 4; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->trailing_comments().data(), static_cast(this->trailing_comments().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.trailing_comments"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 4, this->trailing_comments(), target); } // repeated string leading_detached_comments = 6; for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->leading_detached_comments(i).data(), static_cast(this->leading_detached_comments(i).length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.SourceCodeInfo.Location.leading_detached_comments"); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteStringToArray(6, this->leading_detached_comments(i), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo.Location) @@ -14532,23 +14553,23 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; { - size_t data_size = ::google::protobuf::internal::WireFormatLite:: + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->path_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast<::google::protobuf::int32>(data_size)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); _path_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; @@ -14556,14 +14577,14 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { // repeated int32 span = 2 [packed = true]; { - size_t data_size = ::google::protobuf::internal::WireFormatLite:: + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->span_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast<::google::protobuf::int32>(data_size)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); _span_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; @@ -14571,9 +14592,9 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { // repeated string leading_detached_comments = 6; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->leading_detached_comments_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->leading_detached_comments_size()); for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->leading_detached_comments(i)); } @@ -14582,32 +14603,32 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { // optional string leading_comments = 3; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->leading_comments()); } // optional string trailing_comments = 4; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->trailing_comments()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void SourceCodeInfo_Location::MergeFrom(const ::google::protobuf::Message& from) { +void SourceCodeInfo_Location::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceCodeInfo.Location) GOOGLE_DCHECK_NE(&from, this); const SourceCodeInfo_Location* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceCodeInfo.Location) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceCodeInfo.Location) MergeFrom(*source); @@ -14618,7 +14639,7 @@ void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo.Location) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; path_.MergeFrom(from.path_); @@ -14635,7 +14656,7 @@ void SourceCodeInfo_Location::MergeFrom(const SourceCodeInfo_Location& from) { } } -void SourceCodeInfo_Location::CopyFrom(const ::google::protobuf::Message& from) { +void SourceCodeInfo_Location::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceCodeInfo.Location) if (&from == this) return; Clear(); @@ -14679,14 +14700,14 @@ void SourceCodeInfo_Location::InternalSwap(SourceCodeInfo_Location* other) { path_.InternalSwap(&other->path_); span_.InternalSwap(&other->span_); leading_detached_comments_.InternalSwap(CastToBase(&other->leading_detached_comments_)); - leading_comments_.Swap(&other->leading_comments_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + leading_comments_.Swap(&other->leading_comments_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - trailing_comments_.Swap(&other->trailing_comments_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + trailing_comments_.Swap(&other->trailing_comments_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata SourceCodeInfo_Location::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo_Location::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -14704,12 +14725,12 @@ const int SourceCodeInfo::kLocationFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SourceCodeInfo::SourceCodeInfo() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.SourceCodeInfo) } -SourceCodeInfo::SourceCodeInfo(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +SourceCodeInfo::SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), location_(arena) { SharedCtor(); @@ -14717,7 +14738,7 @@ SourceCodeInfo::SourceCodeInfo(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.SourceCodeInfo) } SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), location_(from.location_) { @@ -14726,7 +14747,7 @@ SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) } void SourceCodeInfo::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); } @@ -14743,20 +14764,20 @@ void SourceCodeInfo::ArenaDtor(void* object) { SourceCodeInfo* _this = reinterpret_cast< SourceCodeInfo* >(object); (void)_this; } -void SourceCodeInfo::RegisterArenaDtor(::google::protobuf::Arena*) { +void SourceCodeInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void SourceCodeInfo::SetCachedSize(int size) const { _cached_size_.Set(size); } const SourceCodeInfo& SourceCodeInfo::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SourceCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void SourceCodeInfo::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceCodeInfo) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -14766,20 +14787,21 @@ void SourceCodeInfo::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SourceCodeInfo::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* SourceCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated .google.protobuf.SourceCodeInfo.Location location = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; do { ptr = ctx->ParseMessage(add_location(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } default: { @@ -14799,19 +14821,19 @@ const char* SourceCodeInfo::_InternalParse(const char* ptr, ::google::protobuf:: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool SourceCodeInfo::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.SourceCodeInfo) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.protobuf.SourceCodeInfo.Location location = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_location())); } else { goto handle_unusual; @@ -14824,7 +14846,7 @@ bool SourceCodeInfo::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -14841,43 +14863,43 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SourceCodeInfo::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.SourceCodeInfo) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; for (unsigned int i = 0, n = static_cast(this->location_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->location(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SourceCodeInfo) } -::google::protobuf::uint8* SourceCodeInfo::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SourceCodeInfo::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCodeInfo) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; for (unsigned int i = 0, n = static_cast(this->location_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->location(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceCodeInfo) @@ -14890,10 +14912,10 @@ size_t SourceCodeInfo::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -14903,25 +14925,25 @@ size_t SourceCodeInfo::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->location(static_cast(i))); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void SourceCodeInfo::MergeFrom(const ::google::protobuf::Message& from) { +void SourceCodeInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceCodeInfo) GOOGLE_DCHECK_NE(&from, this); const SourceCodeInfo* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceCodeInfo) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceCodeInfo) MergeFrom(*source); @@ -14932,13 +14954,13 @@ void SourceCodeInfo::MergeFrom(const SourceCodeInfo& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceCodeInfo) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; location_.MergeFrom(from.location_); } -void SourceCodeInfo::CopyFrom(const ::google::protobuf::Message& from) { +void SourceCodeInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceCodeInfo) if (&from == this) return; Clear(); @@ -14982,8 +15004,8 @@ void SourceCodeInfo::InternalSwap(SourceCodeInfo* other) { CastToBase(&location_)->InternalSwap(CastToBase(&other->location_)); } -::google::protobuf::Metadata SourceCodeInfo::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata SourceCodeInfo::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -15013,12 +15035,12 @@ const int GeneratedCodeInfo_Annotation::kEndFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo.Annotation) } -GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), path_(arena) { SharedCtor(); @@ -15026,14 +15048,14 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(::google::protobuf::A // @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo.Annotation) } GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), path_(from.path_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.has_source_file()) { - source_file_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_file(), + source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.source_file(), GetArenaNoVirtual()); } ::memcpy(&begin_, &from.begin_, @@ -15043,9 +15065,9 @@ GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(const GeneratedCodeIn } void GeneratedCodeInfo_Annotation::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto.base); - source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + source_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&begin_, 0, static_cast( reinterpret_cast(&end_) - reinterpret_cast(&begin_)) + sizeof(end_)); @@ -15058,27 +15080,27 @@ GeneratedCodeInfo_Annotation::~GeneratedCodeInfo_Annotation() { void GeneratedCodeInfo_Annotation::SharedDtor() { GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); - source_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + source_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void GeneratedCodeInfo_Annotation::ArenaDtor(void* object) { GeneratedCodeInfo_Annotation* _this = reinterpret_cast< GeneratedCodeInfo_Annotation* >(object); (void)_this; } -void GeneratedCodeInfo_Annotation::RegisterArenaDtor(::google::protobuf::Arena*) { +void GeneratedCodeInfo_Annotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void GeneratedCodeInfo_Annotation::SetCachedSize(int size) const { _cached_size_.Set(size); } const GeneratedCodeInfo_Annotation& GeneratedCodeInfo_Annotation::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GeneratedCodeInfo_Annotation_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void GeneratedCodeInfo_Annotation::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo.Annotation) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -15097,44 +15119,45 @@ void GeneratedCodeInfo_Annotation::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated int32 path = 1 [packed = true]; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == 10) { - ptr = ::google::protobuf::internal::PackedInt32Parser(mutable_path(), ptr, ctx); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_path(), ptr, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; do { - add_path(::google::protobuf::internal::ReadVarint(&ptr)); + add_path(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 8 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 8 && (ptr += 1)); break; } // optional string source_file = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8Verify(mutable_source_file(), ptr, ctx, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 18) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8Verify(mutable_source_file(), ptr, ctx, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 begin = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; - set_begin(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 24) goto handle_unusual; + set_begin(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // optional int32 end = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - set_end(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 32) goto handle_unusual; + set_end(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -15155,24 +15178,24 @@ const char* GeneratedCodeInfo_Annotation::_InternalParse(const char* ptr, ::goog } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo.Annotation) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated int32 path = 1 [packed = true]; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, this->mutable_path()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( 1, 10u, input, this->mutable_path()))); } else { goto handle_unusual; @@ -15182,12 +15205,12 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( // optional string source_file = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_source_file())); - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->source_file().data(), static_cast(this->source_file().length()), - ::google::protobuf::internal::WireFormat::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::PARSE, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); } else { goto handle_unusual; @@ -15197,10 +15220,10 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( // optional int32 begin = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { HasBitSetters::set_has_begin(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &begin_))); } else { goto handle_unusual; @@ -15210,10 +15233,10 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( // optional int32 end = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { HasBitSetters::set_has_end(this); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &end_))); } else { goto handle_unusual; @@ -15226,7 +15249,7 @@ bool GeneratedCodeInfo_Annotation::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -15243,93 +15266,93 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo.Annotation) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); output->WriteVarint32(_path_cached_byte_size_.load( std::memory_order_relaxed)); } for (int i = 0, n = this->path_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( this->path(i), output); } cached_has_bits = _has_bits_[0]; // optional string source_file = 2; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->source_file().data(), static_cast(this->source_file().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->source_file(), output); } // optional int32 begin = 3; if (cached_has_bits & 0x00000002u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->begin(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->begin(), output); } // optional int32 end = 4; if (cached_has_bits & 0x00000004u) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->end(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->end(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo.Annotation) } -::google::protobuf::uint8* GeneratedCodeInfo_Annotation::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo_Annotation::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo.Annotation) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( _path_cached_byte_size_.load(std::memory_order_relaxed), target); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteInt32NoTagToArray(this->path_, target); } cached_has_bits = _has_bits_[0]; // optional string source_file = 2; if (cached_has_bits & 0x00000001u) { - ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->source_file().data(), static_cast(this->source_file().length()), - ::google::protobuf::internal::WireFormat::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.GeneratedCodeInfo.Annotation.source_file"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 2, this->source_file(), target); } // optional int32 begin = 3; if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->begin(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->begin(), target); } // optional int32 end = 4; if (cached_has_bits & 0x00000004u) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->end(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->end(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo.Annotation) @@ -15342,23 +15365,23 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated int32 path = 1 [packed = true]; { - size_t data_size = ::google::protobuf::internal::WireFormatLite:: + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->path_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast<::google::protobuf::int32>(data_size)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); _path_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; @@ -15369,39 +15392,39 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { // optional string source_file = 2; if (cached_has_bits & 0x00000001u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->source_file()); } // optional int32 begin = 3; if (cached_has_bits & 0x00000002u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->begin()); } // optional int32 end = 4; if (cached_has_bits & 0x00000004u) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->end()); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void GeneratedCodeInfo_Annotation::MergeFrom(const ::google::protobuf::Message& from) { +void GeneratedCodeInfo_Annotation::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation) GOOGLE_DCHECK_NE(&from, this); const GeneratedCodeInfo_Annotation* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.GeneratedCodeInfo.Annotation) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.GeneratedCodeInfo.Annotation) MergeFrom(*source); @@ -15412,7 +15435,7 @@ void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo.Annotation) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; path_.MergeFrom(from.path_); @@ -15431,7 +15454,7 @@ void GeneratedCodeInfo_Annotation::MergeFrom(const GeneratedCodeInfo_Annotation& } } -void GeneratedCodeInfo_Annotation::CopyFrom(const ::google::protobuf::Message& from) { +void GeneratedCodeInfo_Annotation::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.GeneratedCodeInfo.Annotation) if (&from == this) return; Clear(); @@ -15473,14 +15496,14 @@ void GeneratedCodeInfo_Annotation::InternalSwap(GeneratedCodeInfo_Annotation* ot _internal_metadata_.Swap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); path_.InternalSwap(&other->path_); - source_file_.Swap(&other->source_file_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + source_file_.Swap(&other->source_file_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(begin_, other->begin_); swap(end_, other->end_); } -::google::protobuf::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo_Annotation::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } @@ -15498,12 +15521,12 @@ const int GeneratedCodeInfo::kAnnotationFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 GeneratedCodeInfo::GeneratedCodeInfo() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.GeneratedCodeInfo) } -GeneratedCodeInfo::GeneratedCodeInfo(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +GeneratedCodeInfo::GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), annotation_(arena) { SharedCtor(); @@ -15511,7 +15534,7 @@ GeneratedCodeInfo::GeneratedCodeInfo(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.GeneratedCodeInfo) } GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), _has_bits_(from._has_bits_), annotation_(from.annotation_) { @@ -15520,7 +15543,7 @@ GeneratedCodeInfo::GeneratedCodeInfo(const GeneratedCodeInfo& from) } void GeneratedCodeInfo::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); } @@ -15537,20 +15560,20 @@ void GeneratedCodeInfo::ArenaDtor(void* object) { GeneratedCodeInfo* _this = reinterpret_cast< GeneratedCodeInfo* >(object); (void)_this; } -void GeneratedCodeInfo::RegisterArenaDtor(::google::protobuf::Arena*) { +void GeneratedCodeInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void GeneratedCodeInfo::SetCachedSize(int size) const { _cached_size_.Set(size); } const GeneratedCodeInfo& GeneratedCodeInfo::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GeneratedCodeInfo_google_2fprotobuf_2fdescriptor_2eproto.base); return *internal_default_instance(); } void GeneratedCodeInfo::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.GeneratedCodeInfo) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -15560,20 +15583,21 @@ void GeneratedCodeInfo::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* GeneratedCodeInfo::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* GeneratedCodeInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; do { ptr = ctx->ParseMessage(add_annotation(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } default: { @@ -15593,19 +15617,19 @@ const char* GeneratedCodeInfo::_InternalParse(const char* ptr, ::google::protobu } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool GeneratedCodeInfo::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.GeneratedCodeInfo) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_annotation())); } else { goto handle_unusual; @@ -15618,7 +15642,7 @@ bool GeneratedCodeInfo::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -15635,43 +15659,43 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void GeneratedCodeInfo::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.GeneratedCodeInfo) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; for (unsigned int i = 0, n = static_cast(this->annotation_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->annotation(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.GeneratedCodeInfo) } -::google::protobuf::uint8* GeneratedCodeInfo::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* GeneratedCodeInfo::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.GeneratedCodeInfo) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; for (unsigned int i = 0, n = static_cast(this->annotation_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->annotation(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.GeneratedCodeInfo) @@ -15684,10 +15708,10 @@ size_t GeneratedCodeInfo::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -15697,25 +15721,25 @@ size_t GeneratedCodeInfo::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->annotation(static_cast(i))); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void GeneratedCodeInfo::MergeFrom(const ::google::protobuf::Message& from) { +void GeneratedCodeInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.GeneratedCodeInfo) GOOGLE_DCHECK_NE(&from, this); const GeneratedCodeInfo* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.GeneratedCodeInfo) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.GeneratedCodeInfo) MergeFrom(*source); @@ -15726,13 +15750,13 @@ void GeneratedCodeInfo::MergeFrom(const GeneratedCodeInfo& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.GeneratedCodeInfo) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; annotation_.MergeFrom(from.annotation_); } -void GeneratedCodeInfo::CopyFrom(const ::google::protobuf::Message& from) { +void GeneratedCodeInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.GeneratedCodeInfo) if (&from == this) return; Clear(); @@ -15776,100 +15800,97 @@ void GeneratedCodeInfo::InternalSwap(GeneratedCodeInfo* other) { CastToBase(&annotation_)->InternalSwap(CastToBase(&other->annotation_)); } -::google::protobuf::Metadata GeneratedCodeInfo::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata GeneratedCodeInfo::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fdescriptor_2eproto); return ::file_level_metadata_google_2fprotobuf_2fdescriptor_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::FileDescriptorSet* Arena::CreateMaybeMessage< ::google::protobuf::FileDescriptorSet >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::FileDescriptorSet >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FileDescriptorSet* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FileDescriptorSet >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FileDescriptorSet >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::FileDescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::FileDescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::FileDescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FileDescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::DescriptorProto_ExtensionRange* Arena::CreateMaybeMessage< ::google::protobuf::DescriptorProto_ExtensionRange >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::DescriptorProto_ExtensionRange >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::DescriptorProto_ReservedRange* Arena::CreateMaybeMessage< ::google::protobuf::DescriptorProto_ReservedRange >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::DescriptorProto_ReservedRange >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::DescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::DescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::DescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::DescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::DescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::DescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::ExtensionRangeOptions* Arena::CreateMaybeMessage< ::google::protobuf::ExtensionRangeOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::ExtensionRangeOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::FieldDescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::FieldDescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::FieldDescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::OneofDescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::OneofDescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::OneofDescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::EnumDescriptorProto_EnumReservedRange* Arena::CreateMaybeMessage< ::google::protobuf::EnumDescriptorProto_EnumReservedRange >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::EnumDescriptorProto_EnumReservedRange >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::EnumDescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::EnumDescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::EnumDescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::EnumValueDescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::EnumValueDescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::EnumValueDescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::ServiceDescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::ServiceDescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::ServiceDescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::MethodDescriptorProto* Arena::CreateMaybeMessage< ::google::protobuf::MethodDescriptorProto >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::MethodDescriptorProto >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::FileOptions* Arena::CreateMaybeMessage< ::google::protobuf::FileOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::FileOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FileOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FileOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FileOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::MessageOptions* Arena::CreateMaybeMessage< ::google::protobuf::MessageOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::MessageOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::MessageOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::MessageOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::MessageOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::FieldOptions* Arena::CreateMaybeMessage< ::google::protobuf::FieldOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::FieldOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FieldOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FieldOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FieldOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::OneofOptions* Arena::CreateMaybeMessage< ::google::protobuf::OneofOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::OneofOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::OneofOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::OneofOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::OneofOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::EnumOptions* Arena::CreateMaybeMessage< ::google::protobuf::EnumOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::EnumOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::EnumValueOptions* Arena::CreateMaybeMessage< ::google::protobuf::EnumValueOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::EnumValueOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::EnumValueOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::EnumValueOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::EnumValueOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::ServiceOptions* Arena::CreateMaybeMessage< ::google::protobuf::ServiceOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::ServiceOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ServiceOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ServiceOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ServiceOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::MethodOptions* Arena::CreateMaybeMessage< ::google::protobuf::MethodOptions >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::MethodOptions >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::MethodOptions* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::MethodOptions >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::MethodOptions >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::UninterpretedOption_NamePart* Arena::CreateMaybeMessage< ::google::protobuf::UninterpretedOption_NamePart >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::UninterpretedOption_NamePart >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::UninterpretedOption* Arena::CreateMaybeMessage< ::google::protobuf::UninterpretedOption >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::UninterpretedOption >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::UninterpretedOption* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::UninterpretedOption >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::UninterpretedOption >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::SourceCodeInfo_Location* Arena::CreateMaybeMessage< ::google::protobuf::SourceCodeInfo_Location >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::SourceCodeInfo_Location >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::SourceCodeInfo* Arena::CreateMaybeMessage< ::google::protobuf::SourceCodeInfo >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::SourceCodeInfo >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceCodeInfo* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceCodeInfo >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::SourceCodeInfo >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::GeneratedCodeInfo_Annotation* Arena::CreateMaybeMessage< ::google::protobuf::GeneratedCodeInfo_Annotation >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::GeneratedCodeInfo_Annotation >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::GeneratedCodeInfo* Arena::CreateMaybeMessage< ::google::protobuf::GeneratedCodeInfo >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::GeneratedCodeInfo >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 8f572e5e58..bff027e369 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/descriptor.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fdescriptor_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fdescriptor_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fdescriptor_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fdescriptor_2eproto #include #include @@ -32,32 +32,29 @@ #include // IWYU pragma: export #include #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fdescriptor_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fdescriptor_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[27] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[27] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2fdescriptor_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class DescriptorProto; class DescriptorProtoDefaultTypeInternal; PROTOBUF_EXPORT extern DescriptorProtoDefaultTypeInternal _DescriptorProto_default_instance_; @@ -139,37 +136,37 @@ PROTOBUF_EXPORT extern UninterpretedOptionDefaultTypeInternal _UninterpretedOpti class UninterpretedOption_NamePart; class UninterpretedOption_NamePartDefaultTypeInternal; PROTOBUF_EXPORT extern UninterpretedOption_NamePartDefaultTypeInternal _UninterpretedOption_NamePart_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::DescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::DescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::DescriptorProto_ExtensionRange* Arena::CreateMaybeMessage<::google::protobuf::DescriptorProto_ExtensionRange>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::DescriptorProto_ReservedRange* Arena::CreateMaybeMessage<::google::protobuf::DescriptorProto_ReservedRange>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::EnumDescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::EnumDescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::EnumDescriptorProto_EnumReservedRange* Arena::CreateMaybeMessage<::google::protobuf::EnumDescriptorProto_EnumReservedRange>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::EnumOptions* Arena::CreateMaybeMessage<::google::protobuf::EnumOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::EnumValueDescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::EnumValueDescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::EnumValueOptions* Arena::CreateMaybeMessage<::google::protobuf::EnumValueOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::ExtensionRangeOptions* Arena::CreateMaybeMessage<::google::protobuf::ExtensionRangeOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::FieldDescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::FieldDescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::FieldOptions* Arena::CreateMaybeMessage<::google::protobuf::FieldOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::FileDescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::FileDescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::FileDescriptorSet* Arena::CreateMaybeMessage<::google::protobuf::FileDescriptorSet>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::FileOptions* Arena::CreateMaybeMessage<::google::protobuf::FileOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::GeneratedCodeInfo* Arena::CreateMaybeMessage<::google::protobuf::GeneratedCodeInfo>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::GeneratedCodeInfo_Annotation* Arena::CreateMaybeMessage<::google::protobuf::GeneratedCodeInfo_Annotation>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::MessageOptions* Arena::CreateMaybeMessage<::google::protobuf::MessageOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::MethodDescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::MethodDescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::MethodOptions* Arena::CreateMaybeMessage<::google::protobuf::MethodOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::OneofDescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::OneofDescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::OneofOptions* Arena::CreateMaybeMessage<::google::protobuf::OneofOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::ServiceDescriptorProto* Arena::CreateMaybeMessage<::google::protobuf::ServiceDescriptorProto>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::ServiceOptions* Arena::CreateMaybeMessage<::google::protobuf::ServiceOptions>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::SourceCodeInfo* Arena::CreateMaybeMessage<::google::protobuf::SourceCodeInfo>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::SourceCodeInfo_Location* Arena::CreateMaybeMessage<::google::protobuf::SourceCodeInfo_Location>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::UninterpretedOption* Arena::CreateMaybeMessage<::google::protobuf::UninterpretedOption>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::UninterpretedOption_NamePart* Arena::CreateMaybeMessage<::google::protobuf::UninterpretedOption_NamePart>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::DescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::EnumOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::EnumValueOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FieldOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FileDescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FileDescriptorSet* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FileOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::MessageOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::MethodOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::OneofOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::ServiceOptions* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::SourceCodeInfo* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::UninterpretedOption* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN enum FieldDescriptorProto_Type { FieldDescriptorProto_Type_TYPE_DOUBLE = 1, @@ -196,14 +193,14 @@ constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MIN = FieldDe constexpr FieldDescriptorProto_Type FieldDescriptorProto_Type_Type_MAX = FieldDescriptorProto_Type_TYPE_SINT64; constexpr int FieldDescriptorProto_Type_Type_ARRAYSIZE = FieldDescriptorProto_Type_Type_MAX + 1; -PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Type_descriptor(); -inline const ::std::string& FieldDescriptorProto_Type_Name(FieldDescriptorProto_Type value) { - return ::google::protobuf::internal::NameOfEnum( +PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Type_descriptor(); +inline const std::string& FieldDescriptorProto_Type_Name(FieldDescriptorProto_Type value) { + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( FieldDescriptorProto_Type_descriptor(), value); } inline bool FieldDescriptorProto_Type_Parse( - const ::std::string& name, FieldDescriptorProto_Type* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, FieldDescriptorProto_Type* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( FieldDescriptorProto_Type_descriptor(), name, value); } enum FieldDescriptorProto_Label { @@ -216,14 +213,14 @@ constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MIN = Fiel constexpr FieldDescriptorProto_Label FieldDescriptorProto_Label_Label_MAX = FieldDescriptorProto_Label_LABEL_REPEATED; constexpr int FieldDescriptorProto_Label_Label_ARRAYSIZE = FieldDescriptorProto_Label_Label_MAX + 1; -PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldDescriptorProto_Label_descriptor(); -inline const ::std::string& FieldDescriptorProto_Label_Name(FieldDescriptorProto_Label value) { - return ::google::protobuf::internal::NameOfEnum( +PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldDescriptorProto_Label_descriptor(); +inline const std::string& FieldDescriptorProto_Label_Name(FieldDescriptorProto_Label value) { + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( FieldDescriptorProto_Label_descriptor(), value); } inline bool FieldDescriptorProto_Label_Parse( - const ::std::string& name, FieldDescriptorProto_Label* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, FieldDescriptorProto_Label* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( FieldDescriptorProto_Label_descriptor(), name, value); } enum FileOptions_OptimizeMode { @@ -236,14 +233,14 @@ constexpr FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MIN = F constexpr FileOptions_OptimizeMode FileOptions_OptimizeMode_OptimizeMode_MAX = FileOptions_OptimizeMode_LITE_RUNTIME; constexpr int FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE = FileOptions_OptimizeMode_OptimizeMode_MAX + 1; -PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FileOptions_OptimizeMode_descriptor(); -inline const ::std::string& FileOptions_OptimizeMode_Name(FileOptions_OptimizeMode value) { - return ::google::protobuf::internal::NameOfEnum( +PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FileOptions_OptimizeMode_descriptor(); +inline const std::string& FileOptions_OptimizeMode_Name(FileOptions_OptimizeMode value) { + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( FileOptions_OptimizeMode_descriptor(), value); } inline bool FileOptions_OptimizeMode_Parse( - const ::std::string& name, FileOptions_OptimizeMode* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, FileOptions_OptimizeMode* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( FileOptions_OptimizeMode_descriptor(), name, value); } enum FieldOptions_CType { @@ -256,14 +253,14 @@ constexpr FieldOptions_CType FieldOptions_CType_CType_MIN = FieldOptions_CType_S constexpr FieldOptions_CType FieldOptions_CType_CType_MAX = FieldOptions_CType_STRING_PIECE; constexpr int FieldOptions_CType_CType_ARRAYSIZE = FieldOptions_CType_CType_MAX + 1; -PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_CType_descriptor(); -inline const ::std::string& FieldOptions_CType_Name(FieldOptions_CType value) { - return ::google::protobuf::internal::NameOfEnum( +PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_CType_descriptor(); +inline const std::string& FieldOptions_CType_Name(FieldOptions_CType value) { + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( FieldOptions_CType_descriptor(), value); } inline bool FieldOptions_CType_Parse( - const ::std::string& name, FieldOptions_CType* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, FieldOptions_CType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( FieldOptions_CType_descriptor(), name, value); } enum FieldOptions_JSType { @@ -276,14 +273,14 @@ constexpr FieldOptions_JSType FieldOptions_JSType_JSType_MIN = FieldOptions_JSTy constexpr FieldOptions_JSType FieldOptions_JSType_JSType_MAX = FieldOptions_JSType_JS_NUMBER; constexpr int FieldOptions_JSType_JSType_ARRAYSIZE = FieldOptions_JSType_JSType_MAX + 1; -PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* FieldOptions_JSType_descriptor(); -inline const ::std::string& FieldOptions_JSType_Name(FieldOptions_JSType value) { - return ::google::protobuf::internal::NameOfEnum( +PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FieldOptions_JSType_descriptor(); +inline const std::string& FieldOptions_JSType_Name(FieldOptions_JSType value) { + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( FieldOptions_JSType_descriptor(), value); } inline bool FieldOptions_JSType_Parse( - const ::std::string& name, FieldOptions_JSType* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, FieldOptions_JSType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( FieldOptions_JSType_descriptor(), name, value); } enum MethodOptions_IdempotencyLevel { @@ -296,36 +293,34 @@ constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_Idempote constexpr MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX = MethodOptions_IdempotencyLevel_IDEMPOTENT; constexpr int MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE = MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX + 1; -PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor(); -inline const ::std::string& MethodOptions_IdempotencyLevel_Name(MethodOptions_IdempotencyLevel value) { - return ::google::protobuf::internal::NameOfEnum( +PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MethodOptions_IdempotencyLevel_descriptor(); +inline const std::string& MethodOptions_IdempotencyLevel_Name(MethodOptions_IdempotencyLevel value) { + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( MethodOptions_IdempotencyLevel_descriptor(), value); } inline bool MethodOptions_IdempotencyLevel_Parse( - const ::std::string& name, MethodOptions_IdempotencyLevel* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, MethodOptions_IdempotencyLevel* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( MethodOptions_IdempotencyLevel_descriptor(), name, value); } // =================================================================== class PROTOBUF_EXPORT FileDescriptorSet final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorSet) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorSet) */ { public: FileDescriptorSet(); virtual ~FileDescriptorSet(); FileDescriptorSet(const FileDescriptorSet& from); - - inline FileDescriptorSet& operator=(const FileDescriptorSet& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 FileDescriptorSet(FileDescriptorSet&& from) noexcept : FileDescriptorSet() { *this = ::std::move(from); } + inline FileDescriptorSet& operator=(const FileDescriptorSet& from) { + CopyFrom(from); + return *this; + } inline FileDescriptorSet& operator=(FileDescriptorSet&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -334,21 +329,21 @@ class PROTOBUF_EXPORT FileDescriptorSet final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const FileDescriptorSet& default_instance(); @@ -373,11 +368,11 @@ class PROTOBUF_EXPORT FileDescriptorSet final : return CreateMaybeMessage(nullptr); } - FileDescriptorSet* New(::google::protobuf::Arena* arena) const final { + FileDescriptorSet* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const FileDescriptorSet& from); void MergeFrom(const FileDescriptorSet& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -385,15 +380,15 @@ class PROTOBUF_EXPORT FileDescriptorSet final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -401,17 +396,17 @@ class PROTOBUF_EXPORT FileDescriptorSet final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileDescriptorSet* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.FileDescriptorSet"; } protected: - explicit FileDescriptorSet(::google::protobuf::Arena* arena); + explicit FileDescriptorSet(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -419,7 +414,7 @@ class PROTOBUF_EXPORT FileDescriptorSet final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -429,47 +424,45 @@ class PROTOBUF_EXPORT FileDescriptorSet final : int file_size() const; void clear_file(); static const int kFileFieldNumber = 1; - ::google::protobuf::FileDescriptorProto* mutable_file(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* + PROTOBUF_NAMESPACE_ID::FileDescriptorProto* mutable_file(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >* mutable_file(); - const ::google::protobuf::FileDescriptorProto& file(int index) const; - ::google::protobuf::FileDescriptorProto* add_file(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& file(int index) const; + PROTOBUF_NAMESPACE_ID::FileDescriptorProto* add_file(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& file() const; // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorSet) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > file_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto > file_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT FileDescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileDescriptorProto) */ { public: FileDescriptorProto(); virtual ~FileDescriptorProto(); FileDescriptorProto(const FileDescriptorProto& from); - - inline FileDescriptorProto& operator=(const FileDescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 FileDescriptorProto(FileDescriptorProto&& from) noexcept : FileDescriptorProto() { *this = ::std::move(from); } + inline FileDescriptorProto& operator=(const FileDescriptorProto& from) { + CopyFrom(from); + return *this; + } inline FileDescriptorProto& operator=(FileDescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -478,21 +471,21 @@ class PROTOBUF_EXPORT FileDescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const FileDescriptorProto& default_instance(); @@ -517,11 +510,11 @@ class PROTOBUF_EXPORT FileDescriptorProto final : return CreateMaybeMessage(nullptr); } - FileDescriptorProto* New(::google::protobuf::Arena* arena) const final { + FileDescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const FileDescriptorProto& from); void MergeFrom(const FileDescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -529,15 +522,15 @@ class PROTOBUF_EXPORT FileDescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -545,17 +538,17 @@ class PROTOBUF_EXPORT FileDescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileDescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.FileDescriptorProto"; } protected: - explicit FileDescriptorProto(::google::protobuf::Arena* arena); + explicit FileDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -563,7 +556,7 @@ class PROTOBUF_EXPORT FileDescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -573,236 +566,224 @@ class PROTOBUF_EXPORT FileDescriptorProto final : int dependency_size() const; void clear_dependency(); static const int kDependencyFieldNumber = 3; - const ::std::string& dependency(int index) const; - ::std::string* mutable_dependency(int index); - void set_dependency(int index, const ::std::string& value); - #if LANG_CXX11 - void set_dependency(int index, ::std::string&& value); - #endif + const std::string& dependency(int index) const; + std::string* mutable_dependency(int index); + void set_dependency(int index, const std::string& value); + void set_dependency(int index, std::string&& value); void set_dependency(int index, const char* value); void set_dependency(int index, const char* value, size_t size); - ::std::string* add_dependency(); - void add_dependency(const ::std::string& value); - #if LANG_CXX11 - void add_dependency(::std::string&& value); - #endif + std::string* add_dependency(); + void add_dependency(const std::string& value); + void add_dependency(std::string&& value); void add_dependency(const char* value); void add_dependency(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& dependency() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_dependency(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& dependency() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_dependency(); // repeated .google.protobuf.DescriptorProto message_type = 4; int message_type_size() const; void clear_message_type(); static const int kMessageTypeFieldNumber = 4; - ::google::protobuf::DescriptorProto* mutable_message_type(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* + PROTOBUF_NAMESPACE_ID::DescriptorProto* mutable_message_type(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >* mutable_message_type(); - const ::google::protobuf::DescriptorProto& message_type(int index) const; - ::google::protobuf::DescriptorProto* add_message_type(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& + const PROTOBUF_NAMESPACE_ID::DescriptorProto& message_type(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto* add_message_type(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& message_type() const; // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; int enum_type_size() const; void clear_enum_type(); static const int kEnumTypeFieldNumber = 5; - ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* mutable_enum_type(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >* mutable_enum_type(); - const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const; - ::google::protobuf::EnumDescriptorProto* add_enum_type(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& enum_type(int index) const; + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* add_enum_type(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& enum_type() const; // repeated .google.protobuf.ServiceDescriptorProto service = 6; int service_size() const; void clear_service(); static const int kServiceFieldNumber = 6; - ::google::protobuf::ServiceDescriptorProto* mutable_service(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >* + PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* mutable_service(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >* mutable_service(); - const ::google::protobuf::ServiceDescriptorProto& service(int index) const; - ::google::protobuf::ServiceDescriptorProto* add_service(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& service(int index) const; + PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* add_service(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >& service() const; // repeated .google.protobuf.FieldDescriptorProto extension = 7; int extension_size() const; void clear_extension(); static const int kExtensionFieldNumber = 7; - ::google::protobuf::FieldDescriptorProto* mutable_extension(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* mutable_extension(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* mutable_extension(); - const ::google::protobuf::FieldDescriptorProto& extension(int index) const; - ::google::protobuf::FieldDescriptorProto* add_extension(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& extension(int index) const; + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* add_extension(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& extension() const; // repeated int32 public_dependency = 10; int public_dependency_size() const; void clear_public_dependency(); static const int kPublicDependencyFieldNumber = 10; - ::google::protobuf::int32 public_dependency(int index) const; - void set_public_dependency(int index, ::google::protobuf::int32 value); - void add_public_dependency(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + ::PROTOBUF_NAMESPACE_ID::int32 public_dependency(int index) const; + void set_public_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& public_dependency() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* mutable_public_dependency(); // repeated int32 weak_dependency = 11; int weak_dependency_size() const; void clear_weak_dependency(); static const int kWeakDependencyFieldNumber = 11; - ::google::protobuf::int32 weak_dependency(int index) const; - void set_weak_dependency(int index, ::google::protobuf::int32 value); - void add_weak_dependency(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + ::PROTOBUF_NAMESPACE_ID::int32 weak_dependency(int index) const; + void set_weak_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& weak_dependency() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* mutable_weak_dependency(); // optional string name = 1; bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional string package = 2; bool has_package() const; void clear_package(); static const int kPackageFieldNumber = 2; - const ::std::string& package() const; - void set_package(const ::std::string& value); - #if LANG_CXX11 - void set_package(::std::string&& value); - #endif + const std::string& package() const; + void set_package(const std::string& value); + void set_package(std::string&& value); void set_package(const char* value); void set_package(const char* value, size_t size); - ::std::string* mutable_package(); - ::std::string* release_package(); - void set_allocated_package(::std::string* package); + std::string* mutable_package(); + std::string* release_package(); + void set_allocated_package(std::string* package); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_package(); + std::string* unsafe_arena_release_package(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_package( - ::std::string* package); + std::string* package); // optional string syntax = 12; bool has_syntax() const; void clear_syntax(); static const int kSyntaxFieldNumber = 12; - const ::std::string& syntax() const; - void set_syntax(const ::std::string& value); - #if LANG_CXX11 - void set_syntax(::std::string&& value); - #endif + const std::string& syntax() const; + void set_syntax(const std::string& value); + void set_syntax(std::string&& value); void set_syntax(const char* value); void set_syntax(const char* value, size_t size); - ::std::string* mutable_syntax(); - ::std::string* release_syntax(); - void set_allocated_syntax(::std::string* syntax); + std::string* mutable_syntax(); + std::string* release_syntax(); + void set_allocated_syntax(std::string* syntax); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_syntax(); + std::string* unsafe_arena_release_syntax(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_syntax( - ::std::string* syntax); + std::string* syntax); // optional .google.protobuf.FileOptions options = 8; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 8; - const ::google::protobuf::FileOptions& options() const; - ::google::protobuf::FileOptions* release_options(); - ::google::protobuf::FileOptions* mutable_options(); - void set_allocated_options(::google::protobuf::FileOptions* options); + const PROTOBUF_NAMESPACE_ID::FileOptions& options() const; + PROTOBUF_NAMESPACE_ID::FileOptions* release_options(); + PROTOBUF_NAMESPACE_ID::FileOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::FileOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::FileOptions* options); - ::google::protobuf::FileOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::FileOptions* options); + PROTOBUF_NAMESPACE_ID::FileOptions* unsafe_arena_release_options(); // optional .google.protobuf.SourceCodeInfo source_code_info = 9; bool has_source_code_info() const; void clear_source_code_info(); static const int kSourceCodeInfoFieldNumber = 9; - const ::google::protobuf::SourceCodeInfo& source_code_info() const; - ::google::protobuf::SourceCodeInfo* release_source_code_info(); - ::google::protobuf::SourceCodeInfo* mutable_source_code_info(); - void set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info); + const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& source_code_info() const; + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* release_source_code_info(); + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* mutable_source_code_info(); + void set_allocated_source_code_info(PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info); void unsafe_arena_set_allocated_source_code_info( - ::google::protobuf::SourceCodeInfo* source_code_info); - ::google::protobuf::SourceCodeInfo* unsafe_arena_release_source_code_info(); + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info); + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* unsafe_arena_release_source_code_info(); // @@protoc_insertion_point(class_scope:google.protobuf.FileDescriptorProto) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField<::std::string> dependency_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto > message_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto > enum_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto > service_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > public_dependency_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > weak_dependency_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr package_; - ::google::protobuf::internal::ArenaStringPtr syntax_; - ::google::protobuf::FileOptions* options_; - ::google::protobuf::SourceCodeInfo* source_code_info_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField dependency_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto > message_type_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto > enum_type_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto > service_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > extension_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > public_dependency_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > weak_dependency_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr package_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr syntax_; + PROTOBUF_NAMESPACE_ID::FileOptions* options_; + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ExtensionRange) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ExtensionRange) */ { public: DescriptorProto_ExtensionRange(); virtual ~DescriptorProto_ExtensionRange(); DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from); - - inline DescriptorProto_ExtensionRange& operator=(const DescriptorProto_ExtensionRange& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 DescriptorProto_ExtensionRange(DescriptorProto_ExtensionRange&& from) noexcept : DescriptorProto_ExtensionRange() { *this = ::std::move(from); } + inline DescriptorProto_ExtensionRange& operator=(const DescriptorProto_ExtensionRange& from) { + CopyFrom(from); + return *this; + } inline DescriptorProto_ExtensionRange& operator=(DescriptorProto_ExtensionRange&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -811,21 +792,21 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const DescriptorProto_ExtensionRange& default_instance(); @@ -850,11 +831,11 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : return CreateMaybeMessage(nullptr); } - DescriptorProto_ExtensionRange* New(::google::protobuf::Arena* arena) const final { + DescriptorProto_ExtensionRange* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const DescriptorProto_ExtensionRange& from); void MergeFrom(const DescriptorProto_ExtensionRange& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -862,15 +843,15 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -878,17 +859,17 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto_ExtensionRange* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.DescriptorProto.ExtensionRange"; } protected: - explicit DescriptorProto_ExtensionRange(::google::protobuf::Arena* arena); + explicit DescriptorProto_ExtensionRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -896,7 +877,7 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -906,63 +887,61 @@ class PROTOBUF_EXPORT DescriptorProto_ExtensionRange final : bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 3; - const ::google::protobuf::ExtensionRangeOptions& options() const; - ::google::protobuf::ExtensionRangeOptions* release_options(); - ::google::protobuf::ExtensionRangeOptions* mutable_options(); - void set_allocated_options(::google::protobuf::ExtensionRangeOptions* options); + const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& options() const; + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* release_options(); + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::ExtensionRangeOptions* options); - ::google::protobuf::ExtensionRangeOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options); + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* unsafe_arena_release_options(); // optional int32 start = 1; bool has_start() const; void clear_start(); static const int kStartFieldNumber = 1; - ::google::protobuf::int32 start() const; - void set_start(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 start() const; + void set_start(::PROTOBUF_NAMESPACE_ID::int32 value); // optional int32 end = 2; bool has_end() const; void clear_end(); static const int kEndFieldNumber = 2; - ::google::protobuf::int32 end() const; - void set_end(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 end() const; + void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ExtensionRange) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::ExtensionRangeOptions* options_; - ::google::protobuf::int32 start_; - ::google::protobuf::int32 end_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options_; + ::PROTOBUF_NAMESPACE_ID::int32 start_; + ::PROTOBUF_NAMESPACE_ID::int32 end_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ReservedRange) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto.ReservedRange) */ { public: DescriptorProto_ReservedRange(); virtual ~DescriptorProto_ReservedRange(); DescriptorProto_ReservedRange(const DescriptorProto_ReservedRange& from); - - inline DescriptorProto_ReservedRange& operator=(const DescriptorProto_ReservedRange& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 DescriptorProto_ReservedRange(DescriptorProto_ReservedRange&& from) noexcept : DescriptorProto_ReservedRange() { *this = ::std::move(from); } + inline DescriptorProto_ReservedRange& operator=(const DescriptorProto_ReservedRange& from) { + CopyFrom(from); + return *this; + } inline DescriptorProto_ReservedRange& operator=(DescriptorProto_ReservedRange&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -971,21 +950,21 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const DescriptorProto_ReservedRange& default_instance(); @@ -1010,11 +989,11 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : return CreateMaybeMessage(nullptr); } - DescriptorProto_ReservedRange* New(::google::protobuf::Arena* arena) const final { + DescriptorProto_ReservedRange* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const DescriptorProto_ReservedRange& from); void MergeFrom(const DescriptorProto_ReservedRange& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1022,15 +1001,15 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1038,17 +1017,17 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto_ReservedRange* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.DescriptorProto.ReservedRange"; } protected: - explicit DescriptorProto_ReservedRange(::google::protobuf::Arena* arena); + explicit DescriptorProto_ReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -1056,7 +1035,7 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1066,50 +1045,48 @@ class PROTOBUF_EXPORT DescriptorProto_ReservedRange final : bool has_start() const; void clear_start(); static const int kStartFieldNumber = 1; - ::google::protobuf::int32 start() const; - void set_start(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 start() const; + void set_start(::PROTOBUF_NAMESPACE_ID::int32 value); // optional int32 end = 2; bool has_end() const; void clear_end(); static const int kEndFieldNumber = 2; - ::google::protobuf::int32 end() const; - void set_end(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 end() const; + void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto.ReservedRange) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::int32 start_; - ::google::protobuf::int32 end_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::int32 start_; + ::PROTOBUF_NAMESPACE_ID::int32 end_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT DescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DescriptorProto) */ { public: DescriptorProto(); virtual ~DescriptorProto(); DescriptorProto(const DescriptorProto& from); - - inline DescriptorProto& operator=(const DescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 DescriptorProto(DescriptorProto&& from) noexcept : DescriptorProto() { *this = ::std::move(from); } + inline DescriptorProto& operator=(const DescriptorProto& from) { + CopyFrom(from); + return *this; + } inline DescriptorProto& operator=(DescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1118,21 +1095,21 @@ class PROTOBUF_EXPORT DescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const DescriptorProto& default_instance(); @@ -1157,11 +1134,11 @@ class PROTOBUF_EXPORT DescriptorProto final : return CreateMaybeMessage(nullptr); } - DescriptorProto* New(::google::protobuf::Arena* arena) const final { + DescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const DescriptorProto& from); void MergeFrom(const DescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1169,15 +1146,15 @@ class PROTOBUF_EXPORT DescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1185,17 +1162,17 @@ class PROTOBUF_EXPORT DescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.DescriptorProto"; } protected: - explicit DescriptorProto(::google::protobuf::Arena* arena); + explicit DescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -1203,7 +1180,7 @@ class PROTOBUF_EXPORT DescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1216,186 +1193,178 @@ class PROTOBUF_EXPORT DescriptorProto final : int field_size() const; void clear_field(); static const int kFieldFieldNumber = 2; - ::google::protobuf::FieldDescriptorProto* mutable_field(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* mutable_field(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* mutable_field(); - const ::google::protobuf::FieldDescriptorProto& field(int index) const; - ::google::protobuf::FieldDescriptorProto* add_field(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& field(int index) const; + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* add_field(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& field() const; // repeated .google.protobuf.DescriptorProto nested_type = 3; int nested_type_size() const; void clear_nested_type(); static const int kNestedTypeFieldNumber = 3; - ::google::protobuf::DescriptorProto* mutable_nested_type(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* + PROTOBUF_NAMESPACE_ID::DescriptorProto* mutable_nested_type(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >* mutable_nested_type(); - const ::google::protobuf::DescriptorProto& nested_type(int index) const; - ::google::protobuf::DescriptorProto* add_nested_type(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& + const PROTOBUF_NAMESPACE_ID::DescriptorProto& nested_type(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto* add_nested_type(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& nested_type() const; // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; int enum_type_size() const; void clear_enum_type(); static const int kEnumTypeFieldNumber = 4; - ::google::protobuf::EnumDescriptorProto* mutable_enum_type(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* mutable_enum_type(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >* mutable_enum_type(); - const ::google::protobuf::EnumDescriptorProto& enum_type(int index) const; - ::google::protobuf::EnumDescriptorProto* add_enum_type(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& enum_type(int index) const; + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* add_enum_type(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& enum_type() const; // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; int extension_range_size() const; void clear_extension_range(); static const int kExtensionRangeFieldNumber = 5; - ::google::protobuf::DescriptorProto_ExtensionRange* mutable_extension_range(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >* + PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* mutable_extension_range(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >* mutable_extension_range(); - const ::google::protobuf::DescriptorProto_ExtensionRange& extension_range(int index) const; - ::google::protobuf::DescriptorProto_ExtensionRange* add_extension_range(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >& + const PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange& extension_range(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* add_extension_range(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >& extension_range() const; // repeated .google.protobuf.FieldDescriptorProto extension = 6; int extension_size() const; void clear_extension(); static const int kExtensionFieldNumber = 6; - ::google::protobuf::FieldDescriptorProto* mutable_extension(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* mutable_extension(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* mutable_extension(); - const ::google::protobuf::FieldDescriptorProto& extension(int index) const; - ::google::protobuf::FieldDescriptorProto* add_extension(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& extension(int index) const; + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* add_extension(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& extension() const; // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; int oneof_decl_size() const; void clear_oneof_decl(); static const int kOneofDeclFieldNumber = 8; - ::google::protobuf::OneofDescriptorProto* mutable_oneof_decl(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >* + PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* mutable_oneof_decl(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >* mutable_oneof_decl(); - const ::google::protobuf::OneofDescriptorProto& oneof_decl(int index) const; - ::google::protobuf::OneofDescriptorProto* add_oneof_decl(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::OneofDescriptorProto& oneof_decl(int index) const; + PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* add_oneof_decl(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >& oneof_decl() const; // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; int reserved_range_size() const; void clear_reserved_range(); static const int kReservedRangeFieldNumber = 9; - ::google::protobuf::DescriptorProto_ReservedRange* mutable_reserved_range(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >* + PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* mutable_reserved_range(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >* mutable_reserved_range(); - const ::google::protobuf::DescriptorProto_ReservedRange& reserved_range(int index) const; - ::google::protobuf::DescriptorProto_ReservedRange* add_reserved_range(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >& + const PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange& reserved_range(int index) const; + PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* add_reserved_range(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >& reserved_range() const; // repeated string reserved_name = 10; int reserved_name_size() const; void clear_reserved_name(); static const int kReservedNameFieldNumber = 10; - const ::std::string& reserved_name(int index) const; - ::std::string* mutable_reserved_name(int index); - void set_reserved_name(int index, const ::std::string& value); - #if LANG_CXX11 - void set_reserved_name(int index, ::std::string&& value); - #endif + const std::string& reserved_name(int index) const; + std::string* mutable_reserved_name(int index); + void set_reserved_name(int index, const std::string& value); + void set_reserved_name(int index, std::string&& value); void set_reserved_name(int index, const char* value); void set_reserved_name(int index, const char* value, size_t size); - ::std::string* add_reserved_name(); - void add_reserved_name(const ::std::string& value); - #if LANG_CXX11 - void add_reserved_name(::std::string&& value); - #endif + std::string* add_reserved_name(); + void add_reserved_name(const std::string& value); + void add_reserved_name(std::string&& value); void add_reserved_name(const char* value); void add_reserved_name(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& reserved_name() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_reserved_name(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& reserved_name() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_reserved_name(); // optional string name = 1; bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional .google.protobuf.MessageOptions options = 7; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 7; - const ::google::protobuf::MessageOptions& options() const; - ::google::protobuf::MessageOptions* release_options(); - ::google::protobuf::MessageOptions* mutable_options(); - void set_allocated_options(::google::protobuf::MessageOptions* options); + const PROTOBUF_NAMESPACE_ID::MessageOptions& options() const; + PROTOBUF_NAMESPACE_ID::MessageOptions* release_options(); + PROTOBUF_NAMESPACE_ID::MessageOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::MessageOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::MessageOptions* options); - ::google::protobuf::MessageOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::MessageOptions* options); + PROTOBUF_NAMESPACE_ID::MessageOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.DescriptorProto) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > field_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto > nested_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto > enum_type_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange > extension_range_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto > extension_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto > oneof_decl_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange > reserved_range_; - ::google::protobuf::RepeatedPtrField<::std::string> reserved_name_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::MessageOptions* options_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > field_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto > nested_type_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto > enum_type_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange > extension_range_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto > extension_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto > oneof_decl_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange > reserved_range_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField reserved_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + PROTOBUF_NAMESPACE_ID::MessageOptions* options_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT ExtensionRangeOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ExtensionRangeOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ExtensionRangeOptions) */ { public: ExtensionRangeOptions(); virtual ~ExtensionRangeOptions(); ExtensionRangeOptions(const ExtensionRangeOptions& from); - - inline ExtensionRangeOptions& operator=(const ExtensionRangeOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ExtensionRangeOptions(ExtensionRangeOptions&& from) noexcept : ExtensionRangeOptions() { *this = ::std::move(from); } + inline ExtensionRangeOptions& operator=(const ExtensionRangeOptions& from) { + CopyFrom(from); + return *this; + } inline ExtensionRangeOptions& operator=(ExtensionRangeOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1404,21 +1373,21 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const ExtensionRangeOptions& default_instance(); @@ -1443,11 +1412,11 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : return CreateMaybeMessage(nullptr); } - ExtensionRangeOptions* New(::google::protobuf::Arena* arena) const final { + ExtensionRangeOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ExtensionRangeOptions& from); void MergeFrom(const ExtensionRangeOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1455,15 +1424,15 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1471,17 +1440,17 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ExtensionRangeOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.ExtensionRangeOptions"; } protected: - explicit ExtensionRangeOptions(::google::protobuf::Arena* arena); + explicit ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -1489,7 +1458,7 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1499,12 +1468,12 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(ExtensionRangeOptions) @@ -1512,37 +1481,35 @@ class PROTOBUF_EXPORT ExtensionRangeOptions final : private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT FieldDescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldDescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldDescriptorProto) */ { public: FieldDescriptorProto(); virtual ~FieldDescriptorProto(); FieldDescriptorProto(const FieldDescriptorProto& from); - - inline FieldDescriptorProto& operator=(const FieldDescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 FieldDescriptorProto(FieldDescriptorProto&& from) noexcept : FieldDescriptorProto() { *this = ::std::move(from); } + inline FieldDescriptorProto& operator=(const FieldDescriptorProto& from) { + CopyFrom(from); + return *this; + } inline FieldDescriptorProto& operator=(FieldDescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1551,21 +1518,21 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const FieldDescriptorProto& default_instance(); @@ -1590,11 +1557,11 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : return CreateMaybeMessage(nullptr); } - FieldDescriptorProto* New(::google::protobuf::Arena* arena) const final { + FieldDescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const FieldDescriptorProto& from); void MergeFrom(const FieldDescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1602,15 +1569,15 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -1618,17 +1585,17 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FieldDescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.FieldDescriptorProto"; } protected: - explicit FieldDescriptorProto(::google::protobuf::Arena* arena); + explicit FieldDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -1636,7 +1603,7 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -1686,14 +1653,14 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : FieldDescriptorProto_Type_Type_MAX; static constexpr int Type_ARRAYSIZE = FieldDescriptorProto_Type_Type_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Type_descriptor() { return FieldDescriptorProto_Type_descriptor(); } - static inline const ::std::string& Type_Name(Type value) { + static inline const std::string& Type_Name(Type value) { return FieldDescriptorProto_Type_Name(value); } - static inline bool Type_Parse(const ::std::string& name, + static inline bool Type_Parse(const std::string& name, Type* value) { return FieldDescriptorProto_Type_Parse(name, value); } @@ -1714,14 +1681,14 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : FieldDescriptorProto_Label_Label_MAX; static constexpr int Label_ARRAYSIZE = FieldDescriptorProto_Label_Label_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Label_descriptor() { return FieldDescriptorProto_Label_descriptor(); } - static inline const ::std::string& Label_Name(Label value) { + static inline const std::string& Label_Name(Label value) { return FieldDescriptorProto_Label_Name(value); } - static inline bool Label_Parse(const ::std::string& name, + static inline bool Label_Parse(const std::string& name, Label* value) { return FieldDescriptorProto_Label_Parse(name, value); } @@ -1732,180 +1699,170 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional string extendee = 2; bool has_extendee() const; void clear_extendee(); static const int kExtendeeFieldNumber = 2; - const ::std::string& extendee() const; - void set_extendee(const ::std::string& value); - #if LANG_CXX11 - void set_extendee(::std::string&& value); - #endif + const std::string& extendee() const; + void set_extendee(const std::string& value); + void set_extendee(std::string&& value); void set_extendee(const char* value); void set_extendee(const char* value, size_t size); - ::std::string* mutable_extendee(); - ::std::string* release_extendee(); - void set_allocated_extendee(::std::string* extendee); + std::string* mutable_extendee(); + std::string* release_extendee(); + void set_allocated_extendee(std::string* extendee); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_extendee(); + std::string* unsafe_arena_release_extendee(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_extendee( - ::std::string* extendee); + std::string* extendee); // optional string type_name = 6; bool has_type_name() const; void clear_type_name(); static const int kTypeNameFieldNumber = 6; - const ::std::string& type_name() const; - void set_type_name(const ::std::string& value); - #if LANG_CXX11 - void set_type_name(::std::string&& value); - #endif + const std::string& type_name() const; + void set_type_name(const std::string& value); + void set_type_name(std::string&& value); void set_type_name(const char* value); void set_type_name(const char* value, size_t size); - ::std::string* mutable_type_name(); - ::std::string* release_type_name(); - void set_allocated_type_name(::std::string* type_name); + std::string* mutable_type_name(); + std::string* release_type_name(); + void set_allocated_type_name(std::string* type_name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_type_name(); + std::string* unsafe_arena_release_type_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_type_name( - ::std::string* type_name); + std::string* type_name); // optional string default_value = 7; bool has_default_value() const; void clear_default_value(); static const int kDefaultValueFieldNumber = 7; - const ::std::string& default_value() const; - void set_default_value(const ::std::string& value); - #if LANG_CXX11 - void set_default_value(::std::string&& value); - #endif + const std::string& default_value() const; + void set_default_value(const std::string& value); + void set_default_value(std::string&& value); void set_default_value(const char* value); void set_default_value(const char* value, size_t size); - ::std::string* mutable_default_value(); - ::std::string* release_default_value(); - void set_allocated_default_value(::std::string* default_value); + std::string* mutable_default_value(); + std::string* release_default_value(); + void set_allocated_default_value(std::string* default_value); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_default_value(); + std::string* unsafe_arena_release_default_value(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_default_value( - ::std::string* default_value); + std::string* default_value); // optional string json_name = 10; bool has_json_name() const; void clear_json_name(); static const int kJsonNameFieldNumber = 10; - const ::std::string& json_name() const; - void set_json_name(const ::std::string& value); - #if LANG_CXX11 - void set_json_name(::std::string&& value); - #endif + const std::string& json_name() const; + void set_json_name(const std::string& value); + void set_json_name(std::string&& value); void set_json_name(const char* value); void set_json_name(const char* value, size_t size); - ::std::string* mutable_json_name(); - ::std::string* release_json_name(); - void set_allocated_json_name(::std::string* json_name); + std::string* mutable_json_name(); + std::string* release_json_name(); + void set_allocated_json_name(std::string* json_name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_json_name(); + std::string* unsafe_arena_release_json_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_json_name( - ::std::string* json_name); + std::string* json_name); // optional .google.protobuf.FieldOptions options = 8; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 8; - const ::google::protobuf::FieldOptions& options() const; - ::google::protobuf::FieldOptions* release_options(); - ::google::protobuf::FieldOptions* mutable_options(); - void set_allocated_options(::google::protobuf::FieldOptions* options); + const PROTOBUF_NAMESPACE_ID::FieldOptions& options() const; + PROTOBUF_NAMESPACE_ID::FieldOptions* release_options(); + PROTOBUF_NAMESPACE_ID::FieldOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::FieldOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::FieldOptions* options); - ::google::protobuf::FieldOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::FieldOptions* options); + PROTOBUF_NAMESPACE_ID::FieldOptions* unsafe_arena_release_options(); // optional int32 number = 3; bool has_number() const; void clear_number(); static const int kNumberFieldNumber = 3; - ::google::protobuf::int32 number() const; - void set_number(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 number() const; + void set_number(::PROTOBUF_NAMESPACE_ID::int32 value); // optional int32 oneof_index = 9; bool has_oneof_index() const; void clear_oneof_index(); static const int kOneofIndexFieldNumber = 9; - ::google::protobuf::int32 oneof_index() const; - void set_oneof_index(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 oneof_index() const; + void set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value); // optional .google.protobuf.FieldDescriptorProto.Label label = 4; bool has_label() const; void clear_label(); static const int kLabelFieldNumber = 4; - ::google::protobuf::FieldDescriptorProto_Label label() const; - void set_label(::google::protobuf::FieldDescriptorProto_Label value); + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label label() const; + void set_label(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value); // optional .google.protobuf.FieldDescriptorProto.Type type = 5; bool has_type() const; void clear_type(); static const int kTypeFieldNumber = 5; - ::google::protobuf::FieldDescriptorProto_Type type() const; - void set_type(::google::protobuf::FieldDescriptorProto_Type value); + PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type type() const; + void set_type(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value); // @@protoc_insertion_point(class_scope:google.protobuf.FieldDescriptorProto) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr extendee_; - ::google::protobuf::internal::ArenaStringPtr type_name_; - ::google::protobuf::internal::ArenaStringPtr default_value_; - ::google::protobuf::internal::ArenaStringPtr json_name_; - ::google::protobuf::FieldOptions* options_; - ::google::protobuf::int32 number_; - ::google::protobuf::int32 oneof_index_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr extendee_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr json_name_; + PROTOBUF_NAMESPACE_ID::FieldOptions* options_; + ::PROTOBUF_NAMESPACE_ID::int32 number_; + ::PROTOBUF_NAMESPACE_ID::int32 oneof_index_; int label_; int type_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -1913,23 +1870,21 @@ class PROTOBUF_EXPORT FieldDescriptorProto final : // ------------------------------------------------------------------- class PROTOBUF_EXPORT OneofDescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofDescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofDescriptorProto) */ { public: OneofDescriptorProto(); virtual ~OneofDescriptorProto(); OneofDescriptorProto(const OneofDescriptorProto& from); - - inline OneofDescriptorProto& operator=(const OneofDescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 OneofDescriptorProto(OneofDescriptorProto&& from) noexcept : OneofDescriptorProto() { *this = ::std::move(from); } + inline OneofDescriptorProto& operator=(const OneofDescriptorProto& from) { + CopyFrom(from); + return *this; + } inline OneofDescriptorProto& operator=(OneofDescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1938,21 +1893,21 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const OneofDescriptorProto& default_instance(); @@ -1977,11 +1932,11 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : return CreateMaybeMessage(nullptr); } - OneofDescriptorProto* New(::google::protobuf::Arena* arena) const final { + OneofDescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const OneofDescriptorProto& from); void MergeFrom(const OneofDescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -1989,15 +1944,15 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2005,17 +1960,17 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(OneofDescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.OneofDescriptorProto"; } protected: - explicit OneofDescriptorProto(::google::protobuf::Arena* arena); + explicit OneofDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -2023,7 +1978,7 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -2033,72 +1988,68 @@ class PROTOBUF_EXPORT OneofDescriptorProto final : bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional .google.protobuf.OneofOptions options = 2; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 2; - const ::google::protobuf::OneofOptions& options() const; - ::google::protobuf::OneofOptions* release_options(); - ::google::protobuf::OneofOptions* mutable_options(); - void set_allocated_options(::google::protobuf::OneofOptions* options); + const PROTOBUF_NAMESPACE_ID::OneofOptions& options() const; + PROTOBUF_NAMESPACE_ID::OneofOptions* release_options(); + PROTOBUF_NAMESPACE_ID::OneofOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::OneofOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::OneofOptions* options); - ::google::protobuf::OneofOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::OneofOptions* options); + PROTOBUF_NAMESPACE_ID::OneofOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.OneofDescriptorProto) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::OneofOptions* options_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + PROTOBUF_NAMESPACE_ID::OneofOptions* options_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto.EnumReservedRange) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto.EnumReservedRange) */ { public: EnumDescriptorProto_EnumReservedRange(); virtual ~EnumDescriptorProto_EnumReservedRange(); EnumDescriptorProto_EnumReservedRange(const EnumDescriptorProto_EnumReservedRange& from); - - inline EnumDescriptorProto_EnumReservedRange& operator=(const EnumDescriptorProto_EnumReservedRange& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 EnumDescriptorProto_EnumReservedRange(EnumDescriptorProto_EnumReservedRange&& from) noexcept : EnumDescriptorProto_EnumReservedRange() { *this = ::std::move(from); } + inline EnumDescriptorProto_EnumReservedRange& operator=(const EnumDescriptorProto_EnumReservedRange& from) { + CopyFrom(from); + return *this; + } inline EnumDescriptorProto_EnumReservedRange& operator=(EnumDescriptorProto_EnumReservedRange&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2107,21 +2058,21 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const EnumDescriptorProto_EnumReservedRange& default_instance(); @@ -2146,11 +2097,11 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : return CreateMaybeMessage(nullptr); } - EnumDescriptorProto_EnumReservedRange* New(::google::protobuf::Arena* arena) const final { + EnumDescriptorProto_EnumReservedRange* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const EnumDescriptorProto_EnumReservedRange& from); void MergeFrom(const EnumDescriptorProto_EnumReservedRange& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -2158,15 +2109,15 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2174,17 +2125,17 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumDescriptorProto_EnumReservedRange* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.EnumDescriptorProto.EnumReservedRange"; } protected: - explicit EnumDescriptorProto_EnumReservedRange(::google::protobuf::Arena* arena); + explicit EnumDescriptorProto_EnumReservedRange(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -2192,7 +2143,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -2202,50 +2153,48 @@ class PROTOBUF_EXPORT EnumDescriptorProto_EnumReservedRange final : bool has_start() const; void clear_start(); static const int kStartFieldNumber = 1; - ::google::protobuf::int32 start() const; - void set_start(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 start() const; + void set_start(::PROTOBUF_NAMESPACE_ID::int32 value); // optional int32 end = 2; bool has_end() const; void clear_end(); static const int kEndFieldNumber = 2; - ::google::protobuf::int32 end() const; - void set_end(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 end() const; + void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto.EnumReservedRange) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::int32 start_; - ::google::protobuf::int32 end_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::int32 start_; + ::PROTOBUF_NAMESPACE_ID::int32 end_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT EnumDescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumDescriptorProto) */ { public: EnumDescriptorProto(); virtual ~EnumDescriptorProto(); EnumDescriptorProto(const EnumDescriptorProto& from); - - inline EnumDescriptorProto& operator=(const EnumDescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 EnumDescriptorProto(EnumDescriptorProto&& from) noexcept : EnumDescriptorProto() { *this = ::std::move(from); } + inline EnumDescriptorProto& operator=(const EnumDescriptorProto& from) { + CopyFrom(from); + return *this; + } inline EnumDescriptorProto& operator=(EnumDescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2254,21 +2203,21 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const EnumDescriptorProto& default_instance(); @@ -2293,11 +2242,11 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : return CreateMaybeMessage(nullptr); } - EnumDescriptorProto* New(::google::protobuf::Arena* arena) const final { + EnumDescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const EnumDescriptorProto& from); void MergeFrom(const EnumDescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -2305,15 +2254,15 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2321,17 +2270,17 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumDescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.EnumDescriptorProto"; } protected: - explicit EnumDescriptorProto(::google::protobuf::Arena* arena); + explicit EnumDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -2339,7 +2288,7 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -2351,121 +2300,113 @@ class PROTOBUF_EXPORT EnumDescriptorProto final : int value_size() const; void clear_value(); static const int kValueFieldNumber = 2; - ::google::protobuf::EnumValueDescriptorProto* mutable_value(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >* + PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* mutable_value(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >* mutable_value(); - const ::google::protobuf::EnumValueDescriptorProto& value(int index) const; - ::google::protobuf::EnumValueDescriptorProto* add_value(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& value(int index) const; + PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* add_value(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >& value() const; // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; int reserved_range_size() const; void clear_reserved_range(); static const int kReservedRangeFieldNumber = 4; - ::google::protobuf::EnumDescriptorProto_EnumReservedRange* mutable_reserved_range(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto_EnumReservedRange >* + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* mutable_reserved_range(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >* mutable_reserved_range(); - const ::google::protobuf::EnumDescriptorProto_EnumReservedRange& reserved_range(int index) const; - ::google::protobuf::EnumDescriptorProto_EnumReservedRange* add_reserved_range(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto_EnumReservedRange >& + const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange& reserved_range(int index) const; + PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* add_reserved_range(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >& reserved_range() const; // repeated string reserved_name = 5; int reserved_name_size() const; void clear_reserved_name(); static const int kReservedNameFieldNumber = 5; - const ::std::string& reserved_name(int index) const; - ::std::string* mutable_reserved_name(int index); - void set_reserved_name(int index, const ::std::string& value); - #if LANG_CXX11 - void set_reserved_name(int index, ::std::string&& value); - #endif + const std::string& reserved_name(int index) const; + std::string* mutable_reserved_name(int index); + void set_reserved_name(int index, const std::string& value); + void set_reserved_name(int index, std::string&& value); void set_reserved_name(int index, const char* value); void set_reserved_name(int index, const char* value, size_t size); - ::std::string* add_reserved_name(); - void add_reserved_name(const ::std::string& value); - #if LANG_CXX11 - void add_reserved_name(::std::string&& value); - #endif + std::string* add_reserved_name(); + void add_reserved_name(const std::string& value); + void add_reserved_name(std::string&& value); void add_reserved_name(const char* value); void add_reserved_name(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& reserved_name() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_reserved_name(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& reserved_name() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_reserved_name(); // optional string name = 1; bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional .google.protobuf.EnumOptions options = 3; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 3; - const ::google::protobuf::EnumOptions& options() const; - ::google::protobuf::EnumOptions* release_options(); - ::google::protobuf::EnumOptions* mutable_options(); - void set_allocated_options(::google::protobuf::EnumOptions* options); + const PROTOBUF_NAMESPACE_ID::EnumOptions& options() const; + PROTOBUF_NAMESPACE_ID::EnumOptions* release_options(); + PROTOBUF_NAMESPACE_ID::EnumOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::EnumOptions* options); - ::google::protobuf::EnumOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::EnumOptions* options); + PROTOBUF_NAMESPACE_ID::EnumOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.EnumDescriptorProto) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto > value_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto_EnumReservedRange > reserved_range_; - ::google::protobuf::RepeatedPtrField<::std::string> reserved_name_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::EnumOptions* options_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto > value_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange > reserved_range_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField reserved_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + PROTOBUF_NAMESPACE_ID::EnumOptions* options_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT EnumValueDescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueDescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueDescriptorProto) */ { public: EnumValueDescriptorProto(); virtual ~EnumValueDescriptorProto(); EnumValueDescriptorProto(const EnumValueDescriptorProto& from); - - inline EnumValueDescriptorProto& operator=(const EnumValueDescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 EnumValueDescriptorProto(EnumValueDescriptorProto&& from) noexcept : EnumValueDescriptorProto() { *this = ::std::move(from); } + inline EnumValueDescriptorProto& operator=(const EnumValueDescriptorProto& from) { + CopyFrom(from); + return *this; + } inline EnumValueDescriptorProto& operator=(EnumValueDescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2474,21 +2415,21 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const EnumValueDescriptorProto& default_instance(); @@ -2513,11 +2454,11 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : return CreateMaybeMessage(nullptr); } - EnumValueDescriptorProto* New(::google::protobuf::Arena* arena) const final { + EnumValueDescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const EnumValueDescriptorProto& from); void MergeFrom(const EnumValueDescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -2525,15 +2466,15 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2541,17 +2482,17 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumValueDescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.EnumValueDescriptorProto"; } protected: - explicit EnumValueDescriptorProto(::google::protobuf::Arena* arena); + explicit EnumValueDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -2559,7 +2500,7 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -2569,80 +2510,76 @@ class PROTOBUF_EXPORT EnumValueDescriptorProto final : bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional .google.protobuf.EnumValueOptions options = 3; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 3; - const ::google::protobuf::EnumValueOptions& options() const; - ::google::protobuf::EnumValueOptions* release_options(); - ::google::protobuf::EnumValueOptions* mutable_options(); - void set_allocated_options(::google::protobuf::EnumValueOptions* options); + const PROTOBUF_NAMESPACE_ID::EnumValueOptions& options() const; + PROTOBUF_NAMESPACE_ID::EnumValueOptions* release_options(); + PROTOBUF_NAMESPACE_ID::EnumValueOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumValueOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::EnumValueOptions* options); - ::google::protobuf::EnumValueOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::EnumValueOptions* options); + PROTOBUF_NAMESPACE_ID::EnumValueOptions* unsafe_arena_release_options(); // optional int32 number = 2; bool has_number() const; void clear_number(); static const int kNumberFieldNumber = 2; - ::google::protobuf::int32 number() const; - void set_number(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 number() const; + void set_number(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.EnumValueDescriptorProto) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::EnumValueOptions* options_; - ::google::protobuf::int32 number_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + PROTOBUF_NAMESPACE_ID::EnumValueOptions* options_; + ::PROTOBUF_NAMESPACE_ID::int32 number_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT ServiceDescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceDescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceDescriptorProto) */ { public: ServiceDescriptorProto(); virtual ~ServiceDescriptorProto(); ServiceDescriptorProto(const ServiceDescriptorProto& from); - - inline ServiceDescriptorProto& operator=(const ServiceDescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ServiceDescriptorProto(ServiceDescriptorProto&& from) noexcept : ServiceDescriptorProto() { *this = ::std::move(from); } + inline ServiceDescriptorProto& operator=(const ServiceDescriptorProto& from) { + CopyFrom(from); + return *this; + } inline ServiceDescriptorProto& operator=(ServiceDescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2651,21 +2588,21 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const ServiceDescriptorProto& default_instance(); @@ -2690,11 +2627,11 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : return CreateMaybeMessage(nullptr); } - ServiceDescriptorProto* New(::google::protobuf::Arena* arena) const final { + ServiceDescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ServiceDescriptorProto& from); void MergeFrom(const ServiceDescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -2702,15 +2639,15 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2718,17 +2655,17 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ServiceDescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.ServiceDescriptorProto"; } protected: - explicit ServiceDescriptorProto(::google::protobuf::Arena* arena); + explicit ServiceDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -2736,7 +2673,7 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -2746,85 +2683,81 @@ class PROTOBUF_EXPORT ServiceDescriptorProto final : int method_size() const; void clear_method(); static const int kMethodFieldNumber = 2; - ::google::protobuf::MethodDescriptorProto* mutable_method(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >* + PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* mutable_method(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >* mutable_method(); - const ::google::protobuf::MethodDescriptorProto& method(int index) const; - ::google::protobuf::MethodDescriptorProto* add_method(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >& + const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& method(int index) const; + PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* add_method(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >& method() const; // optional string name = 1; bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional .google.protobuf.ServiceOptions options = 3; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 3; - const ::google::protobuf::ServiceOptions& options() const; - ::google::protobuf::ServiceOptions* release_options(); - ::google::protobuf::ServiceOptions* mutable_options(); - void set_allocated_options(::google::protobuf::ServiceOptions* options); + const PROTOBUF_NAMESPACE_ID::ServiceOptions& options() const; + PROTOBUF_NAMESPACE_ID::ServiceOptions* release_options(); + PROTOBUF_NAMESPACE_ID::ServiceOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::ServiceOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::ServiceOptions* options); - ::google::protobuf::ServiceOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::ServiceOptions* options); + PROTOBUF_NAMESPACE_ID::ServiceOptions* unsafe_arena_release_options(); // @@protoc_insertion_point(class_scope:google.protobuf.ServiceDescriptorProto) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto > method_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::ServiceOptions* options_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto > method_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + PROTOBUF_NAMESPACE_ID::ServiceOptions* options_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT MethodDescriptorProto final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodDescriptorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodDescriptorProto) */ { public: MethodDescriptorProto(); virtual ~MethodDescriptorProto(); MethodDescriptorProto(const MethodDescriptorProto& from); - - inline MethodDescriptorProto& operator=(const MethodDescriptorProto& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 MethodDescriptorProto(MethodDescriptorProto&& from) noexcept : MethodDescriptorProto() { *this = ::std::move(from); } + inline MethodDescriptorProto& operator=(const MethodDescriptorProto& from) { + CopyFrom(from); + return *this; + } inline MethodDescriptorProto& operator=(MethodDescriptorProto&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2833,21 +2766,21 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const MethodDescriptorProto& default_instance(); @@ -2872,11 +2805,11 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : return CreateMaybeMessage(nullptr); } - MethodDescriptorProto* New(::google::protobuf::Arena* arena) const final { + MethodDescriptorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const MethodDescriptorProto& from); void MergeFrom(const MethodDescriptorProto& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -2884,15 +2817,15 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -2900,17 +2833,17 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MethodDescriptorProto* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.MethodDescriptorProto"; } protected: - explicit MethodDescriptorProto(::google::protobuf::Arena* arena); + explicit MethodDescriptorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -2918,7 +2851,7 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -2928,85 +2861,79 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : bool has_name() const; void clear_name(); static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name(); + std::string* unsafe_arena_release_name(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name( - ::std::string* name); + std::string* name); // optional string input_type = 2; bool has_input_type() const; void clear_input_type(); static const int kInputTypeFieldNumber = 2; - const ::std::string& input_type() const; - void set_input_type(const ::std::string& value); - #if LANG_CXX11 - void set_input_type(::std::string&& value); - #endif + const std::string& input_type() const; + void set_input_type(const std::string& value); + void set_input_type(std::string&& value); void set_input_type(const char* value); void set_input_type(const char* value, size_t size); - ::std::string* mutable_input_type(); - ::std::string* release_input_type(); - void set_allocated_input_type(::std::string* input_type); + std::string* mutable_input_type(); + std::string* release_input_type(); + void set_allocated_input_type(std::string* input_type); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_input_type(); + std::string* unsafe_arena_release_input_type(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_input_type( - ::std::string* input_type); + std::string* input_type); // optional string output_type = 3; bool has_output_type() const; void clear_output_type(); static const int kOutputTypeFieldNumber = 3; - const ::std::string& output_type() const; - void set_output_type(const ::std::string& value); - #if LANG_CXX11 - void set_output_type(::std::string&& value); - #endif + const std::string& output_type() const; + void set_output_type(const std::string& value); + void set_output_type(std::string&& value); void set_output_type(const char* value); void set_output_type(const char* value, size_t size); - ::std::string* mutable_output_type(); - ::std::string* release_output_type(); - void set_allocated_output_type(::std::string* output_type); + std::string* mutable_output_type(); + std::string* release_output_type(); + void set_allocated_output_type(std::string* output_type); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_output_type(); + std::string* unsafe_arena_release_output_type(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_output_type( - ::std::string* output_type); + std::string* output_type); // optional .google.protobuf.MethodOptions options = 4; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 4; - const ::google::protobuf::MethodOptions& options() const; - ::google::protobuf::MethodOptions* release_options(); - ::google::protobuf::MethodOptions* mutable_options(); - void set_allocated_options(::google::protobuf::MethodOptions* options); + const PROTOBUF_NAMESPACE_ID::MethodOptions& options() const; + PROTOBUF_NAMESPACE_ID::MethodOptions* release_options(); + PROTOBUF_NAMESPACE_ID::MethodOptions* mutable_options(); + void set_allocated_options(PROTOBUF_NAMESPACE_ID::MethodOptions* options); void unsafe_arena_set_allocated_options( - ::google::protobuf::MethodOptions* options); - ::google::protobuf::MethodOptions* unsafe_arena_release_options(); + PROTOBUF_NAMESPACE_ID::MethodOptions* options); + PROTOBUF_NAMESPACE_ID::MethodOptions* unsafe_arena_release_options(); // optional bool client_streaming = 5 [default = false]; bool has_client_streaming() const; @@ -3026,16 +2953,16 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr input_type_; - ::google::protobuf::internal::ArenaStringPtr output_type_; - ::google::protobuf::MethodOptions* options_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr input_type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr output_type_; + PROTOBUF_NAMESPACE_ID::MethodOptions* options_; bool client_streaming_; bool server_streaming_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -3043,23 +2970,21 @@ class PROTOBUF_EXPORT MethodDescriptorProto final : // ------------------------------------------------------------------- class PROTOBUF_EXPORT FileOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FileOptions) */ { public: FileOptions(); virtual ~FileOptions(); FileOptions(const FileOptions& from); - - inline FileOptions& operator=(const FileOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 FileOptions(FileOptions&& from) noexcept : FileOptions() { *this = ::std::move(from); } + inline FileOptions& operator=(const FileOptions& from) { + CopyFrom(from); + return *this; + } inline FileOptions& operator=(FileOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -3068,21 +2993,21 @@ class PROTOBUF_EXPORT FileOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const FileOptions& default_instance(); @@ -3107,11 +3032,11 @@ class PROTOBUF_EXPORT FileOptions final : return CreateMaybeMessage(nullptr); } - FileOptions* New(::google::protobuf::Arena* arena) const final { + FileOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const FileOptions& from); void MergeFrom(const FileOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -3119,15 +3044,15 @@ class PROTOBUF_EXPORT FileOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -3135,17 +3060,17 @@ class PROTOBUF_EXPORT FileOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FileOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.FileOptions"; } protected: - explicit FileOptions(::google::protobuf::Arena* arena); + explicit FileOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -3153,7 +3078,7 @@ class PROTOBUF_EXPORT FileOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -3173,14 +3098,14 @@ class PROTOBUF_EXPORT FileOptions final : FileOptions_OptimizeMode_OptimizeMode_MAX; static constexpr int OptimizeMode_ARRAYSIZE = FileOptions_OptimizeMode_OptimizeMode_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* OptimizeMode_descriptor() { return FileOptions_OptimizeMode_descriptor(); } - static inline const ::std::string& OptimizeMode_Name(OptimizeMode value) { + static inline const std::string& OptimizeMode_Name(OptimizeMode value) { return FileOptions_OptimizeMode_Name(value); } - static inline bool OptimizeMode_Parse(const ::std::string& name, + static inline bool OptimizeMode_Parse(const std::string& name, OptimizeMode* value) { return FileOptions_OptimizeMode_Parse(name, value); } @@ -3191,253 +3116,233 @@ class PROTOBUF_EXPORT FileOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; // optional string java_package = 1; bool has_java_package() const; void clear_java_package(); static const int kJavaPackageFieldNumber = 1; - const ::std::string& java_package() const; - void set_java_package(const ::std::string& value); - #if LANG_CXX11 - void set_java_package(::std::string&& value); - #endif + const std::string& java_package() const; + void set_java_package(const std::string& value); + void set_java_package(std::string&& value); void set_java_package(const char* value); void set_java_package(const char* value, size_t size); - ::std::string* mutable_java_package(); - ::std::string* release_java_package(); - void set_allocated_java_package(::std::string* java_package); + std::string* mutable_java_package(); + std::string* release_java_package(); + void set_allocated_java_package(std::string* java_package); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_java_package(); + std::string* unsafe_arena_release_java_package(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_java_package( - ::std::string* java_package); + std::string* java_package); // optional string java_outer_classname = 8; bool has_java_outer_classname() const; void clear_java_outer_classname(); static const int kJavaOuterClassnameFieldNumber = 8; - const ::std::string& java_outer_classname() const; - void set_java_outer_classname(const ::std::string& value); - #if LANG_CXX11 - void set_java_outer_classname(::std::string&& value); - #endif + const std::string& java_outer_classname() const; + void set_java_outer_classname(const std::string& value); + void set_java_outer_classname(std::string&& value); void set_java_outer_classname(const char* value); void set_java_outer_classname(const char* value, size_t size); - ::std::string* mutable_java_outer_classname(); - ::std::string* release_java_outer_classname(); - void set_allocated_java_outer_classname(::std::string* java_outer_classname); + std::string* mutable_java_outer_classname(); + std::string* release_java_outer_classname(); + void set_allocated_java_outer_classname(std::string* java_outer_classname); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_java_outer_classname(); + std::string* unsafe_arena_release_java_outer_classname(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_java_outer_classname( - ::std::string* java_outer_classname); + std::string* java_outer_classname); // optional string go_package = 11; bool has_go_package() const; void clear_go_package(); static const int kGoPackageFieldNumber = 11; - const ::std::string& go_package() const; - void set_go_package(const ::std::string& value); - #if LANG_CXX11 - void set_go_package(::std::string&& value); - #endif + const std::string& go_package() const; + void set_go_package(const std::string& value); + void set_go_package(std::string&& value); void set_go_package(const char* value); void set_go_package(const char* value, size_t size); - ::std::string* mutable_go_package(); - ::std::string* release_go_package(); - void set_allocated_go_package(::std::string* go_package); + std::string* mutable_go_package(); + std::string* release_go_package(); + void set_allocated_go_package(std::string* go_package); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_go_package(); + std::string* unsafe_arena_release_go_package(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_go_package( - ::std::string* go_package); + std::string* go_package); // optional string objc_class_prefix = 36; bool has_objc_class_prefix() const; void clear_objc_class_prefix(); static const int kObjcClassPrefixFieldNumber = 36; - const ::std::string& objc_class_prefix() const; - void set_objc_class_prefix(const ::std::string& value); - #if LANG_CXX11 - void set_objc_class_prefix(::std::string&& value); - #endif + const std::string& objc_class_prefix() const; + void set_objc_class_prefix(const std::string& value); + void set_objc_class_prefix(std::string&& value); void set_objc_class_prefix(const char* value); void set_objc_class_prefix(const char* value, size_t size); - ::std::string* mutable_objc_class_prefix(); - ::std::string* release_objc_class_prefix(); - void set_allocated_objc_class_prefix(::std::string* objc_class_prefix); + std::string* mutable_objc_class_prefix(); + std::string* release_objc_class_prefix(); + void set_allocated_objc_class_prefix(std::string* objc_class_prefix); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_objc_class_prefix(); + std::string* unsafe_arena_release_objc_class_prefix(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_objc_class_prefix( - ::std::string* objc_class_prefix); + std::string* objc_class_prefix); // optional string csharp_namespace = 37; bool has_csharp_namespace() const; void clear_csharp_namespace(); static const int kCsharpNamespaceFieldNumber = 37; - const ::std::string& csharp_namespace() const; - void set_csharp_namespace(const ::std::string& value); - #if LANG_CXX11 - void set_csharp_namespace(::std::string&& value); - #endif + const std::string& csharp_namespace() const; + void set_csharp_namespace(const std::string& value); + void set_csharp_namespace(std::string&& value); void set_csharp_namespace(const char* value); void set_csharp_namespace(const char* value, size_t size); - ::std::string* mutable_csharp_namespace(); - ::std::string* release_csharp_namespace(); - void set_allocated_csharp_namespace(::std::string* csharp_namespace); + std::string* mutable_csharp_namespace(); + std::string* release_csharp_namespace(); + void set_allocated_csharp_namespace(std::string* csharp_namespace); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_csharp_namespace(); + std::string* unsafe_arena_release_csharp_namespace(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_csharp_namespace( - ::std::string* csharp_namespace); + std::string* csharp_namespace); // optional string swift_prefix = 39; bool has_swift_prefix() const; void clear_swift_prefix(); static const int kSwiftPrefixFieldNumber = 39; - const ::std::string& swift_prefix() const; - void set_swift_prefix(const ::std::string& value); - #if LANG_CXX11 - void set_swift_prefix(::std::string&& value); - #endif + const std::string& swift_prefix() const; + void set_swift_prefix(const std::string& value); + void set_swift_prefix(std::string&& value); void set_swift_prefix(const char* value); void set_swift_prefix(const char* value, size_t size); - ::std::string* mutable_swift_prefix(); - ::std::string* release_swift_prefix(); - void set_allocated_swift_prefix(::std::string* swift_prefix); + std::string* mutable_swift_prefix(); + std::string* release_swift_prefix(); + void set_allocated_swift_prefix(std::string* swift_prefix); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_swift_prefix(); + std::string* unsafe_arena_release_swift_prefix(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_swift_prefix( - ::std::string* swift_prefix); + std::string* swift_prefix); // optional string php_class_prefix = 40; bool has_php_class_prefix() const; void clear_php_class_prefix(); static const int kPhpClassPrefixFieldNumber = 40; - const ::std::string& php_class_prefix() const; - void set_php_class_prefix(const ::std::string& value); - #if LANG_CXX11 - void set_php_class_prefix(::std::string&& value); - #endif + const std::string& php_class_prefix() const; + void set_php_class_prefix(const std::string& value); + void set_php_class_prefix(std::string&& value); void set_php_class_prefix(const char* value); void set_php_class_prefix(const char* value, size_t size); - ::std::string* mutable_php_class_prefix(); - ::std::string* release_php_class_prefix(); - void set_allocated_php_class_prefix(::std::string* php_class_prefix); + std::string* mutable_php_class_prefix(); + std::string* release_php_class_prefix(); + void set_allocated_php_class_prefix(std::string* php_class_prefix); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_php_class_prefix(); + std::string* unsafe_arena_release_php_class_prefix(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_php_class_prefix( - ::std::string* php_class_prefix); + std::string* php_class_prefix); // optional string php_namespace = 41; bool has_php_namespace() const; void clear_php_namespace(); static const int kPhpNamespaceFieldNumber = 41; - const ::std::string& php_namespace() const; - void set_php_namespace(const ::std::string& value); - #if LANG_CXX11 - void set_php_namespace(::std::string&& value); - #endif + const std::string& php_namespace() const; + void set_php_namespace(const std::string& value); + void set_php_namespace(std::string&& value); void set_php_namespace(const char* value); void set_php_namespace(const char* value, size_t size); - ::std::string* mutable_php_namespace(); - ::std::string* release_php_namespace(); - void set_allocated_php_namespace(::std::string* php_namespace); + std::string* mutable_php_namespace(); + std::string* release_php_namespace(); + void set_allocated_php_namespace(std::string* php_namespace); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_php_namespace(); + std::string* unsafe_arena_release_php_namespace(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_php_namespace( - ::std::string* php_namespace); + std::string* php_namespace); // optional string php_metadata_namespace = 44; bool has_php_metadata_namespace() const; void clear_php_metadata_namespace(); static const int kPhpMetadataNamespaceFieldNumber = 44; - const ::std::string& php_metadata_namespace() const; - void set_php_metadata_namespace(const ::std::string& value); - #if LANG_CXX11 - void set_php_metadata_namespace(::std::string&& value); - #endif + const std::string& php_metadata_namespace() const; + void set_php_metadata_namespace(const std::string& value); + void set_php_metadata_namespace(std::string&& value); void set_php_metadata_namespace(const char* value); void set_php_metadata_namespace(const char* value, size_t size); - ::std::string* mutable_php_metadata_namespace(); - ::std::string* release_php_metadata_namespace(); - void set_allocated_php_metadata_namespace(::std::string* php_metadata_namespace); + std::string* mutable_php_metadata_namespace(); + std::string* release_php_metadata_namespace(); + void set_allocated_php_metadata_namespace(std::string* php_metadata_namespace); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_php_metadata_namespace(); + std::string* unsafe_arena_release_php_metadata_namespace(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_php_metadata_namespace( - ::std::string* php_metadata_namespace); + std::string* php_metadata_namespace); // optional string ruby_package = 45; bool has_ruby_package() const; void clear_ruby_package(); static const int kRubyPackageFieldNumber = 45; - const ::std::string& ruby_package() const; - void set_ruby_package(const ::std::string& value); - #if LANG_CXX11 - void set_ruby_package(::std::string&& value); - #endif + const std::string& ruby_package() const; + void set_ruby_package(const std::string& value); + void set_ruby_package(std::string&& value); void set_ruby_package(const char* value); void set_ruby_package(const char* value, size_t size); - ::std::string* mutable_ruby_package(); - ::std::string* release_ruby_package(); - void set_allocated_ruby_package(::std::string* ruby_package); + std::string* mutable_ruby_package(); + std::string* release_ruby_package(); + void set_allocated_ruby_package(std::string* ruby_package); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_ruby_package(); + std::string* unsafe_arena_release_ruby_package(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_ruby_package( - ::std::string* ruby_package); + std::string* ruby_package); // optional bool java_multiple_files = 10 [default = false]; bool has_java_multiple_files() const; @@ -3506,33 +3411,33 @@ class PROTOBUF_EXPORT FileOptions final : bool has_optimize_for() const; void clear_optimize_for(); static const int kOptimizeForFieldNumber = 9; - ::google::protobuf::FileOptions_OptimizeMode optimize_for() const; - void set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value); + PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode optimize_for() const; + void set_optimize_for(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value); GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FileOptions) // @@protoc_insertion_point(class_scope:google.protobuf.FileOptions) private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; - ::google::protobuf::internal::ArenaStringPtr java_package_; - ::google::protobuf::internal::ArenaStringPtr java_outer_classname_; - ::google::protobuf::internal::ArenaStringPtr go_package_; - ::google::protobuf::internal::ArenaStringPtr objc_class_prefix_; - ::google::protobuf::internal::ArenaStringPtr csharp_namespace_; - ::google::protobuf::internal::ArenaStringPtr swift_prefix_; - ::google::protobuf::internal::ArenaStringPtr php_class_prefix_; - ::google::protobuf::internal::ArenaStringPtr php_namespace_; - ::google::protobuf::internal::ArenaStringPtr php_metadata_namespace_; - ::google::protobuf::internal::ArenaStringPtr ruby_package_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr java_package_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr java_outer_classname_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr go_package_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr objc_class_prefix_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr csharp_namespace_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr swift_prefix_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_class_prefix_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_namespace_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr php_metadata_namespace_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ruby_package_; bool java_multiple_files_; bool java_generate_equals_and_hash_; bool java_string_check_utf8_; @@ -3548,23 +3453,21 @@ class PROTOBUF_EXPORT FileOptions final : // ------------------------------------------------------------------- class PROTOBUF_EXPORT MessageOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MessageOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MessageOptions) */ { public: MessageOptions(); virtual ~MessageOptions(); MessageOptions(const MessageOptions& from); - - inline MessageOptions& operator=(const MessageOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 MessageOptions(MessageOptions&& from) noexcept : MessageOptions() { *this = ::std::move(from); } + inline MessageOptions& operator=(const MessageOptions& from) { + CopyFrom(from); + return *this; + } inline MessageOptions& operator=(MessageOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -3573,21 +3476,21 @@ class PROTOBUF_EXPORT MessageOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const MessageOptions& default_instance(); @@ -3612,11 +3515,11 @@ class PROTOBUF_EXPORT MessageOptions final : return CreateMaybeMessage(nullptr); } - MessageOptions* New(::google::protobuf::Arena* arena) const final { + MessageOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const MessageOptions& from); void MergeFrom(const MessageOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -3624,15 +3527,15 @@ class PROTOBUF_EXPORT MessageOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -3640,17 +3543,17 @@ class PROTOBUF_EXPORT MessageOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MessageOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.MessageOptions"; } protected: - explicit MessageOptions(::google::protobuf::Arena* arena); + explicit MessageOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -3658,7 +3561,7 @@ class PROTOBUF_EXPORT MessageOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -3668,12 +3571,12 @@ class PROTOBUF_EXPORT MessageOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; // optional bool message_set_wire_format = 1 [default = false]; @@ -3709,15 +3612,15 @@ class PROTOBUF_EXPORT MessageOptions final : private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; bool message_set_wire_format_; bool no_standard_descriptor_accessor_; bool deprecated_; @@ -3727,23 +3630,21 @@ class PROTOBUF_EXPORT MessageOptions final : // ------------------------------------------------------------------- class PROTOBUF_EXPORT FieldOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldOptions) */ { public: FieldOptions(); virtual ~FieldOptions(); FieldOptions(const FieldOptions& from); - - inline FieldOptions& operator=(const FieldOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 FieldOptions(FieldOptions&& from) noexcept : FieldOptions() { *this = ::std::move(from); } + inline FieldOptions& operator=(const FieldOptions& from) { + CopyFrom(from); + return *this; + } inline FieldOptions& operator=(FieldOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -3752,21 +3653,21 @@ class PROTOBUF_EXPORT FieldOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const FieldOptions& default_instance(); @@ -3791,11 +3692,11 @@ class PROTOBUF_EXPORT FieldOptions final : return CreateMaybeMessage(nullptr); } - FieldOptions* New(::google::protobuf::Arena* arena) const final { + FieldOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const FieldOptions& from); void MergeFrom(const FieldOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -3803,15 +3704,15 @@ class PROTOBUF_EXPORT FieldOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -3819,17 +3720,17 @@ class PROTOBUF_EXPORT FieldOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FieldOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.FieldOptions"; } protected: - explicit FieldOptions(::google::protobuf::Arena* arena); + explicit FieldOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -3837,7 +3738,7 @@ class PROTOBUF_EXPORT FieldOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -3857,14 +3758,14 @@ class PROTOBUF_EXPORT FieldOptions final : FieldOptions_CType_CType_MAX; static constexpr int CType_ARRAYSIZE = FieldOptions_CType_CType_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CType_descriptor() { return FieldOptions_CType_descriptor(); } - static inline const ::std::string& CType_Name(CType value) { + static inline const std::string& CType_Name(CType value) { return FieldOptions_CType_Name(value); } - static inline bool CType_Parse(const ::std::string& name, + static inline bool CType_Parse(const std::string& name, CType* value) { return FieldOptions_CType_Parse(name, value); } @@ -3885,14 +3786,14 @@ class PROTOBUF_EXPORT FieldOptions final : FieldOptions_JSType_JSType_MAX; static constexpr int JSType_ARRAYSIZE = FieldOptions_JSType_JSType_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* JSType_descriptor() { return FieldOptions_JSType_descriptor(); } - static inline const ::std::string& JSType_Name(JSType value) { + static inline const std::string& JSType_Name(JSType value) { return FieldOptions_JSType_Name(value); } - static inline bool JSType_Parse(const ::std::string& name, + static inline bool JSType_Parse(const std::string& name, JSType* value) { return FieldOptions_JSType_Parse(name, value); } @@ -3903,20 +3804,20 @@ class PROTOBUF_EXPORT FieldOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; bool has_ctype() const; void clear_ctype(); static const int kCtypeFieldNumber = 1; - ::google::protobuf::FieldOptions_CType ctype() const; - void set_ctype(::google::protobuf::FieldOptions_CType value); + PROTOBUF_NAMESPACE_ID::FieldOptions_CType ctype() const; + void set_ctype(PROTOBUF_NAMESPACE_ID::FieldOptions_CType value); // optional bool packed = 2; bool has_packed() const; @@ -3950,23 +3851,23 @@ class PROTOBUF_EXPORT FieldOptions final : bool has_jstype() const; void clear_jstype(); static const int kJstypeFieldNumber = 6; - ::google::protobuf::FieldOptions_JSType jstype() const; - void set_jstype(::google::protobuf::FieldOptions_JSType value); + PROTOBUF_NAMESPACE_ID::FieldOptions_JSType jstype() const; + void set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value); GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(FieldOptions) // @@protoc_insertion_point(class_scope:google.protobuf.FieldOptions) private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; int ctype_; bool packed_; bool lazy_; @@ -3978,23 +3879,21 @@ class PROTOBUF_EXPORT FieldOptions final : // ------------------------------------------------------------------- class PROTOBUF_EXPORT OneofOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.OneofOptions) */ { public: OneofOptions(); virtual ~OneofOptions(); OneofOptions(const OneofOptions& from); - - inline OneofOptions& operator=(const OneofOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 OneofOptions(OneofOptions&& from) noexcept : OneofOptions() { *this = ::std::move(from); } + inline OneofOptions& operator=(const OneofOptions& from) { + CopyFrom(from); + return *this; + } inline OneofOptions& operator=(OneofOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -4003,21 +3902,21 @@ class PROTOBUF_EXPORT OneofOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const OneofOptions& default_instance(); @@ -4042,11 +3941,11 @@ class PROTOBUF_EXPORT OneofOptions final : return CreateMaybeMessage(nullptr); } - OneofOptions* New(::google::protobuf::Arena* arena) const final { + OneofOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const OneofOptions& from); void MergeFrom(const OneofOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -4054,15 +3953,15 @@ class PROTOBUF_EXPORT OneofOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4070,17 +3969,17 @@ class PROTOBUF_EXPORT OneofOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(OneofOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.OneofOptions"; } protected: - explicit OneofOptions(::google::protobuf::Arena* arena); + explicit OneofOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -4088,7 +3987,7 @@ class PROTOBUF_EXPORT OneofOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -4098,12 +3997,12 @@ class PROTOBUF_EXPORT OneofOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(OneofOptions) @@ -4111,37 +4010,35 @@ class PROTOBUF_EXPORT OneofOptions final : private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT EnumOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumOptions) */ { public: EnumOptions(); virtual ~EnumOptions(); EnumOptions(const EnumOptions& from); - - inline EnumOptions& operator=(const EnumOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 EnumOptions(EnumOptions&& from) noexcept : EnumOptions() { *this = ::std::move(from); } + inline EnumOptions& operator=(const EnumOptions& from) { + CopyFrom(from); + return *this; + } inline EnumOptions& operator=(EnumOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -4150,21 +4047,21 @@ class PROTOBUF_EXPORT EnumOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const EnumOptions& default_instance(); @@ -4189,11 +4086,11 @@ class PROTOBUF_EXPORT EnumOptions final : return CreateMaybeMessage(nullptr); } - EnumOptions* New(::google::protobuf::Arena* arena) const final { + EnumOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const EnumOptions& from); void MergeFrom(const EnumOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -4201,15 +4098,15 @@ class PROTOBUF_EXPORT EnumOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4217,17 +4114,17 @@ class PROTOBUF_EXPORT EnumOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.EnumOptions"; } protected: - explicit EnumOptions(::google::protobuf::Arena* arena); + explicit EnumOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -4235,7 +4132,7 @@ class PROTOBUF_EXPORT EnumOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -4245,12 +4142,12 @@ class PROTOBUF_EXPORT EnumOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; // optional bool allow_alias = 2; @@ -4272,15 +4169,15 @@ class PROTOBUF_EXPORT EnumOptions final : private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; bool allow_alias_; bool deprecated_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -4288,23 +4185,21 @@ class PROTOBUF_EXPORT EnumOptions final : // ------------------------------------------------------------------- class PROTOBUF_EXPORT EnumValueOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValueOptions) */ { public: EnumValueOptions(); virtual ~EnumValueOptions(); EnumValueOptions(const EnumValueOptions& from); - - inline EnumValueOptions& operator=(const EnumValueOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 EnumValueOptions(EnumValueOptions&& from) noexcept : EnumValueOptions() { *this = ::std::move(from); } + inline EnumValueOptions& operator=(const EnumValueOptions& from) { + CopyFrom(from); + return *this; + } inline EnumValueOptions& operator=(EnumValueOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -4313,21 +4208,21 @@ class PROTOBUF_EXPORT EnumValueOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const EnumValueOptions& default_instance(); @@ -4352,11 +4247,11 @@ class PROTOBUF_EXPORT EnumValueOptions final : return CreateMaybeMessage(nullptr); } - EnumValueOptions* New(::google::protobuf::Arena* arena) const final { + EnumValueOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const EnumValueOptions& from); void MergeFrom(const EnumValueOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -4364,15 +4259,15 @@ class PROTOBUF_EXPORT EnumValueOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4380,17 +4275,17 @@ class PROTOBUF_EXPORT EnumValueOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(EnumValueOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.EnumValueOptions"; } protected: - explicit EnumValueOptions(::google::protobuf::Arena* arena); + explicit EnumValueOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -4398,7 +4293,7 @@ class PROTOBUF_EXPORT EnumValueOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -4408,12 +4303,12 @@ class PROTOBUF_EXPORT EnumValueOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; // optional bool deprecated = 1 [default = false]; @@ -4428,38 +4323,36 @@ class PROTOBUF_EXPORT EnumValueOptions final : private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; bool deprecated_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT ServiceOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ServiceOptions) */ { public: ServiceOptions(); virtual ~ServiceOptions(); ServiceOptions(const ServiceOptions& from); - - inline ServiceOptions& operator=(const ServiceOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ServiceOptions(ServiceOptions&& from) noexcept : ServiceOptions() { *this = ::std::move(from); } + inline ServiceOptions& operator=(const ServiceOptions& from) { + CopyFrom(from); + return *this; + } inline ServiceOptions& operator=(ServiceOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -4468,21 +4361,21 @@ class PROTOBUF_EXPORT ServiceOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const ServiceOptions& default_instance(); @@ -4507,11 +4400,11 @@ class PROTOBUF_EXPORT ServiceOptions final : return CreateMaybeMessage(nullptr); } - ServiceOptions* New(::google::protobuf::Arena* arena) const final { + ServiceOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ServiceOptions& from); void MergeFrom(const ServiceOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -4519,15 +4412,15 @@ class PROTOBUF_EXPORT ServiceOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4535,17 +4428,17 @@ class PROTOBUF_EXPORT ServiceOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ServiceOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.ServiceOptions"; } protected: - explicit ServiceOptions(::google::protobuf::Arena* arena); + explicit ServiceOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -4553,7 +4446,7 @@ class PROTOBUF_EXPORT ServiceOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -4563,12 +4456,12 @@ class PROTOBUF_EXPORT ServiceOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; // optional bool deprecated = 33 [default = false]; @@ -4583,38 +4476,36 @@ class PROTOBUF_EXPORT ServiceOptions final : private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; bool deprecated_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT MethodOptions final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodOptions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.MethodOptions) */ { public: MethodOptions(); virtual ~MethodOptions(); MethodOptions(const MethodOptions& from); - - inline MethodOptions& operator=(const MethodOptions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 MethodOptions(MethodOptions&& from) noexcept : MethodOptions() { *this = ::std::move(from); } + inline MethodOptions& operator=(const MethodOptions& from) { + CopyFrom(from); + return *this; + } inline MethodOptions& operator=(MethodOptions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -4623,21 +4514,21 @@ class PROTOBUF_EXPORT MethodOptions final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const MethodOptions& default_instance(); @@ -4662,11 +4553,11 @@ class PROTOBUF_EXPORT MethodOptions final : return CreateMaybeMessage(nullptr); } - MethodOptions* New(::google::protobuf::Arena* arena) const final { + MethodOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const MethodOptions& from); void MergeFrom(const MethodOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -4674,15 +4565,15 @@ class PROTOBUF_EXPORT MethodOptions final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4690,17 +4581,17 @@ class PROTOBUF_EXPORT MethodOptions final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(MethodOptions* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.MethodOptions"; } protected: - explicit MethodOptions(::google::protobuf::Arena* arena); + explicit MethodOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -4708,7 +4599,7 @@ class PROTOBUF_EXPORT MethodOptions final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -4728,14 +4619,14 @@ class PROTOBUF_EXPORT MethodOptions final : MethodOptions_IdempotencyLevel_IdempotencyLevel_MAX; static constexpr int IdempotencyLevel_ARRAYSIZE = MethodOptions_IdempotencyLevel_IdempotencyLevel_ARRAYSIZE; - static inline const ::google::protobuf::EnumDescriptor* + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IdempotencyLevel_descriptor() { return MethodOptions_IdempotencyLevel_descriptor(); } - static inline const ::std::string& IdempotencyLevel_Name(IdempotencyLevel value) { + static inline const std::string& IdempotencyLevel_Name(IdempotencyLevel value) { return MethodOptions_IdempotencyLevel_Name(value); } - static inline bool IdempotencyLevel_Parse(const ::std::string& name, + static inline bool IdempotencyLevel_Parse(const std::string& name, IdempotencyLevel* value) { return MethodOptions_IdempotencyLevel_Parse(name, value); } @@ -4746,12 +4637,12 @@ class PROTOBUF_EXPORT MethodOptions final : int uninterpreted_option_size() const; void clear_uninterpreted_option(); static const int kUninterpretedOptionFieldNumber = 999; - ::google::protobuf::UninterpretedOption* mutable_uninterpreted_option(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption* mutable_uninterpreted_option(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* mutable_uninterpreted_option(); - const ::google::protobuf::UninterpretedOption& uninterpreted_option(int index) const; - ::google::protobuf::UninterpretedOption* add_uninterpreted_option(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption& uninterpreted_option(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption* add_uninterpreted_option(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& uninterpreted_option() const; // optional bool deprecated = 33 [default = false]; @@ -4765,23 +4656,23 @@ class PROTOBUF_EXPORT MethodOptions final : bool has_idempotency_level() const; void clear_idempotency_level(); static const int kIdempotencyLevelFieldNumber = 34; - ::google::protobuf::MethodOptions_IdempotencyLevel idempotency_level() const; - void set_idempotency_level(::google::protobuf::MethodOptions_IdempotencyLevel value); + PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel idempotency_level() const; + void set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value); GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(MethodOptions) // @@protoc_insertion_point(class_scope:google.protobuf.MethodOptions) private: class HasBitSetters; - ::google::protobuf::internal::ExtensionSet _extensions_; + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption > uninterpreted_option_; bool deprecated_; int idempotency_level_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; @@ -4789,23 +4680,21 @@ class PROTOBUF_EXPORT MethodOptions final : // ------------------------------------------------------------------- class PROTOBUF_EXPORT UninterpretedOption_NamePart final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption.NamePart) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption.NamePart) */ { public: UninterpretedOption_NamePart(); virtual ~UninterpretedOption_NamePart(); UninterpretedOption_NamePart(const UninterpretedOption_NamePart& from); - - inline UninterpretedOption_NamePart& operator=(const UninterpretedOption_NamePart& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 UninterpretedOption_NamePart(UninterpretedOption_NamePart&& from) noexcept : UninterpretedOption_NamePart() { *this = ::std::move(from); } + inline UninterpretedOption_NamePart& operator=(const UninterpretedOption_NamePart& from) { + CopyFrom(from); + return *this; + } inline UninterpretedOption_NamePart& operator=(UninterpretedOption_NamePart&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -4814,21 +4703,21 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const UninterpretedOption_NamePart& default_instance(); @@ -4853,11 +4742,11 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : return CreateMaybeMessage(nullptr); } - UninterpretedOption_NamePart* New(::google::protobuf::Arena* arena) const final { + UninterpretedOption_NamePart* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const UninterpretedOption_NamePart& from); void MergeFrom(const UninterpretedOption_NamePart& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -4865,15 +4754,15 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -4881,17 +4770,17 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(UninterpretedOption_NamePart* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.UninterpretedOption.NamePart"; } protected: - explicit UninterpretedOption_NamePart(::google::protobuf::Arena* arena); + explicit UninterpretedOption_NamePart(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -4899,7 +4788,7 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -4909,25 +4798,23 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : bool has_name_part() const; void clear_name_part(); static const int kNamePartFieldNumber = 1; - const ::std::string& name_part() const; - void set_name_part(const ::std::string& value); - #if LANG_CXX11 - void set_name_part(::std::string&& value); - #endif + const std::string& name_part() const; + void set_name_part(const std::string& value); + void set_name_part(std::string&& value); void set_name_part(const char* value); void set_name_part(const char* value, size_t size); - ::std::string* mutable_name_part(); - ::std::string* release_name_part(); - void set_allocated_name_part(::std::string* name_part); + std::string* mutable_name_part(); + std::string* release_name_part(); + void set_allocated_name_part(std::string* name_part); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_name_part(); + std::string* unsafe_arena_release_name_part(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_name_part( - ::std::string* name_part); + std::string* name_part); // required bool is_extension = 2; bool has_is_extension() const; @@ -4943,36 +4830,34 @@ class PROTOBUF_EXPORT UninterpretedOption_NamePart final : // helper for ByteSizeLong() size_t RequiredFieldsByteSizeFallback() const; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr name_part_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_part_; bool is_extension_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT UninterpretedOption final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UninterpretedOption) */ { public: UninterpretedOption(); virtual ~UninterpretedOption(); UninterpretedOption(const UninterpretedOption& from); - - inline UninterpretedOption& operator=(const UninterpretedOption& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 UninterpretedOption(UninterpretedOption&& from) noexcept : UninterpretedOption() { *this = ::std::move(from); } + inline UninterpretedOption& operator=(const UninterpretedOption& from) { + CopyFrom(from); + return *this; + } inline UninterpretedOption& operator=(UninterpretedOption&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -4981,21 +4866,21 @@ class PROTOBUF_EXPORT UninterpretedOption final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const UninterpretedOption& default_instance(); @@ -5020,11 +4905,11 @@ class PROTOBUF_EXPORT UninterpretedOption final : return CreateMaybeMessage(nullptr); } - UninterpretedOption* New(::google::protobuf::Arena* arena) const final { + UninterpretedOption* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const UninterpretedOption& from); void MergeFrom(const UninterpretedOption& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -5032,15 +4917,15 @@ class PROTOBUF_EXPORT UninterpretedOption final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5048,17 +4933,17 @@ class PROTOBUF_EXPORT UninterpretedOption final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(UninterpretedOption* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.UninterpretedOption"; } protected: - explicit UninterpretedOption(::google::protobuf::Arena* arena); + explicit UninterpretedOption(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -5066,7 +4951,7 @@ class PROTOBUF_EXPORT UninterpretedOption final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -5078,99 +4963,93 @@ class PROTOBUF_EXPORT UninterpretedOption final : int name_size() const; void clear_name(); static const int kNameFieldNumber = 2; - ::google::protobuf::UninterpretedOption_NamePart* mutable_name(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >* + PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* mutable_name(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >* mutable_name(); - const ::google::protobuf::UninterpretedOption_NamePart& name(int index) const; - ::google::protobuf::UninterpretedOption_NamePart* add_name(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >& + const PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart& name(int index) const; + PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* add_name(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >& name() const; // optional string identifier_value = 3; bool has_identifier_value() const; void clear_identifier_value(); static const int kIdentifierValueFieldNumber = 3; - const ::std::string& identifier_value() const; - void set_identifier_value(const ::std::string& value); - #if LANG_CXX11 - void set_identifier_value(::std::string&& value); - #endif + const std::string& identifier_value() const; + void set_identifier_value(const std::string& value); + void set_identifier_value(std::string&& value); void set_identifier_value(const char* value); void set_identifier_value(const char* value, size_t size); - ::std::string* mutable_identifier_value(); - ::std::string* release_identifier_value(); - void set_allocated_identifier_value(::std::string* identifier_value); + std::string* mutable_identifier_value(); + std::string* release_identifier_value(); + void set_allocated_identifier_value(std::string* identifier_value); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_identifier_value(); + std::string* unsafe_arena_release_identifier_value(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_identifier_value( - ::std::string* identifier_value); + std::string* identifier_value); // optional bytes string_value = 7; bool has_string_value() const; void clear_string_value(); static const int kStringValueFieldNumber = 7; - const ::std::string& string_value() const; - void set_string_value(const ::std::string& value); - #if LANG_CXX11 - void set_string_value(::std::string&& value); - #endif + const std::string& string_value() const; + void set_string_value(const std::string& value); + void set_string_value(std::string&& value); void set_string_value(const char* value); void set_string_value(const void* value, size_t size); - ::std::string* mutable_string_value(); - ::std::string* release_string_value(); - void set_allocated_string_value(::std::string* string_value); + std::string* mutable_string_value(); + std::string* release_string_value(); + void set_allocated_string_value(std::string* string_value); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_string_value(); + std::string* unsafe_arena_release_string_value(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_string_value( - ::std::string* string_value); + std::string* string_value); // optional string aggregate_value = 8; bool has_aggregate_value() const; void clear_aggregate_value(); static const int kAggregateValueFieldNumber = 8; - const ::std::string& aggregate_value() const; - void set_aggregate_value(const ::std::string& value); - #if LANG_CXX11 - void set_aggregate_value(::std::string&& value); - #endif + const std::string& aggregate_value() const; + void set_aggregate_value(const std::string& value); + void set_aggregate_value(std::string&& value); void set_aggregate_value(const char* value); void set_aggregate_value(const char* value, size_t size); - ::std::string* mutable_aggregate_value(); - ::std::string* release_aggregate_value(); - void set_allocated_aggregate_value(::std::string* aggregate_value); + std::string* mutable_aggregate_value(); + std::string* release_aggregate_value(); + void set_allocated_aggregate_value(std::string* aggregate_value); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_aggregate_value(); + std::string* unsafe_arena_release_aggregate_value(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_aggregate_value( - ::std::string* aggregate_value); + std::string* aggregate_value); // optional uint64 positive_int_value = 4; bool has_positive_int_value() const; void clear_positive_int_value(); static const int kPositiveIntValueFieldNumber = 4; - ::google::protobuf::uint64 positive_int_value() const; - void set_positive_int_value(::google::protobuf::uint64 value); + ::PROTOBUF_NAMESPACE_ID::uint64 positive_int_value() const; + void set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value); // optional int64 negative_int_value = 5; bool has_negative_int_value() const; void clear_negative_int_value(); static const int kNegativeIntValueFieldNumber = 5; - ::google::protobuf::int64 negative_int_value() const; - void set_negative_int_value(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 negative_int_value() const; + void set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value); // optional double double_value = 6; bool has_double_value() const; @@ -5183,41 +5062,39 @@ class PROTOBUF_EXPORT UninterpretedOption final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart > name_; - ::google::protobuf::internal::ArenaStringPtr identifier_value_; - ::google::protobuf::internal::ArenaStringPtr string_value_; - ::google::protobuf::internal::ArenaStringPtr aggregate_value_; - ::google::protobuf::uint64 positive_int_value_; - ::google::protobuf::int64 negative_int_value_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart > name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr identifier_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr aggregate_value_; + ::PROTOBUF_NAMESPACE_ID::uint64 positive_int_value_; + ::PROTOBUF_NAMESPACE_ID::int64 negative_int_value_; double double_value_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT SourceCodeInfo_Location final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo.Location) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo.Location) */ { public: SourceCodeInfo_Location(); virtual ~SourceCodeInfo_Location(); SourceCodeInfo_Location(const SourceCodeInfo_Location& from); - - inline SourceCodeInfo_Location& operator=(const SourceCodeInfo_Location& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 SourceCodeInfo_Location(SourceCodeInfo_Location&& from) noexcept : SourceCodeInfo_Location() { *this = ::std::move(from); } + inline SourceCodeInfo_Location& operator=(const SourceCodeInfo_Location& from) { + CopyFrom(from); + return *this; + } inline SourceCodeInfo_Location& operator=(SourceCodeInfo_Location&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -5226,21 +5103,21 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const SourceCodeInfo_Location& default_instance(); @@ -5265,11 +5142,11 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : return CreateMaybeMessage(nullptr); } - SourceCodeInfo_Location* New(::google::protobuf::Arena* arena) const final { + SourceCodeInfo_Location* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SourceCodeInfo_Location& from); void MergeFrom(const SourceCodeInfo_Location& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -5277,15 +5154,15 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5293,17 +5170,17 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SourceCodeInfo_Location* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.SourceCodeInfo.Location"; } protected: - explicit SourceCodeInfo_Location(::google::protobuf::Arena* arena); + explicit SourceCodeInfo_Location(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -5311,7 +5188,7 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -5321,135 +5198,125 @@ class PROTOBUF_EXPORT SourceCodeInfo_Location final : int path_size() const; void clear_path(); static const int kPathFieldNumber = 1; - ::google::protobuf::int32 path(int index) const; - void set_path(int index, ::google::protobuf::int32 value); - void add_path(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + ::PROTOBUF_NAMESPACE_ID::int32 path(int index) const; + void set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_path(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& path() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* mutable_path(); // repeated int32 span = 2 [packed = true]; int span_size() const; void clear_span(); static const int kSpanFieldNumber = 2; - ::google::protobuf::int32 span(int index) const; - void set_span(int index, ::google::protobuf::int32 value); - void add_span(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + ::PROTOBUF_NAMESPACE_ID::int32 span(int index) const; + void set_span(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_span(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& span() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* mutable_span(); // repeated string leading_detached_comments = 6; int leading_detached_comments_size() const; void clear_leading_detached_comments(); static const int kLeadingDetachedCommentsFieldNumber = 6; - const ::std::string& leading_detached_comments(int index) const; - ::std::string* mutable_leading_detached_comments(int index); - void set_leading_detached_comments(int index, const ::std::string& value); - #if LANG_CXX11 - void set_leading_detached_comments(int index, ::std::string&& value); - #endif + const std::string& leading_detached_comments(int index) const; + std::string* mutable_leading_detached_comments(int index); + void set_leading_detached_comments(int index, const std::string& value); + void set_leading_detached_comments(int index, std::string&& value); void set_leading_detached_comments(int index, const char* value); void set_leading_detached_comments(int index, const char* value, size_t size); - ::std::string* add_leading_detached_comments(); - void add_leading_detached_comments(const ::std::string& value); - #if LANG_CXX11 - void add_leading_detached_comments(::std::string&& value); - #endif + std::string* add_leading_detached_comments(); + void add_leading_detached_comments(const std::string& value); + void add_leading_detached_comments(std::string&& value); void add_leading_detached_comments(const char* value); void add_leading_detached_comments(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& leading_detached_comments() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_leading_detached_comments(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& leading_detached_comments() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_leading_detached_comments(); // optional string leading_comments = 3; bool has_leading_comments() const; void clear_leading_comments(); static const int kLeadingCommentsFieldNumber = 3; - const ::std::string& leading_comments() const; - void set_leading_comments(const ::std::string& value); - #if LANG_CXX11 - void set_leading_comments(::std::string&& value); - #endif + const std::string& leading_comments() const; + void set_leading_comments(const std::string& value); + void set_leading_comments(std::string&& value); void set_leading_comments(const char* value); void set_leading_comments(const char* value, size_t size); - ::std::string* mutable_leading_comments(); - ::std::string* release_leading_comments(); - void set_allocated_leading_comments(::std::string* leading_comments); + std::string* mutable_leading_comments(); + std::string* release_leading_comments(); + void set_allocated_leading_comments(std::string* leading_comments); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_leading_comments(); + std::string* unsafe_arena_release_leading_comments(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_leading_comments( - ::std::string* leading_comments); + std::string* leading_comments); // optional string trailing_comments = 4; bool has_trailing_comments() const; void clear_trailing_comments(); static const int kTrailingCommentsFieldNumber = 4; - const ::std::string& trailing_comments() const; - void set_trailing_comments(const ::std::string& value); - #if LANG_CXX11 - void set_trailing_comments(::std::string&& value); - #endif + const std::string& trailing_comments() const; + void set_trailing_comments(const std::string& value); + void set_trailing_comments(std::string&& value); void set_trailing_comments(const char* value); void set_trailing_comments(const char* value, size_t size); - ::std::string* mutable_trailing_comments(); - ::std::string* release_trailing_comments(); - void set_allocated_trailing_comments(::std::string* trailing_comments); + std::string* mutable_trailing_comments(); + std::string* release_trailing_comments(); + void set_allocated_trailing_comments(std::string* trailing_comments); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_trailing_comments(); + std::string* unsafe_arena_release_trailing_comments(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_trailing_comments( - ::std::string* trailing_comments); + std::string* trailing_comments); // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo.Location) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > path_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > path_; mutable std::atomic _path_cached_byte_size_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > span_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > span_; mutable std::atomic _span_cached_byte_size_; - ::google::protobuf::RepeatedPtrField<::std::string> leading_detached_comments_; - ::google::protobuf::internal::ArenaStringPtr leading_comments_; - ::google::protobuf::internal::ArenaStringPtr trailing_comments_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField leading_detached_comments_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr leading_comments_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trailing_comments_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT SourceCodeInfo final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceCodeInfo) */ { public: SourceCodeInfo(); virtual ~SourceCodeInfo(); SourceCodeInfo(const SourceCodeInfo& from); - - inline SourceCodeInfo& operator=(const SourceCodeInfo& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 SourceCodeInfo(SourceCodeInfo&& from) noexcept : SourceCodeInfo() { *this = ::std::move(from); } + inline SourceCodeInfo& operator=(const SourceCodeInfo& from) { + CopyFrom(from); + return *this; + } inline SourceCodeInfo& operator=(SourceCodeInfo&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -5458,21 +5325,21 @@ class PROTOBUF_EXPORT SourceCodeInfo final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const SourceCodeInfo& default_instance(); @@ -5497,11 +5364,11 @@ class PROTOBUF_EXPORT SourceCodeInfo final : return CreateMaybeMessage(nullptr); } - SourceCodeInfo* New(::google::protobuf::Arena* arena) const final { + SourceCodeInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SourceCodeInfo& from); void MergeFrom(const SourceCodeInfo& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -5509,15 +5376,15 @@ class PROTOBUF_EXPORT SourceCodeInfo final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5525,17 +5392,17 @@ class PROTOBUF_EXPORT SourceCodeInfo final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SourceCodeInfo* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.SourceCodeInfo"; } protected: - explicit SourceCodeInfo(::google::protobuf::Arena* arena); + explicit SourceCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -5543,7 +5410,7 @@ class PROTOBUF_EXPORT SourceCodeInfo final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -5555,47 +5422,45 @@ class PROTOBUF_EXPORT SourceCodeInfo final : int location_size() const; void clear_location(); static const int kLocationFieldNumber = 1; - ::google::protobuf::SourceCodeInfo_Location* mutable_location(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >* + PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* mutable_location(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >* mutable_location(); - const ::google::protobuf::SourceCodeInfo_Location& location(int index) const; - ::google::protobuf::SourceCodeInfo_Location* add_location(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >& + const PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location& location(int index) const; + PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* add_location(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >& location() const; // @@protoc_insertion_point(class_scope:google.protobuf.SourceCodeInfo) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location > location_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location > location_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo.Annotation) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo.Annotation) */ { public: GeneratedCodeInfo_Annotation(); virtual ~GeneratedCodeInfo_Annotation(); GeneratedCodeInfo_Annotation(const GeneratedCodeInfo_Annotation& from); - - inline GeneratedCodeInfo_Annotation& operator=(const GeneratedCodeInfo_Annotation& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 GeneratedCodeInfo_Annotation(GeneratedCodeInfo_Annotation&& from) noexcept : GeneratedCodeInfo_Annotation() { *this = ::std::move(from); } + inline GeneratedCodeInfo_Annotation& operator=(const GeneratedCodeInfo_Annotation& from) { + CopyFrom(from); + return *this; + } inline GeneratedCodeInfo_Annotation& operator=(GeneratedCodeInfo_Annotation&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -5604,21 +5469,21 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const GeneratedCodeInfo_Annotation& default_instance(); @@ -5643,11 +5508,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : return CreateMaybeMessage(nullptr); } - GeneratedCodeInfo_Annotation* New(::google::protobuf::Arena* arena) const final { + GeneratedCodeInfo_Annotation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const GeneratedCodeInfo_Annotation& from); void MergeFrom(const GeneratedCodeInfo_Annotation& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -5655,15 +5520,15 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5671,17 +5536,17 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GeneratedCodeInfo_Annotation* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.GeneratedCodeInfo.Annotation"; } protected: - explicit GeneratedCodeInfo_Annotation(::google::protobuf::Arena* arena); + explicit GeneratedCodeInfo_Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -5689,7 +5554,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -5699,89 +5564,85 @@ class PROTOBUF_EXPORT GeneratedCodeInfo_Annotation final : int path_size() const; void clear_path(); static const int kPathFieldNumber = 1; - ::google::protobuf::int32 path(int index) const; - void set_path(int index, ::google::protobuf::int32 value); - void add_path(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + ::PROTOBUF_NAMESPACE_ID::int32 path(int index) const; + void set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_path(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& path() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* mutable_path(); // optional string source_file = 2; bool has_source_file() const; void clear_source_file(); static const int kSourceFileFieldNumber = 2; - const ::std::string& source_file() const; - void set_source_file(const ::std::string& value); - #if LANG_CXX11 - void set_source_file(::std::string&& value); - #endif + const std::string& source_file() const; + void set_source_file(const std::string& value); + void set_source_file(std::string&& value); void set_source_file(const char* value); void set_source_file(const char* value, size_t size); - ::std::string* mutable_source_file(); - ::std::string* release_source_file(); - void set_allocated_source_file(::std::string* source_file); + std::string* mutable_source_file(); + std::string* release_source_file(); + void set_allocated_source_file(std::string* source_file); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_source_file(); + std::string* unsafe_arena_release_source_file(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_source_file( - ::std::string* source_file); + std::string* source_file); // optional int32 begin = 3; bool has_begin() const; void clear_begin(); static const int kBeginFieldNumber = 3; - ::google::protobuf::int32 begin() const; - void set_begin(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 begin() const; + void set_begin(::PROTOBUF_NAMESPACE_ID::int32 value); // optional int32 end = 4; bool has_end() const; void clear_end(); static const int kEndFieldNumber = 4; - ::google::protobuf::int32 end() const; - void set_end(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 end() const; + void set_end(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo.Annotation) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > path_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > path_; mutable std::atomic _path_cached_byte_size_; - ::google::protobuf::internal::ArenaStringPtr source_file_; - ::google::protobuf::int32 begin_; - ::google::protobuf::int32 end_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_file_; + ::PROTOBUF_NAMESPACE_ID::int32 begin_; + ::PROTOBUF_NAMESPACE_ID::int32 end_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT GeneratedCodeInfo final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.GeneratedCodeInfo) */ { public: GeneratedCodeInfo(); virtual ~GeneratedCodeInfo(); GeneratedCodeInfo(const GeneratedCodeInfo& from); - - inline GeneratedCodeInfo& operator=(const GeneratedCodeInfo& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 GeneratedCodeInfo(GeneratedCodeInfo&& from) noexcept : GeneratedCodeInfo() { *this = ::std::move(from); } + inline GeneratedCodeInfo& operator=(const GeneratedCodeInfo& from) { + CopyFrom(from); + return *this; + } inline GeneratedCodeInfo& operator=(GeneratedCodeInfo&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -5790,21 +5651,21 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : } return *this; } - #endif - inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } - inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } - inline ::google::protobuf::Arena* GetArena() const final { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const GeneratedCodeInfo& default_instance(); @@ -5829,11 +5690,11 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : return CreateMaybeMessage(nullptr); } - GeneratedCodeInfo* New(::google::protobuf::Arena* arena) const final { + GeneratedCodeInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const GeneratedCodeInfo& from); void MergeFrom(const GeneratedCodeInfo& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -5841,15 +5702,15 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -5857,17 +5718,17 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GeneratedCodeInfo* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.GeneratedCodeInfo"; } protected: - explicit GeneratedCodeInfo(::google::protobuf::Arena* arena); + explicit GeneratedCodeInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -5875,7 +5736,7 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -5887,25 +5748,25 @@ class PROTOBUF_EXPORT GeneratedCodeInfo final : int annotation_size() const; void clear_annotation(); static const int kAnnotationFieldNumber = 1; - ::google::protobuf::GeneratedCodeInfo_Annotation* mutable_annotation(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >* + PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* mutable_annotation(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >* mutable_annotation(); - const ::google::protobuf::GeneratedCodeInfo_Annotation& annotation(int index) const; - ::google::protobuf::GeneratedCodeInfo_Annotation* add_annotation(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >& + const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation& annotation(int index) const; + PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* add_annotation(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >& annotation() const; // @@protoc_insertion_point(class_scope:google.protobuf.GeneratedCodeInfo) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation > annotation_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation > annotation_; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; }; // =================================================================== @@ -5926,24 +5787,24 @@ inline int FileDescriptorSet::file_size() const { inline void FileDescriptorSet::clear_file() { file_.Clear(); } -inline ::google::protobuf::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) { +inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::mutable_file(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorSet.file) return file_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >* FileDescriptorSet::mutable_file() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorSet.file) return &file_; } -inline const ::google::protobuf::FileDescriptorProto& FileDescriptorSet::file(int index) const { +inline const PROTOBUF_NAMESPACE_ID::FileDescriptorProto& FileDescriptorSet::file(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorSet.file) return file_.Get(index); } -inline ::google::protobuf::FileDescriptorProto* FileDescriptorSet::add_file() { +inline PROTOBUF_NAMESPACE_ID::FileDescriptorProto* FileDescriptorSet::add_file() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorSet.file) return file_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FileDescriptorProto >& FileDescriptorSet::file() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorSet.file) return file_; @@ -5958,79 +5819,77 @@ inline bool FileDescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void FileDescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& FileDescriptorProto::name() const { +inline const std::string& FileDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name) return name_.Get(); } -inline void FileDescriptorProto::set_name(const ::std::string& value) { +inline void FileDescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name) } -#if LANG_CXX11 -inline void FileDescriptorProto::set_name(::std::string&& value) { +inline void FileDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.name) } -#endif inline void FileDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.name) } inline void FileDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.name) } -inline ::std::string* FileDescriptorProto::mutable_name() { +inline std::string* FileDescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileDescriptorProto::release_name() { +inline std::string* FileDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileDescriptorProto::set_allocated_name(::std::string* name) { +inline void FileDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.name) } -inline ::std::string* FileDescriptorProto::unsafe_arena_release_name() { +inline std::string* FileDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileDescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.name) } @@ -6040,79 +5899,77 @@ inline bool FileDescriptorProto::has_package() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void FileDescriptorProto::clear_package() { - package_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000002u; } -inline const ::std::string& FileDescriptorProto::package() const { +inline const std::string& FileDescriptorProto::package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package) return package_.Get(); } -inline void FileDescriptorProto::set_package(const ::std::string& value) { +inline void FileDescriptorProto::set_package(const std::string& value) { _has_bits_[0] |= 0x00000002u; - package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package) } -#if LANG_CXX11 -inline void FileDescriptorProto::set_package(::std::string&& value) { +inline void FileDescriptorProto::set_package(std::string&& value) { _has_bits_[0] |= 0x00000002u; package_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.package) } -#endif inline void FileDescriptorProto::set_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.package) } inline void FileDescriptorProto::set_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; - package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.package) } -inline ::std::string* FileDescriptorProto::mutable_package() { +inline std::string* FileDescriptorProto::mutable_package() { _has_bits_[0] |= 0x00000002u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.package) - return package_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileDescriptorProto::release_package() { +inline std::string* FileDescriptorProto::release_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.package) if (!has_package()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return package_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileDescriptorProto::set_allocated_package(::std::string* package) { +inline void FileDescriptorProto::set_allocated_package(std::string* package) { if (package != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - package_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), package, + package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.package) } -inline ::std::string* FileDescriptorProto::unsafe_arena_release_package() { +inline std::string* FileDescriptorProto::unsafe_arena_release_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.package) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000002u; - return package_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileDescriptorProto::unsafe_arena_set_allocated_package( - ::std::string* package) { + std::string* package) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (package != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - package_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.package) } @@ -6124,24 +5981,22 @@ inline int FileDescriptorProto::dependency_size() const { inline void FileDescriptorProto::clear_dependency() { dependency_.Clear(); } -inline const ::std::string& FileDescriptorProto::dependency(int index) const { +inline const std::string& FileDescriptorProto::dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency) return dependency_.Get(index); } -inline ::std::string* FileDescriptorProto::mutable_dependency(int index) { +inline std::string* FileDescriptorProto::mutable_dependency(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.dependency) return dependency_.Mutable(index); } -inline void FileDescriptorProto::set_dependency(int index, const ::std::string& value) { +inline void FileDescriptorProto::set_dependency(int index, const std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) dependency_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void FileDescriptorProto::set_dependency(int index, ::std::string&& value) { +inline void FileDescriptorProto::set_dependency(int index, std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.dependency) dependency_.Mutable(index)->assign(std::move(value)); } -#endif inline void FileDescriptorProto::set_dependency(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); dependency_.Mutable(index)->assign(value); @@ -6152,20 +6007,18 @@ inline void FileDescriptorProto::set_dependency(int index, const char* value, si reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.dependency) } -inline ::std::string* FileDescriptorProto::add_dependency() { +inline std::string* FileDescriptorProto::add_dependency() { // @@protoc_insertion_point(field_add_mutable:google.protobuf.FileDescriptorProto.dependency) return dependency_.Add(); } -inline void FileDescriptorProto::add_dependency(const ::std::string& value) { +inline void FileDescriptorProto::add_dependency(const std::string& value) { dependency_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) } -#if LANG_CXX11 -inline void FileDescriptorProto::add_dependency(::std::string&& value) { +inline void FileDescriptorProto::add_dependency(std::string&& value) { dependency_.Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.dependency) } -#endif inline void FileDescriptorProto::add_dependency(const char* value) { GOOGLE_DCHECK(value != nullptr); dependency_.Add()->assign(value); @@ -6175,12 +6028,12 @@ inline void FileDescriptorProto::add_dependency(const char* value, size_t size) dependency_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.FileDescriptorProto.dependency) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& FileDescriptorProto::dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.dependency) return dependency_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* FileDescriptorProto::mutable_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.dependency) return &dependency_; @@ -6193,24 +6046,24 @@ inline int FileDescriptorProto::public_dependency_size() const { inline void FileDescriptorProto::clear_public_dependency() { public_dependency_.Clear(); } -inline ::google::protobuf::int32 FileDescriptorProto::public_dependency(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::public_dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.public_dependency) return public_dependency_.Get(index); } -inline void FileDescriptorProto::set_public_dependency(int index, ::google::protobuf::int32 value) { +inline void FileDescriptorProto::set_public_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { public_dependency_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.public_dependency) } -inline void FileDescriptorProto::add_public_dependency(::google::protobuf::int32 value) { +inline void FileDescriptorProto::add_public_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { public_dependency_.Add(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.public_dependency) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& FileDescriptorProto::public_dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.public_dependency) return public_dependency_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* FileDescriptorProto::mutable_public_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.public_dependency) return &public_dependency_; @@ -6223,24 +6076,24 @@ inline int FileDescriptorProto::weak_dependency_size() const { inline void FileDescriptorProto::clear_weak_dependency() { weak_dependency_.Clear(); } -inline ::google::protobuf::int32 FileDescriptorProto::weak_dependency(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int32 FileDescriptorProto::weak_dependency(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.weak_dependency) return weak_dependency_.Get(index); } -inline void FileDescriptorProto::set_weak_dependency(int index, ::google::protobuf::int32 value) { +inline void FileDescriptorProto::set_weak_dependency(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { weak_dependency_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.weak_dependency) } -inline void FileDescriptorProto::add_weak_dependency(::google::protobuf::int32 value) { +inline void FileDescriptorProto::add_weak_dependency(::PROTOBUF_NAMESPACE_ID::int32 value) { weak_dependency_.Add(value); // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.weak_dependency) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& FileDescriptorProto::weak_dependency() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.weak_dependency) return weak_dependency_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* FileDescriptorProto::mutable_weak_dependency() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.weak_dependency) return &weak_dependency_; @@ -6253,24 +6106,24 @@ inline int FileDescriptorProto::message_type_size() const { inline void FileDescriptorProto::clear_message_type() { message_type_.Clear(); } -inline ::google::protobuf::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::mutable_message_type(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.message_type) return message_type_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >* FileDescriptorProto::mutable_message_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.message_type) return &message_type_; } -inline const ::google::protobuf::DescriptorProto& FileDescriptorProto::message_type(int index) const { +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto& FileDescriptorProto::message_type(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type) return message_type_.Get(index); } -inline ::google::protobuf::DescriptorProto* FileDescriptorProto::add_message_type() { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto* FileDescriptorProto::add_message_type() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.message_type) return message_type_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& FileDescriptorProto::message_type() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type) return message_type_; @@ -6283,24 +6136,24 @@ inline int FileDescriptorProto::enum_type_size() const { inline void FileDescriptorProto::clear_enum_type() { enum_type_.Clear(); } -inline ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) { +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::mutable_enum_type(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.enum_type) return enum_type_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >* FileDescriptorProto::mutable_enum_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.enum_type) return &enum_type_; } -inline const ::google::protobuf::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const { +inline const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& FileDescriptorProto::enum_type(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type) return enum_type_.Get(index); } -inline ::google::protobuf::EnumDescriptorProto* FileDescriptorProto::add_enum_type() { +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* FileDescriptorProto::add_enum_type() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.enum_type) return enum_type_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& FileDescriptorProto::enum_type() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type) return enum_type_; @@ -6313,24 +6166,24 @@ inline int FileDescriptorProto::service_size() const { inline void FileDescriptorProto::clear_service() { service_.Clear(); } -inline ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) { +inline PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::mutable_service(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.service) return service_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >* FileDescriptorProto::mutable_service() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.service) return &service_; } -inline const ::google::protobuf::ServiceDescriptorProto& FileDescriptorProto::service(int index) const { +inline const PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto& FileDescriptorProto::service(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.service) return service_.Get(index); } -inline ::google::protobuf::ServiceDescriptorProto* FileDescriptorProto::add_service() { +inline PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto* FileDescriptorProto::add_service() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.service) return service_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::ServiceDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::ServiceDescriptorProto >& FileDescriptorProto::service() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service) return service_; @@ -6343,24 +6196,24 @@ inline int FileDescriptorProto::extension_size() const { inline void FileDescriptorProto::clear_extension() { extension_.Clear(); } -inline ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::mutable_extension(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.extension) return extension_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* FileDescriptorProto::mutable_extension() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileDescriptorProto.extension) return &extension_; } -inline const ::google::protobuf::FieldDescriptorProto& FileDescriptorProto::extension(int index) const { +inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& FileDescriptorProto::extension(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension) return extension_.Get(index); } -inline ::google::protobuf::FieldDescriptorProto* FileDescriptorProto::add_extension() { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* FileDescriptorProto::add_extension() { // @@protoc_insertion_point(field_add:google.protobuf.FileDescriptorProto.extension) return extension_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& FileDescriptorProto::extension() const { // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension) return extension_; @@ -6374,48 +6227,48 @@ inline void FileDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000008u; } -inline const ::google::protobuf::FileOptions& FileDescriptorProto::options() const { - const ::google::protobuf::FileOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::FileOptions& FileDescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::FileOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_FileOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_FileOptions_default_instance_); } -inline ::google::protobuf::FileOptions* FileDescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.options) _has_bits_[0] &= ~0x00000008u; - ::google::protobuf::FileOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::FileOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::FileOptions* FileDescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.options) _has_bits_[0] &= ~0x00000008u; - ::google::protobuf::FileOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::FileOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::FileOptions* FileDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::FileOptions* FileDescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000008u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::FileOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.options) return options_; } -inline void FileDescriptorProto::set_allocated_options(::google::protobuf::FileOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void FileDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::FileOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000008u; @@ -6434,48 +6287,48 @@ inline void FileDescriptorProto::clear_source_code_info() { if (source_code_info_ != nullptr) source_code_info_->Clear(); _has_bits_[0] &= ~0x00000010u; } -inline const ::google::protobuf::SourceCodeInfo& FileDescriptorProto::source_code_info() const { - const ::google::protobuf::SourceCodeInfo* p = source_code_info_; +inline const PROTOBUF_NAMESPACE_ID::SourceCodeInfo& FileDescriptorProto::source_code_info() const { + const PROTOBUF_NAMESPACE_ID::SourceCodeInfo* p = source_code_info_; // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.source_code_info) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_SourceCodeInfo_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_SourceCodeInfo_default_instance_); } -inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::release_source_code_info() { +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::release_source_code_info() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.source_code_info) _has_bits_[0] &= ~0x00000010u; - ::google::protobuf::SourceCodeInfo* temp = source_code_info_; + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* temp = source_code_info_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } source_code_info_ = nullptr; return temp; } -inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::unsafe_arena_release_source_code_info() { +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::unsafe_arena_release_source_code_info() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.source_code_info) _has_bits_[0] &= ~0x00000010u; - ::google::protobuf::SourceCodeInfo* temp = source_code_info_; + PROTOBUF_NAMESPACE_ID::SourceCodeInfo* temp = source_code_info_; source_code_info_ = nullptr; return temp; } -inline ::google::protobuf::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo* FileDescriptorProto::mutable_source_code_info() { _has_bits_[0] |= 0x00000010u; if (source_code_info_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::SourceCodeInfo>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); source_code_info_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.source_code_info) return source_code_info_; } -inline void FileDescriptorProto::set_allocated_source_code_info(::google::protobuf::SourceCodeInfo* source_code_info) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void FileDescriptorProto::set_allocated_source_code_info(PROTOBUF_NAMESPACE_ID::SourceCodeInfo* source_code_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete source_code_info_; } if (source_code_info) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(source_code_info); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(source_code_info); if (message_arena != submessage_arena) { - source_code_info = ::google::protobuf::internal::GetOwnedMessage( + source_code_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, source_code_info, submessage_arena); } _has_bits_[0] |= 0x00000010u; @@ -6491,79 +6344,77 @@ inline bool FileDescriptorProto::has_syntax() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void FileDescriptorProto::clear_syntax() { - syntax_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + syntax_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000004u; } -inline const ::std::string& FileDescriptorProto::syntax() const { +inline const std::string& FileDescriptorProto::syntax() const { // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax) return syntax_.Get(); } -inline void FileDescriptorProto::set_syntax(const ::std::string& value) { +inline void FileDescriptorProto::set_syntax(const std::string& value) { _has_bits_[0] |= 0x00000004u; - syntax_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax) } -#if LANG_CXX11 -inline void FileDescriptorProto::set_syntax(::std::string&& value) { +inline void FileDescriptorProto::set_syntax(std::string&& value) { _has_bits_[0] |= 0x00000004u; syntax_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.syntax) } -#endif inline void FileDescriptorProto::set_syntax(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; - syntax_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileDescriptorProto.syntax) } inline void FileDescriptorProto::set_syntax(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; - syntax_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + syntax_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileDescriptorProto.syntax) } -inline ::std::string* FileDescriptorProto::mutable_syntax() { +inline std::string* FileDescriptorProto::mutable_syntax() { _has_bits_[0] |= 0x00000004u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileDescriptorProto.syntax) - return syntax_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return syntax_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileDescriptorProto::release_syntax() { +inline std::string* FileDescriptorProto::release_syntax() { // @@protoc_insertion_point(field_release:google.protobuf.FileDescriptorProto.syntax) if (!has_syntax()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return syntax_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return syntax_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileDescriptorProto::set_allocated_syntax(::std::string* syntax) { +inline void FileDescriptorProto::set_allocated_syntax(std::string* syntax) { if (syntax != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - syntax_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), syntax, + syntax_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), syntax, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileDescriptorProto.syntax) } -inline ::std::string* FileDescriptorProto::unsafe_arena_release_syntax() { +inline std::string* FileDescriptorProto::unsafe_arena_release_syntax() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileDescriptorProto.syntax) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000004u; - return syntax_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return syntax_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileDescriptorProto::unsafe_arena_set_allocated_syntax( - ::std::string* syntax) { + std::string* syntax) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (syntax != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - syntax_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + syntax_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), syntax, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileDescriptorProto.syntax) } @@ -6580,11 +6431,11 @@ inline void DescriptorProto_ExtensionRange::clear_start() { start_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::google::protobuf::int32 DescriptorProto_ExtensionRange::start() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::start() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start) return start_; } -inline void DescriptorProto_ExtensionRange::set_start(::google::protobuf::int32 value) { +inline void DescriptorProto_ExtensionRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; start_ = value; // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.start) @@ -6598,11 +6449,11 @@ inline void DescriptorProto_ExtensionRange::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::google::protobuf::int32 DescriptorProto_ExtensionRange::end() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ExtensionRange::end() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end) return end_; } -inline void DescriptorProto_ExtensionRange::set_end(::google::protobuf::int32 value) { +inline void DescriptorProto_ExtensionRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; end_ = value; // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ExtensionRange.end) @@ -6616,48 +6467,48 @@ inline void DescriptorProto_ExtensionRange::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000001u; } -inline const ::google::protobuf::ExtensionRangeOptions& DescriptorProto_ExtensionRange::options() const { - const ::google::protobuf::ExtensionRangeOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions& DescriptorProto_ExtensionRange::options() const { + const PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_ExtensionRangeOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_ExtensionRangeOptions_default_instance_); } -inline ::google::protobuf::ExtensionRangeOptions* DescriptorProto_ExtensionRange::release_options() { +inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.ExtensionRange.options) _has_bits_[0] &= ~0x00000001u; - ::google::protobuf::ExtensionRangeOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::ExtensionRangeOptions* DescriptorProto_ExtensionRange::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.DescriptorProto.ExtensionRange.options) _has_bits_[0] &= ~0x00000001u; - ::google::protobuf::ExtensionRangeOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::ExtensionRangeOptions* DescriptorProto_ExtensionRange::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* DescriptorProto_ExtensionRange::mutable_options() { _has_bits_[0] |= 0x00000001u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::ExtensionRangeOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.ExtensionRange.options) return options_; } -inline void DescriptorProto_ExtensionRange::set_allocated_options(::google::protobuf::ExtensionRangeOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void DescriptorProto_ExtensionRange::set_allocated_options(PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000001u; @@ -6680,11 +6531,11 @@ inline void DescriptorProto_ReservedRange::clear_start() { start_ = 0; _has_bits_[0] &= ~0x00000001u; } -inline ::google::protobuf::int32 DescriptorProto_ReservedRange::start() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::start() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start) return start_; } -inline void DescriptorProto_ReservedRange::set_start(::google::protobuf::int32 value) { +inline void DescriptorProto_ReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000001u; start_ = value; // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.start) @@ -6698,11 +6549,11 @@ inline void DescriptorProto_ReservedRange::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::google::protobuf::int32 DescriptorProto_ReservedRange::end() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 DescriptorProto_ReservedRange::end() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end) return end_; } -inline void DescriptorProto_ReservedRange::set_end(::google::protobuf::int32 value) { +inline void DescriptorProto_ReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; end_ = value; // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.ReservedRange.end) @@ -6717,79 +6568,77 @@ inline bool DescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void DescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& DescriptorProto::name() const { +inline const std::string& DescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name) return name_.Get(); } -inline void DescriptorProto::set_name(const ::std::string& value) { +inline void DescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name) } -#if LANG_CXX11 -inline void DescriptorProto::set_name(::std::string&& value) { +inline void DescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.DescriptorProto.name) } -#endif inline void DescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.DescriptorProto.name) } inline void DescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.name) } -inline ::std::string* DescriptorProto::mutable_name() { +inline std::string* DescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* DescriptorProto::release_name() { +inline std::string* DescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void DescriptorProto::set_allocated_name(::std::string* name) { +inline void DescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.DescriptorProto.name) } -inline ::std::string* DescriptorProto::unsafe_arena_release_name() { +inline std::string* DescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.DescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void DescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.DescriptorProto.name) } @@ -6801,24 +6650,24 @@ inline int DescriptorProto::field_size() const { inline void DescriptorProto::clear_field() { field_.Clear(); } -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_field(int index) { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::mutable_field(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.field) return field_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* DescriptorProto::mutable_field() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.field) return &field_; } -inline const ::google::protobuf::FieldDescriptorProto& DescriptorProto::field(int index) const { +inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::field(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field) return field_.Get(index); } -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_field() { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_field() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.field) return field_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& DescriptorProto::field() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field) return field_; @@ -6831,24 +6680,24 @@ inline int DescriptorProto::extension_size() const { inline void DescriptorProto::clear_extension() { extension_.Clear(); } -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::mutable_extension(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension) return extension_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >* DescriptorProto::mutable_extension() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension) return &extension_; } -inline const ::google::protobuf::FieldDescriptorProto& DescriptorProto::extension(int index) const { +inline const PROTOBUF_NAMESPACE_ID::FieldDescriptorProto& DescriptorProto::extension(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension) return extension_.Get(index); } -inline ::google::protobuf::FieldDescriptorProto* DescriptorProto::add_extension() { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto* DescriptorProto::add_extension() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension) return extension_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FieldDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto >& DescriptorProto::extension() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension) return extension_; @@ -6861,24 +6710,24 @@ inline int DescriptorProto::nested_type_size() const { inline void DescriptorProto::clear_nested_type() { nested_type_.Clear(); } -inline ::google::protobuf::DescriptorProto* DescriptorProto::mutable_nested_type(int index) { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::mutable_nested_type(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.nested_type) return nested_type_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >* DescriptorProto::mutable_nested_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.nested_type) return &nested_type_; } -inline const ::google::protobuf::DescriptorProto& DescriptorProto::nested_type(int index) const { +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto& DescriptorProto::nested_type(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type) return nested_type_.Get(index); } -inline ::google::protobuf::DescriptorProto* DescriptorProto::add_nested_type() { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto* DescriptorProto::add_nested_type() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.nested_type) return nested_type_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto >& DescriptorProto::nested_type() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type) return nested_type_; @@ -6891,24 +6740,24 @@ inline int DescriptorProto::enum_type_size() const { inline void DescriptorProto::clear_enum_type() { enum_type_.Clear(); } -inline ::google::protobuf::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) { +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::mutable_enum_type(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.enum_type) return enum_type_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >* DescriptorProto::mutable_enum_type() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.enum_type) return &enum_type_; } -inline const ::google::protobuf::EnumDescriptorProto& DescriptorProto::enum_type(int index) const { +inline const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto& DescriptorProto::enum_type(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type) return enum_type_.Get(index); } -inline ::google::protobuf::EnumDescriptorProto* DescriptorProto::add_enum_type() { +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto* DescriptorProto::add_enum_type() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.enum_type) return enum_type_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >& DescriptorProto::enum_type() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type) return enum_type_; @@ -6921,24 +6770,24 @@ inline int DescriptorProto::extension_range_size() const { inline void DescriptorProto::clear_extension_range() { extension_range_.Clear(); } -inline ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto::mutable_extension_range(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.extension_range) return extension_range_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >* DescriptorProto::mutable_extension_range() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.extension_range) return &extension_range_; } -inline const ::google::protobuf::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const { +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange& DescriptorProto::extension_range(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range) return extension_range_.Get(index); } -inline ::google::protobuf::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange* DescriptorProto::add_extension_range() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.extension_range) return extension_range_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ExtensionRange >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ExtensionRange >& DescriptorProto::extension_range() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range) return extension_range_; @@ -6951,24 +6800,24 @@ inline int DescriptorProto::oneof_decl_size() const { inline void DescriptorProto::clear_oneof_decl() { oneof_decl_.Clear(); } -inline ::google::protobuf::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) { +inline PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::mutable_oneof_decl(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.oneof_decl) return oneof_decl_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >* DescriptorProto::mutable_oneof_decl() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.oneof_decl) return &oneof_decl_; } -inline const ::google::protobuf::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const { +inline const PROTOBUF_NAMESPACE_ID::OneofDescriptorProto& DescriptorProto::oneof_decl(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl) return oneof_decl_.Get(index); } -inline ::google::protobuf::OneofDescriptorProto* DescriptorProto::add_oneof_decl() { +inline PROTOBUF_NAMESPACE_ID::OneofDescriptorProto* DescriptorProto::add_oneof_decl() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.oneof_decl) return oneof_decl_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::OneofDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::OneofDescriptorProto >& DescriptorProto::oneof_decl() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl) return oneof_decl_; @@ -6982,48 +6831,48 @@ inline void DescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const ::google::protobuf::MessageOptions& DescriptorProto::options() const { - const ::google::protobuf::MessageOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::MessageOptions& DescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::MessageOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_MessageOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_MessageOptions_default_instance_); } -inline ::google::protobuf::MessageOptions* DescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.DescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::MessageOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::MessageOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::MessageOptions* DescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.DescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::MessageOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::MessageOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::MessageOptions* DescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::MessageOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.options) return options_; } -inline void DescriptorProto::set_allocated_options(::google::protobuf::MessageOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void DescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::MessageOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000002u; @@ -7041,24 +6890,24 @@ inline int DescriptorProto::reserved_range_size() const { inline void DescriptorProto::clear_reserved_range() { reserved_range_.Clear(); } -inline ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::mutable_reserved_range(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_range) return reserved_range_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >* DescriptorProto::mutable_reserved_range() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_range) return &reserved_range_; } -inline const ::google::protobuf::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const { +inline const PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange& DescriptorProto::reserved_range(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range) return reserved_range_.Get(index); } -inline ::google::protobuf::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() { +inline PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange* DescriptorProto::add_reserved_range() { // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_range) return reserved_range_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::DescriptorProto_ReservedRange >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::DescriptorProto_ReservedRange >& DescriptorProto::reserved_range() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_range) return reserved_range_; @@ -7071,24 +6920,22 @@ inline int DescriptorProto::reserved_name_size() const { inline void DescriptorProto::clear_reserved_name() { reserved_name_.Clear(); } -inline const ::std::string& DescriptorProto::reserved_name(int index) const { +inline const std::string& DescriptorProto::reserved_name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name) return reserved_name_.Get(index); } -inline ::std::string* DescriptorProto::mutable_reserved_name(int index) { +inline std::string* DescriptorProto::mutable_reserved_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.DescriptorProto.reserved_name) return reserved_name_.Mutable(index); } -inline void DescriptorProto::set_reserved_name(int index, const ::std::string& value) { +inline void DescriptorProto::set_reserved_name(int index, const std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) reserved_name_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void DescriptorProto::set_reserved_name(int index, ::std::string&& value) { +inline void DescriptorProto::set_reserved_name(int index, std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.reserved_name) reserved_name_.Mutable(index)->assign(std::move(value)); } -#endif inline void DescriptorProto::set_reserved_name(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); reserved_name_.Mutable(index)->assign(value); @@ -7099,20 +6946,18 @@ inline void DescriptorProto::set_reserved_name(int index, const char* value, siz reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.DescriptorProto.reserved_name) } -inline ::std::string* DescriptorProto::add_reserved_name() { +inline std::string* DescriptorProto::add_reserved_name() { // @@protoc_insertion_point(field_add_mutable:google.protobuf.DescriptorProto.reserved_name) return reserved_name_.Add(); } -inline void DescriptorProto::add_reserved_name(const ::std::string& value) { +inline void DescriptorProto::add_reserved_name(const std::string& value) { reserved_name_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) } -#if LANG_CXX11 -inline void DescriptorProto::add_reserved_name(::std::string&& value) { +inline void DescriptorProto::add_reserved_name(std::string&& value) { reserved_name_.Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.DescriptorProto.reserved_name) } -#endif inline void DescriptorProto::add_reserved_name(const char* value) { GOOGLE_DCHECK(value != nullptr); reserved_name_.Add()->assign(value); @@ -7122,12 +6967,12 @@ inline void DescriptorProto::add_reserved_name(const char* value, size_t size) { reserved_name_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.DescriptorProto.reserved_name) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& DescriptorProto::reserved_name() const { // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name) return reserved_name_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* DescriptorProto::mutable_reserved_name() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.DescriptorProto.reserved_name) return &reserved_name_; @@ -7144,24 +6989,24 @@ inline int ExtensionRangeOptions::uninterpreted_option_size() const { inline void ExtensionRangeOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* ExtensionRangeOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.ExtensionRangeOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* ExtensionRangeOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& ExtensionRangeOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& ExtensionRangeOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.ExtensionRangeOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* ExtensionRangeOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ExtensionRangeOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.ExtensionRangeOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& ExtensionRangeOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.ExtensionRangeOptions.uninterpreted_option) return uninterpreted_option_; @@ -7176,79 +7021,77 @@ inline bool FieldDescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void FieldDescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& FieldDescriptorProto::name() const { +inline const std::string& FieldDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name) return name_.Get(); } -inline void FieldDescriptorProto::set_name(const ::std::string& value) { +inline void FieldDescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name) } -#if LANG_CXX11 -inline void FieldDescriptorProto::set_name(::std::string&& value) { +inline void FieldDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.name) } -#endif inline void FieldDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.name) } inline void FieldDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.name) } -inline ::std::string* FieldDescriptorProto::mutable_name() { +inline std::string* FieldDescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FieldDescriptorProto::release_name() { +inline std::string* FieldDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FieldDescriptorProto::set_allocated_name(::std::string* name) { +inline void FieldDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.name) } -inline ::std::string* FieldDescriptorProto::unsafe_arena_release_name() { +inline std::string* FieldDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.name) } @@ -7261,11 +7104,11 @@ inline void FieldDescriptorProto::clear_number() { number_ = 0; _has_bits_[0] &= ~0x00000040u; } -inline ::google::protobuf::int32 FieldDescriptorProto::number() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::number() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number) return number_; } -inline void FieldDescriptorProto::set_number(::google::protobuf::int32 value) { +inline void FieldDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000040u; number_ = value; // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.number) @@ -7279,12 +7122,12 @@ inline void FieldDescriptorProto::clear_label() { label_ = 1; _has_bits_[0] &= ~0x00000100u; } -inline ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label FieldDescriptorProto::label() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label) - return static_cast< ::google::protobuf::FieldDescriptorProto_Label >(label_); + return static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label >(label_); } -inline void FieldDescriptorProto::set_label(::google::protobuf::FieldDescriptorProto_Label value) { - assert(::google::protobuf::FieldDescriptorProto_Label_IsValid(value)); +inline void FieldDescriptorProto::set_label(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label value) { + assert(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_IsValid(value)); _has_bits_[0] |= 0x00000100u; label_ = value; // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.label) @@ -7298,12 +7141,12 @@ inline void FieldDescriptorProto::clear_type() { type_ = 1; _has_bits_[0] &= ~0x00000200u; } -inline ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const { +inline PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type FieldDescriptorProto::type() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type) - return static_cast< ::google::protobuf::FieldDescriptorProto_Type >(type_); + return static_cast< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type >(type_); } -inline void FieldDescriptorProto::set_type(::google::protobuf::FieldDescriptorProto_Type value) { - assert(::google::protobuf::FieldDescriptorProto_Type_IsValid(value)); +inline void FieldDescriptorProto::set_type(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type value) { + assert(PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_IsValid(value)); _has_bits_[0] |= 0x00000200u; type_ = value; // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type) @@ -7314,79 +7157,77 @@ inline bool FieldDescriptorProto::has_type_name() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void FieldDescriptorProto::clear_type_name() { - type_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + type_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000004u; } -inline const ::std::string& FieldDescriptorProto::type_name() const { +inline const std::string& FieldDescriptorProto::type_name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name) return type_name_.Get(); } -inline void FieldDescriptorProto::set_type_name(const ::std::string& value) { +inline void FieldDescriptorProto::set_type_name(const std::string& value) { _has_bits_[0] |= 0x00000004u; - type_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name) } -#if LANG_CXX11 -inline void FieldDescriptorProto::set_type_name(::std::string&& value) { +inline void FieldDescriptorProto::set_type_name(std::string&& value) { _has_bits_[0] |= 0x00000004u; type_name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.type_name) } -#endif inline void FieldDescriptorProto::set_type_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; - type_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.type_name) } inline void FieldDescriptorProto::set_type_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; - type_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.type_name) } -inline ::std::string* FieldDescriptorProto::mutable_type_name() { +inline std::string* FieldDescriptorProto::mutable_type_name() { _has_bits_[0] |= 0x00000004u; // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.type_name) - return type_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return type_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FieldDescriptorProto::release_type_name() { +inline std::string* FieldDescriptorProto::release_type_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.type_name) if (!has_type_name()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return type_name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return type_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FieldDescriptorProto::set_allocated_type_name(::std::string* type_name) { +inline void FieldDescriptorProto::set_allocated_type_name(std::string* type_name) { if (type_name != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - type_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_name, + type_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.type_name) } -inline ::std::string* FieldDescriptorProto::unsafe_arena_release_type_name() { +inline std::string* FieldDescriptorProto::unsafe_arena_release_type_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.type_name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000004u; - return type_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return type_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_type_name( - ::std::string* type_name) { + std::string* type_name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (type_name != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - type_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + type_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.type_name) } @@ -7396,79 +7237,77 @@ inline bool FieldDescriptorProto::has_extendee() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void FieldDescriptorProto::clear_extendee() { - extendee_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + extendee_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000002u; } -inline const ::std::string& FieldDescriptorProto::extendee() const { +inline const std::string& FieldDescriptorProto::extendee() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee) return extendee_.Get(); } -inline void FieldDescriptorProto::set_extendee(const ::std::string& value) { +inline void FieldDescriptorProto::set_extendee(const std::string& value) { _has_bits_[0] |= 0x00000002u; - extendee_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee) } -#if LANG_CXX11 -inline void FieldDescriptorProto::set_extendee(::std::string&& value) { +inline void FieldDescriptorProto::set_extendee(std::string&& value) { _has_bits_[0] |= 0x00000002u; extendee_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.extendee) } -#endif inline void FieldDescriptorProto::set_extendee(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - extendee_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.extendee) } inline void FieldDescriptorProto::set_extendee(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; - extendee_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + extendee_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.extendee) } -inline ::std::string* FieldDescriptorProto::mutable_extendee() { +inline std::string* FieldDescriptorProto::mutable_extendee() { _has_bits_[0] |= 0x00000002u; // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.extendee) - return extendee_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return extendee_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FieldDescriptorProto::release_extendee() { +inline std::string* FieldDescriptorProto::release_extendee() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.extendee) if (!has_extendee()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return extendee_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return extendee_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FieldDescriptorProto::set_allocated_extendee(::std::string* extendee) { +inline void FieldDescriptorProto::set_allocated_extendee(std::string* extendee) { if (extendee != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - extendee_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extendee, + extendee_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), extendee, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.extendee) } -inline ::std::string* FieldDescriptorProto::unsafe_arena_release_extendee() { +inline std::string* FieldDescriptorProto::unsafe_arena_release_extendee() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.extendee) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000002u; - return extendee_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return extendee_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_extendee( - ::std::string* extendee) { + std::string* extendee) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (extendee != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - extendee_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + extendee_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), extendee, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.extendee) } @@ -7478,79 +7317,77 @@ inline bool FieldDescriptorProto::has_default_value() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void FieldDescriptorProto::clear_default_value() { - default_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + default_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000008u; } -inline const ::std::string& FieldDescriptorProto::default_value() const { +inline const std::string& FieldDescriptorProto::default_value() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value) return default_value_.Get(); } -inline void FieldDescriptorProto::set_default_value(const ::std::string& value) { +inline void FieldDescriptorProto::set_default_value(const std::string& value) { _has_bits_[0] |= 0x00000008u; - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value) } -#if LANG_CXX11 -inline void FieldDescriptorProto::set_default_value(::std::string&& value) { +inline void FieldDescriptorProto::set_default_value(std::string&& value) { _has_bits_[0] |= 0x00000008u; default_value_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.default_value) } -#endif inline void FieldDescriptorProto::set_default_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000008u; - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.default_value) } inline void FieldDescriptorProto::set_default_value(const char* value, size_t size) { _has_bits_[0] |= 0x00000008u; - default_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + default_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.default_value) } -inline ::std::string* FieldDescriptorProto::mutable_default_value() { +inline std::string* FieldDescriptorProto::mutable_default_value() { _has_bits_[0] |= 0x00000008u; // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.default_value) - return default_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return default_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FieldDescriptorProto::release_default_value() { +inline std::string* FieldDescriptorProto::release_default_value() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.default_value) if (!has_default_value()) { return nullptr; } _has_bits_[0] &= ~0x00000008u; - return default_value_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return default_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FieldDescriptorProto::set_allocated_default_value(::std::string* default_value) { +inline void FieldDescriptorProto::set_allocated_default_value(std::string* default_value) { if (default_value != nullptr) { _has_bits_[0] |= 0x00000008u; } else { _has_bits_[0] &= ~0x00000008u; } - default_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), default_value, + default_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), default_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.default_value) } -inline ::std::string* FieldDescriptorProto::unsafe_arena_release_default_value() { +inline std::string* FieldDescriptorProto::unsafe_arena_release_default_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.default_value) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000008u; - return default_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return default_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_default_value( - ::std::string* default_value) { + std::string* default_value) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (default_value != nullptr) { _has_bits_[0] |= 0x00000008u; } else { _has_bits_[0] &= ~0x00000008u; } - default_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + default_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), default_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.default_value) } @@ -7563,11 +7400,11 @@ inline void FieldDescriptorProto::clear_oneof_index() { oneof_index_ = 0; _has_bits_[0] &= ~0x00000080u; } -inline ::google::protobuf::int32 FieldDescriptorProto::oneof_index() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 FieldDescriptorProto::oneof_index() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index) return oneof_index_; } -inline void FieldDescriptorProto::set_oneof_index(::google::protobuf::int32 value) { +inline void FieldDescriptorProto::set_oneof_index(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000080u; oneof_index_ = value; // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.oneof_index) @@ -7578,79 +7415,77 @@ inline bool FieldDescriptorProto::has_json_name() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void FieldDescriptorProto::clear_json_name() { - json_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + json_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000010u; } -inline const ::std::string& FieldDescriptorProto::json_name() const { +inline const std::string& FieldDescriptorProto::json_name() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.json_name) return json_name_.Get(); } -inline void FieldDescriptorProto::set_json_name(const ::std::string& value) { +inline void FieldDescriptorProto::set_json_name(const std::string& value) { _has_bits_[0] |= 0x00000010u; - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name) } -#if LANG_CXX11 -inline void FieldDescriptorProto::set_json_name(::std::string&& value) { +inline void FieldDescriptorProto::set_json_name(std::string&& value) { _has_bits_[0] |= 0x00000010u; json_name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.json_name) } -#endif inline void FieldDescriptorProto::set_json_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000010u; - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FieldDescriptorProto.json_name) } inline void FieldDescriptorProto::set_json_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000010u; - json_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + json_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldDescriptorProto.json_name) } -inline ::std::string* FieldDescriptorProto::mutable_json_name() { +inline std::string* FieldDescriptorProto::mutable_json_name() { _has_bits_[0] |= 0x00000010u; // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.json_name) - return json_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return json_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FieldDescriptorProto::release_json_name() { +inline std::string* FieldDescriptorProto::release_json_name() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.json_name) if (!has_json_name()) { return nullptr; } _has_bits_[0] &= ~0x00000010u; - return json_name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return json_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FieldDescriptorProto::set_allocated_json_name(::std::string* json_name) { +inline void FieldDescriptorProto::set_allocated_json_name(std::string* json_name) { if (json_name != nullptr) { _has_bits_[0] |= 0x00000010u; } else { _has_bits_[0] &= ~0x00000010u; } - json_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json_name, + json_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json_name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldDescriptorProto.json_name) } -inline ::std::string* FieldDescriptorProto::unsafe_arena_release_json_name() { +inline std::string* FieldDescriptorProto::unsafe_arena_release_json_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.json_name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000010u; - return json_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return json_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FieldDescriptorProto::unsafe_arena_set_allocated_json_name( - ::std::string* json_name) { + std::string* json_name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (json_name != nullptr) { _has_bits_[0] |= 0x00000010u; } else { _has_bits_[0] &= ~0x00000010u; } - json_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + json_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), json_name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FieldDescriptorProto.json_name) } @@ -7663,48 +7498,48 @@ inline void FieldDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000020u; } -inline const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const { - const ::google::protobuf::FieldOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::FieldOptions& FieldDescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::FieldOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_FieldOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_FieldOptions_default_instance_); } -inline ::google::protobuf::FieldOptions* FieldDescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.FieldDescriptorProto.options) _has_bits_[0] &= ~0x00000020u; - ::google::protobuf::FieldOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::FieldOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::FieldOptions* FieldDescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FieldDescriptorProto.options) _has_bits_[0] &= ~0x00000020u; - ::google::protobuf::FieldOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::FieldOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::FieldOptions* FieldDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::FieldOptions* FieldDescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000020u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::FieldOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.FieldDescriptorProto.options) return options_; } -inline void FieldDescriptorProto::set_allocated_options(::google::protobuf::FieldOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void FieldDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::FieldOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000020u; @@ -7724,79 +7559,77 @@ inline bool OneofDescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void OneofDescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& OneofDescriptorProto::name() const { +inline const std::string& OneofDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name) return name_.Get(); } -inline void OneofDescriptorProto::set_name(const ::std::string& value) { +inline void OneofDescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name) } -#if LANG_CXX11 -inline void OneofDescriptorProto::set_name(::std::string&& value) { +inline void OneofDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.OneofDescriptorProto.name) } -#endif inline void OneofDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.OneofDescriptorProto.name) } inline void OneofDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.OneofDescriptorProto.name) } -inline ::std::string* OneofDescriptorProto::mutable_name() { +inline std::string* OneofDescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* OneofDescriptorProto::release_name() { +inline std::string* OneofDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void OneofDescriptorProto::set_allocated_name(::std::string* name) { +inline void OneofDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.OneofDescriptorProto.name) } -inline ::std::string* OneofDescriptorProto::unsafe_arena_release_name() { +inline std::string* OneofDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.OneofDescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void OneofDescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.OneofDescriptorProto.name) } @@ -7809,48 +7642,48 @@ inline void OneofDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const ::google::protobuf::OneofOptions& OneofDescriptorProto::options() const { - const ::google::protobuf::OneofOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::OneofOptions& OneofDescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::OneofOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_OneofOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_OneofOptions_default_instance_); } -inline ::google::protobuf::OneofOptions* OneofDescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.OneofDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::OneofOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::OneofOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::OneofOptions* OneofDescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.OneofDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::OneofOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::OneofOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::OneofOptions* OneofDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::OneofOptions* OneofDescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::OneofOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.OneofDescriptorProto.options) return options_; } -inline void OneofDescriptorProto::set_allocated_options(::google::protobuf::OneofOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void OneofDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::OneofOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000002u; @@ -7873,11 +7706,11 @@ inline void EnumDescriptorProto_EnumReservedRange::clear_start() { start_ = 0; _has_bits_[0] &= ~0x00000001u; } -inline ::google::protobuf::int32 EnumDescriptorProto_EnumReservedRange::start() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::start() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.start) return start_; } -inline void EnumDescriptorProto_EnumReservedRange::set_start(::google::protobuf::int32 value) { +inline void EnumDescriptorProto_EnumReservedRange::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000001u; start_ = value; // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.EnumReservedRange.start) @@ -7891,11 +7724,11 @@ inline void EnumDescriptorProto_EnumReservedRange::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::google::protobuf::int32 EnumDescriptorProto_EnumReservedRange::end() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumDescriptorProto_EnumReservedRange::end() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.end) return end_; } -inline void EnumDescriptorProto_EnumReservedRange::set_end(::google::protobuf::int32 value) { +inline void EnumDescriptorProto_EnumReservedRange::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; end_ = value; // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.EnumReservedRange.end) @@ -7910,79 +7743,77 @@ inline bool EnumDescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void EnumDescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& EnumDescriptorProto::name() const { +inline const std::string& EnumDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name) return name_.Get(); } -inline void EnumDescriptorProto::set_name(const ::std::string& value) { +inline void EnumDescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name) } -#if LANG_CXX11 -inline void EnumDescriptorProto::set_name(::std::string&& value) { +inline void EnumDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumDescriptorProto.name) } -#endif inline void EnumDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumDescriptorProto.name) } inline void EnumDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.name) } -inline ::std::string* EnumDescriptorProto::mutable_name() { +inline std::string* EnumDescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* EnumDescriptorProto::release_name() { +inline std::string* EnumDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void EnumDescriptorProto::set_allocated_name(::std::string* name) { +inline void EnumDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumDescriptorProto.name) } -inline ::std::string* EnumDescriptorProto::unsafe_arena_release_name() { +inline std::string* EnumDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumDescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void EnumDescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumDescriptorProto.name) } @@ -7994,24 +7825,24 @@ inline int EnumDescriptorProto::value_size() const { inline void EnumDescriptorProto::clear_value() { value_.Clear(); } -inline ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) { +inline PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::mutable_value(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.value) return value_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >* EnumDescriptorProto::mutable_value() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.value) return &value_; } -inline const ::google::protobuf::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const { +inline const PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto& EnumDescriptorProto::value(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value) return value_.Get(index); } -inline ::google::protobuf::EnumValueDescriptorProto* EnumDescriptorProto::add_value() { +inline PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto* EnumDescriptorProto::add_value() { // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.value) return value_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumValueDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumValueDescriptorProto >& EnumDescriptorProto::value() const { // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value) return value_; @@ -8025,48 +7856,48 @@ inline void EnumDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const ::google::protobuf::EnumOptions& EnumDescriptorProto::options() const { - const ::google::protobuf::EnumOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::EnumOptions& EnumDescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::EnumOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_EnumOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_EnumOptions_default_instance_); } -inline ::google::protobuf::EnumOptions* EnumDescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.EnumDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::EnumOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::EnumOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::EnumOptions* EnumDescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::EnumOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::EnumOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::EnumOptions* EnumDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::EnumOptions* EnumDescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::EnumOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.options) return options_; } -inline void EnumDescriptorProto::set_allocated_options(::google::protobuf::EnumOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void EnumDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000002u; @@ -8084,24 +7915,24 @@ inline int EnumDescriptorProto::reserved_range_size() const { inline void EnumDescriptorProto::clear_reserved_range() { reserved_range_.Clear(); } -inline ::google::protobuf::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::mutable_reserved_range(int index) { +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::mutable_reserved_range(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.reserved_range) return reserved_range_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto_EnumReservedRange >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >* EnumDescriptorProto::mutable_reserved_range() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.reserved_range) return &reserved_range_; } -inline const ::google::protobuf::EnumDescriptorProto_EnumReservedRange& EnumDescriptorProto::reserved_range(int index) const { +inline const PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange& EnumDescriptorProto::reserved_range(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.reserved_range) return reserved_range_.Get(index); } -inline ::google::protobuf::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::add_reserved_range() { +inline PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange* EnumDescriptorProto::add_reserved_range() { // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_range) return reserved_range_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::EnumDescriptorProto_EnumReservedRange >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::EnumDescriptorProto_EnumReservedRange >& EnumDescriptorProto::reserved_range() const { // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.reserved_range) return reserved_range_; @@ -8114,24 +7945,22 @@ inline int EnumDescriptorProto::reserved_name_size() const { inline void EnumDescriptorProto::clear_reserved_name() { reserved_name_.Clear(); } -inline const ::std::string& EnumDescriptorProto::reserved_name(int index) const { +inline const std::string& EnumDescriptorProto::reserved_name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.reserved_name) return reserved_name_.Get(index); } -inline ::std::string* EnumDescriptorProto::mutable_reserved_name(int index) { +inline std::string* EnumDescriptorProto::mutable_reserved_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumDescriptorProto.reserved_name) return reserved_name_.Mutable(index); } -inline void EnumDescriptorProto::set_reserved_name(int index, const ::std::string& value) { +inline void EnumDescriptorProto::set_reserved_name(int index, const std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name) reserved_name_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void EnumDescriptorProto::set_reserved_name(int index, ::std::string&& value) { +inline void EnumDescriptorProto::set_reserved_name(int index, std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.reserved_name) reserved_name_.Mutable(index)->assign(std::move(value)); } -#endif inline void EnumDescriptorProto::set_reserved_name(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); reserved_name_.Mutable(index)->assign(value); @@ -8142,20 +7971,18 @@ inline void EnumDescriptorProto::set_reserved_name(int index, const char* value, reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumDescriptorProto.reserved_name) } -inline ::std::string* EnumDescriptorProto::add_reserved_name() { +inline std::string* EnumDescriptorProto::add_reserved_name() { // @@protoc_insertion_point(field_add_mutable:google.protobuf.EnumDescriptorProto.reserved_name) return reserved_name_.Add(); } -inline void EnumDescriptorProto::add_reserved_name(const ::std::string& value) { +inline void EnumDescriptorProto::add_reserved_name(const std::string& value) { reserved_name_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name) } -#if LANG_CXX11 -inline void EnumDescriptorProto::add_reserved_name(::std::string&& value) { +inline void EnumDescriptorProto::add_reserved_name(std::string&& value) { reserved_name_.Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.EnumDescriptorProto.reserved_name) } -#endif inline void EnumDescriptorProto::add_reserved_name(const char* value) { GOOGLE_DCHECK(value != nullptr); reserved_name_.Add()->assign(value); @@ -8165,12 +7992,12 @@ inline void EnumDescriptorProto::add_reserved_name(const char* value, size_t siz reserved_name_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.EnumDescriptorProto.reserved_name) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& EnumDescriptorProto::reserved_name() const { // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.reserved_name) return reserved_name_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* EnumDescriptorProto::mutable_reserved_name() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumDescriptorProto.reserved_name) return &reserved_name_; @@ -8185,79 +8012,77 @@ inline bool EnumValueDescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void EnumValueDescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& EnumValueDescriptorProto::name() const { +inline const std::string& EnumValueDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name) return name_.Get(); } -inline void EnumValueDescriptorProto::set_name(const ::std::string& value) { +inline void EnumValueDescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name) } -#if LANG_CXX11 -inline void EnumValueDescriptorProto::set_name(::std::string&& value) { +inline void EnumValueDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumValueDescriptorProto.name) } -#endif inline void EnumValueDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.EnumValueDescriptorProto.name) } inline void EnumValueDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.EnumValueDescriptorProto.name) } -inline ::std::string* EnumValueDescriptorProto::mutable_name() { +inline std::string* EnumValueDescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* EnumValueDescriptorProto::release_name() { +inline std::string* EnumValueDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void EnumValueDescriptorProto::set_allocated_name(::std::string* name) { +inline void EnumValueDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.EnumValueDescriptorProto.name) } -inline ::std::string* EnumValueDescriptorProto::unsafe_arena_release_name() { +inline std::string* EnumValueDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValueDescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void EnumValueDescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.EnumValueDescriptorProto.name) } @@ -8270,11 +8095,11 @@ inline void EnumValueDescriptorProto::clear_number() { number_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::google::protobuf::int32 EnumValueDescriptorProto::number() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 EnumValueDescriptorProto::number() const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number) return number_; } -inline void EnumValueDescriptorProto::set_number(::google::protobuf::int32 value) { +inline void EnumValueDescriptorProto::set_number(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; number_ = value; // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.number) @@ -8288,48 +8113,48 @@ inline void EnumValueDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const ::google::protobuf::EnumValueOptions& EnumValueDescriptorProto::options() const { - const ::google::protobuf::EnumValueOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::EnumValueOptions& EnumValueDescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::EnumValueOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_EnumValueOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_EnumValueOptions_default_instance_); } -inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.EnumValueDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::EnumValueOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.EnumValueDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::EnumValueOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::EnumValueOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::EnumValueOptions* EnumValueDescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::EnumValueOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueDescriptorProto.options) return options_; } -inline void EnumValueDescriptorProto::set_allocated_options(::google::protobuf::EnumValueOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void EnumValueDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::EnumValueOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000002u; @@ -8349,79 +8174,77 @@ inline bool ServiceDescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void ServiceDescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& ServiceDescriptorProto::name() const { +inline const std::string& ServiceDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.name) return name_.Get(); } -inline void ServiceDescriptorProto::set_name(const ::std::string& value) { +inline void ServiceDescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name) } -#if LANG_CXX11 -inline void ServiceDescriptorProto::set_name(::std::string&& value) { +inline void ServiceDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.ServiceDescriptorProto.name) } -#endif inline void ServiceDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.ServiceDescriptorProto.name) } inline void ServiceDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.ServiceDescriptorProto.name) } -inline ::std::string* ServiceDescriptorProto::mutable_name() { +inline std::string* ServiceDescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* ServiceDescriptorProto::release_name() { +inline std::string* ServiceDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void ServiceDescriptorProto::set_allocated_name(::std::string* name) { +inline void ServiceDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.ServiceDescriptorProto.name) } -inline ::std::string* ServiceDescriptorProto::unsafe_arena_release_name() { +inline std::string* ServiceDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.ServiceDescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void ServiceDescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.ServiceDescriptorProto.name) } @@ -8433,24 +8256,24 @@ inline int ServiceDescriptorProto::method_size() const { inline void ServiceDescriptorProto::clear_method() { method_.Clear(); } -inline ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) { +inline PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::mutable_method(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.method) return method_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >* ServiceDescriptorProto::mutable_method() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceDescriptorProto.method) return &method_; } -inline const ::google::protobuf::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const { +inline const PROTOBUF_NAMESPACE_ID::MethodDescriptorProto& ServiceDescriptorProto::method(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.method) return method_.Get(index); } -inline ::google::protobuf::MethodDescriptorProto* ServiceDescriptorProto::add_method() { +inline PROTOBUF_NAMESPACE_ID::MethodDescriptorProto* ServiceDescriptorProto::add_method() { // @@protoc_insertion_point(field_add:google.protobuf.ServiceDescriptorProto.method) return method_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::MethodDescriptorProto >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::MethodDescriptorProto >& ServiceDescriptorProto::method() const { // @@protoc_insertion_point(field_list:google.protobuf.ServiceDescriptorProto.method) return method_; @@ -8464,48 +8287,48 @@ inline void ServiceDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000002u; } -inline const ::google::protobuf::ServiceOptions& ServiceDescriptorProto::options() const { - const ::google::protobuf::ServiceOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::ServiceOptions& ServiceDescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::ServiceOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.ServiceDescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_ServiceOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_ServiceOptions_default_instance_); } -inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.ServiceDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::ServiceOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.ServiceDescriptorProto.options) _has_bits_[0] &= ~0x00000002u; - ::google::protobuf::ServiceOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::ServiceOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::ServiceOptions* ServiceDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::ServiceOptions* ServiceDescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000002u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::ServiceOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceDescriptorProto.options) return options_; } -inline void ServiceDescriptorProto::set_allocated_options(::google::protobuf::ServiceOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void ServiceDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::ServiceOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000002u; @@ -8525,79 +8348,77 @@ inline bool MethodDescriptorProto::has_name() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void MethodDescriptorProto::clear_name() { - name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& MethodDescriptorProto::name() const { +inline const std::string& MethodDescriptorProto::name() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.name) return name_.Get(); } -inline void MethodDescriptorProto::set_name(const ::std::string& value) { +inline void MethodDescriptorProto::set_name(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name) } -#if LANG_CXX11 -inline void MethodDescriptorProto::set_name(::std::string&& value) { +inline void MethodDescriptorProto::set_name(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.name) } -#endif inline void MethodDescriptorProto::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.name) } inline void MethodDescriptorProto::set_name(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.name) } -inline ::std::string* MethodDescriptorProto::mutable_name() { +inline std::string* MethodDescriptorProto::mutable_name() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.name) - return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* MethodDescriptorProto::release_name() { +inline std::string* MethodDescriptorProto::release_name() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.name) if (!has_name()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void MethodDescriptorProto::set_allocated_name(::std::string* name) { +inline void MethodDescriptorProto::set_allocated_name(std::string* name) { if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.name) } -inline ::std::string* MethodDescriptorProto::unsafe_arena_release_name() { +inline std::string* MethodDescriptorProto::unsafe_arena_release_name() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.name) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void MethodDescriptorProto::unsafe_arena_set_allocated_name( - ::std::string* name) { + std::string* name) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.name) } @@ -8607,79 +8428,77 @@ inline bool MethodDescriptorProto::has_input_type() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void MethodDescriptorProto::clear_input_type() { - input_type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + input_type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000002u; } -inline const ::std::string& MethodDescriptorProto::input_type() const { +inline const std::string& MethodDescriptorProto::input_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.input_type) return input_type_.Get(); } -inline void MethodDescriptorProto::set_input_type(const ::std::string& value) { +inline void MethodDescriptorProto::set_input_type(const std::string& value) { _has_bits_[0] |= 0x00000002u; - input_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type) } -#if LANG_CXX11 -inline void MethodDescriptorProto::set_input_type(::std::string&& value) { +inline void MethodDescriptorProto::set_input_type(std::string&& value) { _has_bits_[0] |= 0x00000002u; input_type_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.input_type) } -#endif inline void MethodDescriptorProto::set_input_type(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - input_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.input_type) } inline void MethodDescriptorProto::set_input_type(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; - input_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + input_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.input_type) } -inline ::std::string* MethodDescriptorProto::mutable_input_type() { +inline std::string* MethodDescriptorProto::mutable_input_type() { _has_bits_[0] |= 0x00000002u; // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.input_type) - return input_type_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return input_type_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* MethodDescriptorProto::release_input_type() { +inline std::string* MethodDescriptorProto::release_input_type() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.input_type) if (!has_input_type()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return input_type_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return input_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void MethodDescriptorProto::set_allocated_input_type(::std::string* input_type) { +inline void MethodDescriptorProto::set_allocated_input_type(std::string* input_type) { if (input_type != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - input_type_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), input_type, + input_type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), input_type, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.input_type) } -inline ::std::string* MethodDescriptorProto::unsafe_arena_release_input_type() { +inline std::string* MethodDescriptorProto::unsafe_arena_release_input_type() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.input_type) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000002u; - return input_type_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return input_type_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void MethodDescriptorProto::unsafe_arena_set_allocated_input_type( - ::std::string* input_type) { + std::string* input_type) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (input_type != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - input_type_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + input_type_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), input_type, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.input_type) } @@ -8689,79 +8508,77 @@ inline bool MethodDescriptorProto::has_output_type() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void MethodDescriptorProto::clear_output_type() { - output_type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + output_type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000004u; } -inline const ::std::string& MethodDescriptorProto::output_type() const { +inline const std::string& MethodDescriptorProto::output_type() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.output_type) return output_type_.Get(); } -inline void MethodDescriptorProto::set_output_type(const ::std::string& value) { +inline void MethodDescriptorProto::set_output_type(const std::string& value) { _has_bits_[0] |= 0x00000004u; - output_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type) } -#if LANG_CXX11 -inline void MethodDescriptorProto::set_output_type(::std::string&& value) { +inline void MethodDescriptorProto::set_output_type(std::string&& value) { _has_bits_[0] |= 0x00000004u; output_type_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.output_type) } -#endif inline void MethodDescriptorProto::set_output_type(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; - output_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.MethodDescriptorProto.output_type) } inline void MethodDescriptorProto::set_output_type(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; - output_type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + output_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.MethodDescriptorProto.output_type) } -inline ::std::string* MethodDescriptorProto::mutable_output_type() { +inline std::string* MethodDescriptorProto::mutable_output_type() { _has_bits_[0] |= 0x00000004u; // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.output_type) - return output_type_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return output_type_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* MethodDescriptorProto::release_output_type() { +inline std::string* MethodDescriptorProto::release_output_type() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.output_type) if (!has_output_type()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return output_type_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return output_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void MethodDescriptorProto::set_allocated_output_type(::std::string* output_type) { +inline void MethodDescriptorProto::set_allocated_output_type(std::string* output_type) { if (output_type != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - output_type_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), output_type, + output_type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), output_type, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.MethodDescriptorProto.output_type) } -inline ::std::string* MethodDescriptorProto::unsafe_arena_release_output_type() { +inline std::string* MethodDescriptorProto::unsafe_arena_release_output_type() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.output_type) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000004u; - return output_type_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return output_type_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void MethodDescriptorProto::unsafe_arena_set_allocated_output_type( - ::std::string* output_type) { + std::string* output_type) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (output_type != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - output_type_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + output_type_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), output_type, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.MethodDescriptorProto.output_type) } @@ -8774,48 +8591,48 @@ inline void MethodDescriptorProto::clear_options() { if (options_ != nullptr) options_->Clear(); _has_bits_[0] &= ~0x00000008u; } -inline const ::google::protobuf::MethodOptions& MethodDescriptorProto::options() const { - const ::google::protobuf::MethodOptions* p = options_; +inline const PROTOBUF_NAMESPACE_ID::MethodOptions& MethodDescriptorProto::options() const { + const PROTOBUF_NAMESPACE_ID::MethodOptions* p = options_; // @@protoc_insertion_point(field_get:google.protobuf.MethodDescriptorProto.options) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_MethodOptions_default_instance_); + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_MethodOptions_default_instance_); } -inline ::google::protobuf::MethodOptions* MethodDescriptorProto::release_options() { +inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::release_options() { // @@protoc_insertion_point(field_release:google.protobuf.MethodDescriptorProto.options) _has_bits_[0] &= ~0x00000008u; - ::google::protobuf::MethodOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::MethodOptions* temp = options_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } options_ = nullptr; return temp; } -inline ::google::protobuf::MethodOptions* MethodDescriptorProto::unsafe_arena_release_options() { +inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::unsafe_arena_release_options() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.MethodDescriptorProto.options) _has_bits_[0] &= ~0x00000008u; - ::google::protobuf::MethodOptions* temp = options_; + PROTOBUF_NAMESPACE_ID::MethodOptions* temp = options_; options_ = nullptr; return temp; } -inline ::google::protobuf::MethodOptions* MethodDescriptorProto::mutable_options() { +inline PROTOBUF_NAMESPACE_ID::MethodOptions* MethodDescriptorProto::mutable_options() { _has_bits_[0] |= 0x00000008u; if (options_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::MethodOptions>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); options_ = p; } // @@protoc_insertion_point(field_mutable:google.protobuf.MethodDescriptorProto.options) return options_; } -inline void MethodDescriptorProto::set_allocated_options(::google::protobuf::MethodOptions* options) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline void MethodDescriptorProto::set_allocated_options(PROTOBUF_NAMESPACE_ID::MethodOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete options_; } if (options) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(options); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(options); if (message_arena != submessage_arena) { - options = ::google::protobuf::internal::GetOwnedMessage( + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, options, submessage_arena); } _has_bits_[0] |= 0x00000008u; @@ -8871,79 +8688,77 @@ inline bool FileOptions::has_java_package() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void FileOptions::clear_java_package() { - java_package_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + java_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& FileOptions::java_package() const { +inline const std::string& FileOptions::java_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_package) return java_package_.Get(); } -inline void FileOptions::set_java_package(const ::std::string& value) { +inline void FileOptions::set_java_package(const std::string& value) { _has_bits_[0] |= 0x00000001u; - java_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package) } -#if LANG_CXX11 -inline void FileOptions::set_java_package(::std::string&& value) { +inline void FileOptions::set_java_package(std::string&& value) { _has_bits_[0] |= 0x00000001u; java_package_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_package) } -#endif inline void FileOptions::set_java_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - java_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_package) } inline void FileOptions::set_java_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - java_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + java_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_package) } -inline ::std::string* FileOptions::mutable_java_package() { +inline std::string* FileOptions::mutable_java_package() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_package) - return java_package_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_java_package() { +inline std::string* FileOptions::release_java_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_package) if (!has_java_package()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return java_package_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_java_package(::std::string* java_package) { +inline void FileOptions::set_allocated_java_package(std::string* java_package) { if (java_package != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - java_package_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_package, + java_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_package) } -inline ::std::string* FileOptions::unsafe_arena_release_java_package() { +inline std::string* FileOptions::unsafe_arena_release_java_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.java_package) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return java_package_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return java_package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_java_package( - ::std::string* java_package) { + std::string* java_package) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (java_package != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - java_package_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + java_package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.java_package) } @@ -8953,79 +8768,77 @@ inline bool FileOptions::has_java_outer_classname() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void FileOptions::clear_java_outer_classname() { - java_outer_classname_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + java_outer_classname_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000002u; } -inline const ::std::string& FileOptions::java_outer_classname() const { +inline const std::string& FileOptions::java_outer_classname() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.java_outer_classname) return java_outer_classname_.Get(); } -inline void FileOptions::set_java_outer_classname(const ::std::string& value) { +inline void FileOptions::set_java_outer_classname(const std::string& value) { _has_bits_[0] |= 0x00000002u; - java_outer_classname_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname) } -#if LANG_CXX11 -inline void FileOptions::set_java_outer_classname(::std::string&& value) { +inline void FileOptions::set_java_outer_classname(std::string&& value) { _has_bits_[0] |= 0x00000002u; java_outer_classname_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_outer_classname) } -#endif inline void FileOptions::set_java_outer_classname(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - java_outer_classname_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.java_outer_classname) } inline void FileOptions::set_java_outer_classname(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; - java_outer_classname_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + java_outer_classname_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.java_outer_classname) } -inline ::std::string* FileOptions::mutable_java_outer_classname() { +inline std::string* FileOptions::mutable_java_outer_classname() { _has_bits_[0] |= 0x00000002u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.java_outer_classname) - return java_outer_classname_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_outer_classname_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_java_outer_classname() { +inline std::string* FileOptions::release_java_outer_classname() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.java_outer_classname) if (!has_java_outer_classname()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return java_outer_classname_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return java_outer_classname_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_java_outer_classname(::std::string* java_outer_classname) { +inline void FileOptions::set_allocated_java_outer_classname(std::string* java_outer_classname) { if (java_outer_classname != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - java_outer_classname_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), java_outer_classname, + java_outer_classname_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_outer_classname, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.java_outer_classname) } -inline ::std::string* FileOptions::unsafe_arena_release_java_outer_classname() { +inline std::string* FileOptions::unsafe_arena_release_java_outer_classname() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.java_outer_classname) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000002u; - return java_outer_classname_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return java_outer_classname_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_java_outer_classname( - ::std::string* java_outer_classname) { + std::string* java_outer_classname) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (java_outer_classname != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - java_outer_classname_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + java_outer_classname_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), java_outer_classname, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.java_outer_classname) } @@ -9092,12 +8905,12 @@ inline void FileOptions::clear_optimize_for() { optimize_for_ = 1; _has_bits_[0] &= ~0x00080000u; } -inline ::google::protobuf::FileOptions_OptimizeMode FileOptions::optimize_for() const { +inline PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode FileOptions::optimize_for() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.optimize_for) - return static_cast< ::google::protobuf::FileOptions_OptimizeMode >(optimize_for_); + return static_cast< PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode >(optimize_for_); } -inline void FileOptions::set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value) { - assert(::google::protobuf::FileOptions_OptimizeMode_IsValid(value)); +inline void FileOptions::set_optimize_for(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode value) { + assert(PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_IsValid(value)); _has_bits_[0] |= 0x00080000u; optimize_for_ = value; // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.optimize_for) @@ -9108,79 +8921,77 @@ inline bool FileOptions::has_go_package() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void FileOptions::clear_go_package() { - go_package_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + go_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000004u; } -inline const ::std::string& FileOptions::go_package() const { +inline const std::string& FileOptions::go_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.go_package) return go_package_.Get(); } -inline void FileOptions::set_go_package(const ::std::string& value) { +inline void FileOptions::set_go_package(const std::string& value) { _has_bits_[0] |= 0x00000004u; - go_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package) } -#if LANG_CXX11 -inline void FileOptions::set_go_package(::std::string&& value) { +inline void FileOptions::set_go_package(std::string&& value) { _has_bits_[0] |= 0x00000004u; go_package_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.go_package) } -#endif inline void FileOptions::set_go_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; - go_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.go_package) } inline void FileOptions::set_go_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; - go_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + go_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.go_package) } -inline ::std::string* FileOptions::mutable_go_package() { +inline std::string* FileOptions::mutable_go_package() { _has_bits_[0] |= 0x00000004u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.go_package) - return go_package_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return go_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_go_package() { +inline std::string* FileOptions::release_go_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.go_package) if (!has_go_package()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return go_package_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return go_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_go_package(::std::string* go_package) { +inline void FileOptions::set_allocated_go_package(std::string* go_package) { if (go_package != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - go_package_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), go_package, + go_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), go_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.go_package) } -inline ::std::string* FileOptions::unsafe_arena_release_go_package() { +inline std::string* FileOptions::unsafe_arena_release_go_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.go_package) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000004u; - return go_package_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return go_package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_go_package( - ::std::string* go_package) { + std::string* go_package) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (go_package != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - go_package_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + go_package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), go_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.go_package) } @@ -9298,79 +9109,77 @@ inline bool FileOptions::has_objc_class_prefix() const { return (_has_bits_[0] & 0x00000008u) != 0; } inline void FileOptions::clear_objc_class_prefix() { - objc_class_prefix_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + objc_class_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000008u; } -inline const ::std::string& FileOptions::objc_class_prefix() const { +inline const std::string& FileOptions::objc_class_prefix() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.objc_class_prefix) return objc_class_prefix_.Get(); } -inline void FileOptions::set_objc_class_prefix(const ::std::string& value) { +inline void FileOptions::set_objc_class_prefix(const std::string& value) { _has_bits_[0] |= 0x00000008u; - objc_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix) } -#if LANG_CXX11 -inline void FileOptions::set_objc_class_prefix(::std::string&& value) { +inline void FileOptions::set_objc_class_prefix(std::string&& value) { _has_bits_[0] |= 0x00000008u; objc_class_prefix_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.objc_class_prefix) } -#endif inline void FileOptions::set_objc_class_prefix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000008u; - objc_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.objc_class_prefix) } inline void FileOptions::set_objc_class_prefix(const char* value, size_t size) { _has_bits_[0] |= 0x00000008u; - objc_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + objc_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.objc_class_prefix) } -inline ::std::string* FileOptions::mutable_objc_class_prefix() { +inline std::string* FileOptions::mutable_objc_class_prefix() { _has_bits_[0] |= 0x00000008u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.objc_class_prefix) - return objc_class_prefix_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return objc_class_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_objc_class_prefix() { +inline std::string* FileOptions::release_objc_class_prefix() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.objc_class_prefix) if (!has_objc_class_prefix()) { return nullptr; } _has_bits_[0] &= ~0x00000008u; - return objc_class_prefix_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return objc_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_objc_class_prefix(::std::string* objc_class_prefix) { +inline void FileOptions::set_allocated_objc_class_prefix(std::string* objc_class_prefix) { if (objc_class_prefix != nullptr) { _has_bits_[0] |= 0x00000008u; } else { _has_bits_[0] &= ~0x00000008u; } - objc_class_prefix_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), objc_class_prefix, + objc_class_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), objc_class_prefix, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.objc_class_prefix) } -inline ::std::string* FileOptions::unsafe_arena_release_objc_class_prefix() { +inline std::string* FileOptions::unsafe_arena_release_objc_class_prefix() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.objc_class_prefix) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000008u; - return objc_class_prefix_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return objc_class_prefix_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_objc_class_prefix( - ::std::string* objc_class_prefix) { + std::string* objc_class_prefix) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (objc_class_prefix != nullptr) { _has_bits_[0] |= 0x00000008u; } else { _has_bits_[0] &= ~0x00000008u; } - objc_class_prefix_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + objc_class_prefix_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), objc_class_prefix, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.objc_class_prefix) } @@ -9380,79 +9189,77 @@ inline bool FileOptions::has_csharp_namespace() const { return (_has_bits_[0] & 0x00000010u) != 0; } inline void FileOptions::clear_csharp_namespace() { - csharp_namespace_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + csharp_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000010u; } -inline const ::std::string& FileOptions::csharp_namespace() const { +inline const std::string& FileOptions::csharp_namespace() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.csharp_namespace) return csharp_namespace_.Get(); } -inline void FileOptions::set_csharp_namespace(const ::std::string& value) { +inline void FileOptions::set_csharp_namespace(const std::string& value) { _has_bits_[0] |= 0x00000010u; - csharp_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace) } -#if LANG_CXX11 -inline void FileOptions::set_csharp_namespace(::std::string&& value) { +inline void FileOptions::set_csharp_namespace(std::string&& value) { _has_bits_[0] |= 0x00000010u; csharp_namespace_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.csharp_namespace) } -#endif inline void FileOptions::set_csharp_namespace(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000010u; - csharp_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.csharp_namespace) } inline void FileOptions::set_csharp_namespace(const char* value, size_t size) { _has_bits_[0] |= 0x00000010u; - csharp_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + csharp_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.csharp_namespace) } -inline ::std::string* FileOptions::mutable_csharp_namespace() { +inline std::string* FileOptions::mutable_csharp_namespace() { _has_bits_[0] |= 0x00000010u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.csharp_namespace) - return csharp_namespace_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return csharp_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_csharp_namespace() { +inline std::string* FileOptions::release_csharp_namespace() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.csharp_namespace) if (!has_csharp_namespace()) { return nullptr; } _has_bits_[0] &= ~0x00000010u; - return csharp_namespace_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return csharp_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_csharp_namespace(::std::string* csharp_namespace) { +inline void FileOptions::set_allocated_csharp_namespace(std::string* csharp_namespace) { if (csharp_namespace != nullptr) { _has_bits_[0] |= 0x00000010u; } else { _has_bits_[0] &= ~0x00000010u; } - csharp_namespace_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), csharp_namespace, + csharp_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), csharp_namespace, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.csharp_namespace) } -inline ::std::string* FileOptions::unsafe_arena_release_csharp_namespace() { +inline std::string* FileOptions::unsafe_arena_release_csharp_namespace() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.csharp_namespace) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000010u; - return csharp_namespace_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return csharp_namespace_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_csharp_namespace( - ::std::string* csharp_namespace) { + std::string* csharp_namespace) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (csharp_namespace != nullptr) { _has_bits_[0] |= 0x00000010u; } else { _has_bits_[0] &= ~0x00000010u; } - csharp_namespace_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + csharp_namespace_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), csharp_namespace, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.csharp_namespace) } @@ -9462,79 +9269,77 @@ inline bool FileOptions::has_swift_prefix() const { return (_has_bits_[0] & 0x00000020u) != 0; } inline void FileOptions::clear_swift_prefix() { - swift_prefix_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + swift_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000020u; } -inline const ::std::string& FileOptions::swift_prefix() const { +inline const std::string& FileOptions::swift_prefix() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.swift_prefix) return swift_prefix_.Get(); } -inline void FileOptions::set_swift_prefix(const ::std::string& value) { +inline void FileOptions::set_swift_prefix(const std::string& value) { _has_bits_[0] |= 0x00000020u; - swift_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.swift_prefix) } -#if LANG_CXX11 -inline void FileOptions::set_swift_prefix(::std::string&& value) { +inline void FileOptions::set_swift_prefix(std::string&& value) { _has_bits_[0] |= 0x00000020u; swift_prefix_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.swift_prefix) } -#endif inline void FileOptions::set_swift_prefix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000020u; - swift_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.swift_prefix) } inline void FileOptions::set_swift_prefix(const char* value, size_t size) { _has_bits_[0] |= 0x00000020u; - swift_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + swift_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.swift_prefix) } -inline ::std::string* FileOptions::mutable_swift_prefix() { +inline std::string* FileOptions::mutable_swift_prefix() { _has_bits_[0] |= 0x00000020u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.swift_prefix) - return swift_prefix_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return swift_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_swift_prefix() { +inline std::string* FileOptions::release_swift_prefix() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.swift_prefix) if (!has_swift_prefix()) { return nullptr; } _has_bits_[0] &= ~0x00000020u; - return swift_prefix_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return swift_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_swift_prefix(::std::string* swift_prefix) { +inline void FileOptions::set_allocated_swift_prefix(std::string* swift_prefix) { if (swift_prefix != nullptr) { _has_bits_[0] |= 0x00000020u; } else { _has_bits_[0] &= ~0x00000020u; } - swift_prefix_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), swift_prefix, + swift_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), swift_prefix, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.swift_prefix) } -inline ::std::string* FileOptions::unsafe_arena_release_swift_prefix() { +inline std::string* FileOptions::unsafe_arena_release_swift_prefix() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.swift_prefix) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000020u; - return swift_prefix_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return swift_prefix_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_swift_prefix( - ::std::string* swift_prefix) { + std::string* swift_prefix) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (swift_prefix != nullptr) { _has_bits_[0] |= 0x00000020u; } else { _has_bits_[0] &= ~0x00000020u; } - swift_prefix_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + swift_prefix_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), swift_prefix, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.swift_prefix) } @@ -9544,79 +9349,77 @@ inline bool FileOptions::has_php_class_prefix() const { return (_has_bits_[0] & 0x00000040u) != 0; } inline void FileOptions::clear_php_class_prefix() { - php_class_prefix_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + php_class_prefix_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000040u; } -inline const ::std::string& FileOptions::php_class_prefix() const { +inline const std::string& FileOptions::php_class_prefix() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_class_prefix) return php_class_prefix_.Get(); } -inline void FileOptions::set_php_class_prefix(const ::std::string& value) { +inline void FileOptions::set_php_class_prefix(const std::string& value) { _has_bits_[0] |= 0x00000040u; - php_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_class_prefix) } -#if LANG_CXX11 -inline void FileOptions::set_php_class_prefix(::std::string&& value) { +inline void FileOptions::set_php_class_prefix(std::string&& value) { _has_bits_[0] |= 0x00000040u; php_class_prefix_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.php_class_prefix) } -#endif inline void FileOptions::set_php_class_prefix(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000040u; - php_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.php_class_prefix) } inline void FileOptions::set_php_class_prefix(const char* value, size_t size) { _has_bits_[0] |= 0x00000040u; - php_class_prefix_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + php_class_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.php_class_prefix) } -inline ::std::string* FileOptions::mutable_php_class_prefix() { +inline std::string* FileOptions::mutable_php_class_prefix() { _has_bits_[0] |= 0x00000040u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_class_prefix) - return php_class_prefix_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_class_prefix_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_php_class_prefix() { +inline std::string* FileOptions::release_php_class_prefix() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_class_prefix) if (!has_php_class_prefix()) { return nullptr; } _has_bits_[0] &= ~0x00000040u; - return php_class_prefix_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_class_prefix_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_php_class_prefix(::std::string* php_class_prefix) { +inline void FileOptions::set_allocated_php_class_prefix(std::string* php_class_prefix) { if (php_class_prefix != nullptr) { _has_bits_[0] |= 0x00000040u; } else { _has_bits_[0] &= ~0x00000040u; } - php_class_prefix_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), php_class_prefix, + php_class_prefix_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_class_prefix, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_class_prefix) } -inline ::std::string* FileOptions::unsafe_arena_release_php_class_prefix() { +inline std::string* FileOptions::unsafe_arena_release_php_class_prefix() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.php_class_prefix) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000040u; - return php_class_prefix_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return php_class_prefix_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_php_class_prefix( - ::std::string* php_class_prefix) { + std::string* php_class_prefix) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (php_class_prefix != nullptr) { _has_bits_[0] |= 0x00000040u; } else { _has_bits_[0] &= ~0x00000040u; } - php_class_prefix_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + php_class_prefix_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_class_prefix, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.php_class_prefix) } @@ -9626,79 +9429,77 @@ inline bool FileOptions::has_php_namespace() const { return (_has_bits_[0] & 0x00000080u) != 0; } inline void FileOptions::clear_php_namespace() { - php_namespace_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + php_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000080u; } -inline const ::std::string& FileOptions::php_namespace() const { +inline const std::string& FileOptions::php_namespace() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_namespace) return php_namespace_.Get(); } -inline void FileOptions::set_php_namespace(const ::std::string& value) { +inline void FileOptions::set_php_namespace(const std::string& value) { _has_bits_[0] |= 0x00000080u; - php_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_namespace) } -#if LANG_CXX11 -inline void FileOptions::set_php_namespace(::std::string&& value) { +inline void FileOptions::set_php_namespace(std::string&& value) { _has_bits_[0] |= 0x00000080u; php_namespace_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.php_namespace) } -#endif inline void FileOptions::set_php_namespace(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000080u; - php_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.php_namespace) } inline void FileOptions::set_php_namespace(const char* value, size_t size) { _has_bits_[0] |= 0x00000080u; - php_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + php_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.php_namespace) } -inline ::std::string* FileOptions::mutable_php_namespace() { +inline std::string* FileOptions::mutable_php_namespace() { _has_bits_[0] |= 0x00000080u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_namespace) - return php_namespace_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_php_namespace() { +inline std::string* FileOptions::release_php_namespace() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_namespace) if (!has_php_namespace()) { return nullptr; } _has_bits_[0] &= ~0x00000080u; - return php_namespace_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_php_namespace(::std::string* php_namespace) { +inline void FileOptions::set_allocated_php_namespace(std::string* php_namespace) { if (php_namespace != nullptr) { _has_bits_[0] |= 0x00000080u; } else { _has_bits_[0] &= ~0x00000080u; } - php_namespace_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), php_namespace, + php_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_namespace, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_namespace) } -inline ::std::string* FileOptions::unsafe_arena_release_php_namespace() { +inline std::string* FileOptions::unsafe_arena_release_php_namespace() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.php_namespace) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000080u; - return php_namespace_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return php_namespace_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_php_namespace( - ::std::string* php_namespace) { + std::string* php_namespace) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (php_namespace != nullptr) { _has_bits_[0] |= 0x00000080u; } else { _has_bits_[0] &= ~0x00000080u; } - php_namespace_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + php_namespace_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_namespace, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.php_namespace) } @@ -9708,79 +9509,77 @@ inline bool FileOptions::has_php_metadata_namespace() const { return (_has_bits_[0] & 0x00000100u) != 0; } inline void FileOptions::clear_php_metadata_namespace() { - php_metadata_namespace_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + php_metadata_namespace_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000100u; } -inline const ::std::string& FileOptions::php_metadata_namespace() const { +inline const std::string& FileOptions::php_metadata_namespace() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.php_metadata_namespace) return php_metadata_namespace_.Get(); } -inline void FileOptions::set_php_metadata_namespace(const ::std::string& value) { +inline void FileOptions::set_php_metadata_namespace(const std::string& value) { _has_bits_[0] |= 0x00000100u; - php_metadata_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.php_metadata_namespace) } -#if LANG_CXX11 -inline void FileOptions::set_php_metadata_namespace(::std::string&& value) { +inline void FileOptions::set_php_metadata_namespace(std::string&& value) { _has_bits_[0] |= 0x00000100u; php_metadata_namespace_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.php_metadata_namespace) } -#endif inline void FileOptions::set_php_metadata_namespace(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000100u; - php_metadata_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.php_metadata_namespace) } inline void FileOptions::set_php_metadata_namespace(const char* value, size_t size) { _has_bits_[0] |= 0x00000100u; - php_metadata_namespace_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + php_metadata_namespace_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.php_metadata_namespace) } -inline ::std::string* FileOptions::mutable_php_metadata_namespace() { +inline std::string* FileOptions::mutable_php_metadata_namespace() { _has_bits_[0] |= 0x00000100u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.php_metadata_namespace) - return php_metadata_namespace_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_metadata_namespace_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_php_metadata_namespace() { +inline std::string* FileOptions::release_php_metadata_namespace() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.php_metadata_namespace) if (!has_php_metadata_namespace()) { return nullptr; } _has_bits_[0] &= ~0x00000100u; - return php_metadata_namespace_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return php_metadata_namespace_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_php_metadata_namespace(::std::string* php_metadata_namespace) { +inline void FileOptions::set_allocated_php_metadata_namespace(std::string* php_metadata_namespace) { if (php_metadata_namespace != nullptr) { _has_bits_[0] |= 0x00000100u; } else { _has_bits_[0] &= ~0x00000100u; } - php_metadata_namespace_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), php_metadata_namespace, + php_metadata_namespace_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_metadata_namespace, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.php_metadata_namespace) } -inline ::std::string* FileOptions::unsafe_arena_release_php_metadata_namespace() { +inline std::string* FileOptions::unsafe_arena_release_php_metadata_namespace() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.php_metadata_namespace) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000100u; - return php_metadata_namespace_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return php_metadata_namespace_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_php_metadata_namespace( - ::std::string* php_metadata_namespace) { + std::string* php_metadata_namespace) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (php_metadata_namespace != nullptr) { _has_bits_[0] |= 0x00000100u; } else { _has_bits_[0] &= ~0x00000100u; } - php_metadata_namespace_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + php_metadata_namespace_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), php_metadata_namespace, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.php_metadata_namespace) } @@ -9790,79 +9589,77 @@ inline bool FileOptions::has_ruby_package() const { return (_has_bits_[0] & 0x00000200u) != 0; } inline void FileOptions::clear_ruby_package() { - ruby_package_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + ruby_package_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000200u; } -inline const ::std::string& FileOptions::ruby_package() const { +inline const std::string& FileOptions::ruby_package() const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.ruby_package) return ruby_package_.Get(); } -inline void FileOptions::set_ruby_package(const ::std::string& value) { +inline void FileOptions::set_ruby_package(const std::string& value) { _has_bits_[0] |= 0x00000200u; - ruby_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.ruby_package) } -#if LANG_CXX11 -inline void FileOptions::set_ruby_package(::std::string&& value) { +inline void FileOptions::set_ruby_package(std::string&& value) { _has_bits_[0] |= 0x00000200u; ruby_package_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.ruby_package) } -#endif inline void FileOptions::set_ruby_package(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000200u; - ruby_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.FileOptions.ruby_package) } inline void FileOptions::set_ruby_package(const char* value, size_t size) { _has_bits_[0] |= 0x00000200u; - ruby_package_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + ruby_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FileOptions.ruby_package) } -inline ::std::string* FileOptions::mutable_ruby_package() { +inline std::string* FileOptions::mutable_ruby_package() { _has_bits_[0] |= 0x00000200u; // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.ruby_package) - return ruby_package_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return ruby_package_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* FileOptions::release_ruby_package() { +inline std::string* FileOptions::release_ruby_package() { // @@protoc_insertion_point(field_release:google.protobuf.FileOptions.ruby_package) if (!has_ruby_package()) { return nullptr; } _has_bits_[0] &= ~0x00000200u; - return ruby_package_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return ruby_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void FileOptions::set_allocated_ruby_package(::std::string* ruby_package) { +inline void FileOptions::set_allocated_ruby_package(std::string* ruby_package) { if (ruby_package != nullptr) { _has_bits_[0] |= 0x00000200u; } else { _has_bits_[0] &= ~0x00000200u; } - ruby_package_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ruby_package, + ruby_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ruby_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.FileOptions.ruby_package) } -inline ::std::string* FileOptions::unsafe_arena_release_ruby_package() { +inline std::string* FileOptions::unsafe_arena_release_ruby_package() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.FileOptions.ruby_package) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000200u; - return ruby_package_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return ruby_package_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void FileOptions::unsafe_arena_set_allocated_ruby_package( - ::std::string* ruby_package) { + std::string* ruby_package) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (ruby_package != nullptr) { _has_bits_[0] |= 0x00000200u; } else { _has_bits_[0] &= ~0x00000200u; } - ruby_package_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ruby_package_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ruby_package, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.FileOptions.ruby_package) } @@ -9874,24 +9671,24 @@ inline int FileOptions::uninterpreted_option_size() const { inline void FileOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FileOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* FileOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FileOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& FileOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& FileOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* FileOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FileOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.FileOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& FileOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.FileOptions.uninterpreted_option) return uninterpreted_option_; @@ -9980,24 +9777,24 @@ inline int MessageOptions::uninterpreted_option_size() const { inline void MessageOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.MessageOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* MessageOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.MessageOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& MessageOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* MessageOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MessageOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.MessageOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& MessageOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.MessageOptions.uninterpreted_option) return uninterpreted_option_; @@ -10015,12 +9812,12 @@ inline void FieldOptions::clear_ctype() { ctype_ = 0; _has_bits_[0] &= ~0x00000001u; } -inline ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const { +inline PROTOBUF_NAMESPACE_ID::FieldOptions_CType FieldOptions::ctype() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype) - return static_cast< ::google::protobuf::FieldOptions_CType >(ctype_); + return static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_CType >(ctype_); } -inline void FieldOptions::set_ctype(::google::protobuf::FieldOptions_CType value) { - assert(::google::protobuf::FieldOptions_CType_IsValid(value)); +inline void FieldOptions::set_ctype(PROTOBUF_NAMESPACE_ID::FieldOptions_CType value) { + assert(PROTOBUF_NAMESPACE_ID::FieldOptions_CType_IsValid(value)); _has_bits_[0] |= 0x00000001u; ctype_ = value; // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.ctype) @@ -10052,12 +9849,12 @@ inline void FieldOptions::clear_jstype() { jstype_ = 0; _has_bits_[0] &= ~0x00000020u; } -inline ::google::protobuf::FieldOptions_JSType FieldOptions::jstype() const { +inline PROTOBUF_NAMESPACE_ID::FieldOptions_JSType FieldOptions::jstype() const { // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.jstype) - return static_cast< ::google::protobuf::FieldOptions_JSType >(jstype_); + return static_cast< PROTOBUF_NAMESPACE_ID::FieldOptions_JSType >(jstype_); } -inline void FieldOptions::set_jstype(::google::protobuf::FieldOptions_JSType value) { - assert(::google::protobuf::FieldOptions_JSType_IsValid(value)); +inline void FieldOptions::set_jstype(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType value) { + assert(PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_IsValid(value)); _has_bits_[0] |= 0x00000020u; jstype_ = value; // @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.jstype) @@ -10124,24 +9921,24 @@ inline int FieldOptions::uninterpreted_option_size() const { inline void FieldOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* FieldOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& FieldOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* FieldOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* FieldOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.FieldOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& FieldOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.FieldOptions.uninterpreted_option) return uninterpreted_option_; @@ -10158,24 +9955,24 @@ inline int OneofOptions::uninterpreted_option_size() const { inline void OneofOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* OneofOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.OneofOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* OneofOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.OneofOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& OneofOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& OneofOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.OneofOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* OneofOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* OneofOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.OneofOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& OneofOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.OneofOptions.uninterpreted_option) return uninterpreted_option_; @@ -10228,24 +10025,24 @@ inline int EnumOptions::uninterpreted_option_size() const { inline void EnumOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* EnumOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* EnumOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.EnumOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& EnumOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.EnumOptions.uninterpreted_option) return uninterpreted_option_; @@ -10280,24 +10077,24 @@ inline int EnumValueOptions::uninterpreted_option_size() const { inline void EnumValueOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.EnumValueOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* EnumValueOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.EnumValueOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& EnumValueOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* EnumValueOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.EnumValueOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& EnumValueOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.EnumValueOptions.uninterpreted_option) return uninterpreted_option_; @@ -10332,24 +10129,24 @@ inline int ServiceOptions::uninterpreted_option_size() const { inline void ServiceOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.ServiceOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* ServiceOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ServiceOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& ServiceOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.ServiceOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* ServiceOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* ServiceOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.ServiceOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& ServiceOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.ServiceOptions.uninterpreted_option) return uninterpreted_option_; @@ -10385,12 +10182,12 @@ inline void MethodOptions::clear_idempotency_level() { idempotency_level_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::google::protobuf::MethodOptions_IdempotencyLevel MethodOptions::idempotency_level() const { +inline PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel MethodOptions::idempotency_level() const { // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.idempotency_level) - return static_cast< ::google::protobuf::MethodOptions_IdempotencyLevel >(idempotency_level_); + return static_cast< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel >(idempotency_level_); } -inline void MethodOptions::set_idempotency_level(::google::protobuf::MethodOptions_IdempotencyLevel value) { - assert(::google::protobuf::MethodOptions_IdempotencyLevel_IsValid(value)); +inline void MethodOptions::set_idempotency_level(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel value) { + assert(PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_IsValid(value)); _has_bits_[0] |= 0x00000002u; idempotency_level_ = value; // @@protoc_insertion_point(field_set:google.protobuf.MethodOptions.idempotency_level) @@ -10403,24 +10200,24 @@ inline int MethodOptions::uninterpreted_option_size() const { inline void MethodOptions::clear_uninterpreted_option() { uninterpreted_option_.Clear(); } -inline ::google::protobuf::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::mutable_uninterpreted_option(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.MethodOptions.uninterpreted_option) return uninterpreted_option_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >* MethodOptions::mutable_uninterpreted_option() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.MethodOptions.uninterpreted_option) return &uninterpreted_option_; } -inline const ::google::protobuf::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption& MethodOptions::uninterpreted_option(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.MethodOptions.uninterpreted_option) return uninterpreted_option_.Get(index); } -inline ::google::protobuf::UninterpretedOption* MethodOptions::add_uninterpreted_option() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption* MethodOptions::add_uninterpreted_option() { // @@protoc_insertion_point(field_add:google.protobuf.MethodOptions.uninterpreted_option) return uninterpreted_option_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption >& MethodOptions::uninterpreted_option() const { // @@protoc_insertion_point(field_list:google.protobuf.MethodOptions.uninterpreted_option) return uninterpreted_option_; @@ -10435,79 +10232,77 @@ inline bool UninterpretedOption_NamePart::has_name_part() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void UninterpretedOption_NamePart::clear_name_part() { - name_part_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_part_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& UninterpretedOption_NamePart::name_part() const { +inline const std::string& UninterpretedOption_NamePart::name_part() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.NamePart.name_part) return name_part_.Get(); } -inline void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) { +inline void UninterpretedOption_NamePart::set_name_part(const std::string& value) { _has_bits_[0] |= 0x00000001u; - name_part_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part) } -#if LANG_CXX11 -inline void UninterpretedOption_NamePart::set_name_part(::std::string&& value) { +inline void UninterpretedOption_NamePart::set_name_part(std::string&& value) { _has_bits_[0] |= 0x00000001u; name_part_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.NamePart.name_part) } -#endif inline void UninterpretedOption_NamePart::set_name_part(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - name_part_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.NamePart.name_part) } inline void UninterpretedOption_NamePart::set_name_part(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - name_part_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + name_part_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.NamePart.name_part) } -inline ::std::string* UninterpretedOption_NamePart::mutable_name_part() { +inline std::string* UninterpretedOption_NamePart::mutable_name_part() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.NamePart.name_part) - return name_part_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_part_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* UninterpretedOption_NamePart::release_name_part() { +inline std::string* UninterpretedOption_NamePart::release_name_part() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.NamePart.name_part) if (!has_name_part()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return name_part_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return name_part_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void UninterpretedOption_NamePart::set_allocated_name_part(::std::string* name_part) { +inline void UninterpretedOption_NamePart::set_allocated_name_part(std::string* name_part) { if (name_part != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_part_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name_part, + name_part_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name_part, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) } -inline ::std::string* UninterpretedOption_NamePart::unsafe_arena_release_name_part() { +inline std::string* UninterpretedOption_NamePart::unsafe_arena_release_name_part() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.NamePart.name_part) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return name_part_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return name_part_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void UninterpretedOption_NamePart::unsafe_arena_set_allocated_name_part( - ::std::string* name_part) { + std::string* name_part) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (name_part != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - name_part_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_part_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name_part, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.NamePart.name_part) } @@ -10541,24 +10336,24 @@ inline int UninterpretedOption::name_size() const { inline void UninterpretedOption::clear_name() { name_.Clear(); } -inline ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOption::mutable_name(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.name) return name_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >* UninterpretedOption::mutable_name() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.UninterpretedOption.name) return &name_; } -inline const ::google::protobuf::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const { +inline const PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart& UninterpretedOption::name(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.name) return name_.Get(index); } -inline ::google::protobuf::UninterpretedOption_NamePart* UninterpretedOption::add_name() { +inline PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart* UninterpretedOption::add_name() { // @@protoc_insertion_point(field_add:google.protobuf.UninterpretedOption.name) return name_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption_NamePart >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::UninterpretedOption_NamePart >& UninterpretedOption::name() const { // @@protoc_insertion_point(field_list:google.protobuf.UninterpretedOption.name) return name_; @@ -10569,79 +10364,77 @@ inline bool UninterpretedOption::has_identifier_value() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void UninterpretedOption::clear_identifier_value() { - identifier_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + identifier_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& UninterpretedOption::identifier_value() const { +inline const std::string& UninterpretedOption::identifier_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.identifier_value) return identifier_value_.Get(); } -inline void UninterpretedOption::set_identifier_value(const ::std::string& value) { +inline void UninterpretedOption::set_identifier_value(const std::string& value) { _has_bits_[0] |= 0x00000001u; - identifier_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value) } -#if LANG_CXX11 -inline void UninterpretedOption::set_identifier_value(::std::string&& value) { +inline void UninterpretedOption::set_identifier_value(std::string&& value) { _has_bits_[0] |= 0x00000001u; identifier_value_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.identifier_value) } -#endif inline void UninterpretedOption::set_identifier_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - identifier_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.identifier_value) } inline void UninterpretedOption::set_identifier_value(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - identifier_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + identifier_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.identifier_value) } -inline ::std::string* UninterpretedOption::mutable_identifier_value() { +inline std::string* UninterpretedOption::mutable_identifier_value() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.identifier_value) - return identifier_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return identifier_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* UninterpretedOption::release_identifier_value() { +inline std::string* UninterpretedOption::release_identifier_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.identifier_value) if (!has_identifier_value()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return identifier_value_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return identifier_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void UninterpretedOption::set_allocated_identifier_value(::std::string* identifier_value) { +inline void UninterpretedOption::set_allocated_identifier_value(std::string* identifier_value) { if (identifier_value != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - identifier_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), identifier_value, + identifier_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), identifier_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.identifier_value) } -inline ::std::string* UninterpretedOption::unsafe_arena_release_identifier_value() { +inline std::string* UninterpretedOption::unsafe_arena_release_identifier_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.identifier_value) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return identifier_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return identifier_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void UninterpretedOption::unsafe_arena_set_allocated_identifier_value( - ::std::string* identifier_value) { + std::string* identifier_value) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (identifier_value != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - identifier_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + identifier_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), identifier_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.identifier_value) } @@ -10654,11 +10447,11 @@ inline void UninterpretedOption::clear_positive_int_value() { positive_int_value_ = PROTOBUF_ULONGLONG(0); _has_bits_[0] &= ~0x00000008u; } -inline ::google::protobuf::uint64 UninterpretedOption::positive_int_value() const { +inline ::PROTOBUF_NAMESPACE_ID::uint64 UninterpretedOption::positive_int_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.positive_int_value) return positive_int_value_; } -inline void UninterpretedOption::set_positive_int_value(::google::protobuf::uint64 value) { +inline void UninterpretedOption::set_positive_int_value(::PROTOBUF_NAMESPACE_ID::uint64 value) { _has_bits_[0] |= 0x00000008u; positive_int_value_ = value; // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.positive_int_value) @@ -10672,11 +10465,11 @@ inline void UninterpretedOption::clear_negative_int_value() { negative_int_value_ = PROTOBUF_LONGLONG(0); _has_bits_[0] &= ~0x00000010u; } -inline ::google::protobuf::int64 UninterpretedOption::negative_int_value() const { +inline ::PROTOBUF_NAMESPACE_ID::int64 UninterpretedOption::negative_int_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.negative_int_value) return negative_int_value_; } -inline void UninterpretedOption::set_negative_int_value(::google::protobuf::int64 value) { +inline void UninterpretedOption::set_negative_int_value(::PROTOBUF_NAMESPACE_ID::int64 value) { _has_bits_[0] |= 0x00000010u; negative_int_value_ = value; // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.negative_int_value) @@ -10705,79 +10498,77 @@ inline bool UninterpretedOption::has_string_value() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void UninterpretedOption::clear_string_value() { - string_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + string_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000002u; } -inline const ::std::string& UninterpretedOption::string_value() const { +inline const std::string& UninterpretedOption::string_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.string_value) return string_value_.Get(); } -inline void UninterpretedOption::set_string_value(const ::std::string& value) { +inline void UninterpretedOption::set_string_value(const std::string& value) { _has_bits_[0] |= 0x00000002u; - string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value) } -#if LANG_CXX11 -inline void UninterpretedOption::set_string_value(::std::string&& value) { +inline void UninterpretedOption::set_string_value(std::string&& value) { _has_bits_[0] |= 0x00000002u; string_value_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.string_value) } -#endif inline void UninterpretedOption::set_string_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.string_value) } inline void UninterpretedOption::set_string_value(const void* value, size_t size) { _has_bits_[0] |= 0x00000002u; - string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.string_value) } -inline ::std::string* UninterpretedOption::mutable_string_value() { +inline std::string* UninterpretedOption::mutable_string_value() { _has_bits_[0] |= 0x00000002u; // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.string_value) - return string_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return string_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* UninterpretedOption::release_string_value() { +inline std::string* UninterpretedOption::release_string_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.string_value) if (!has_string_value()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return string_value_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return string_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void UninterpretedOption::set_allocated_string_value(::std::string* string_value) { +inline void UninterpretedOption::set_allocated_string_value(std::string* string_value) { if (string_value != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - string_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value, + string_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.string_value) } -inline ::std::string* UninterpretedOption::unsafe_arena_release_string_value() { +inline std::string* UninterpretedOption::unsafe_arena_release_string_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.string_value) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000002u; - return string_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return string_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void UninterpretedOption::unsafe_arena_set_allocated_string_value( - ::std::string* string_value) { + std::string* string_value) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (string_value != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - string_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + string_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.string_value) } @@ -10787,79 +10578,77 @@ inline bool UninterpretedOption::has_aggregate_value() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void UninterpretedOption::clear_aggregate_value() { - aggregate_value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + aggregate_value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000004u; } -inline const ::std::string& UninterpretedOption::aggregate_value() const { +inline const std::string& UninterpretedOption::aggregate_value() const { // @@protoc_insertion_point(field_get:google.protobuf.UninterpretedOption.aggregate_value) return aggregate_value_.Get(); } -inline void UninterpretedOption::set_aggregate_value(const ::std::string& value) { +inline void UninterpretedOption::set_aggregate_value(const std::string& value) { _has_bits_[0] |= 0x00000004u; - aggregate_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value) } -#if LANG_CXX11 -inline void UninterpretedOption::set_aggregate_value(::std::string&& value) { +inline void UninterpretedOption::set_aggregate_value(std::string&& value) { _has_bits_[0] |= 0x00000004u; aggregate_value_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.aggregate_value) } -#endif inline void UninterpretedOption::set_aggregate_value(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000004u; - aggregate_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.UninterpretedOption.aggregate_value) } inline void UninterpretedOption::set_aggregate_value(const char* value, size_t size) { _has_bits_[0] |= 0x00000004u; - aggregate_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + aggregate_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.UninterpretedOption.aggregate_value) } -inline ::std::string* UninterpretedOption::mutable_aggregate_value() { +inline std::string* UninterpretedOption::mutable_aggregate_value() { _has_bits_[0] |= 0x00000004u; // @@protoc_insertion_point(field_mutable:google.protobuf.UninterpretedOption.aggregate_value) - return aggregate_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return aggregate_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* UninterpretedOption::release_aggregate_value() { +inline std::string* UninterpretedOption::release_aggregate_value() { // @@protoc_insertion_point(field_release:google.protobuf.UninterpretedOption.aggregate_value) if (!has_aggregate_value()) { return nullptr; } _has_bits_[0] &= ~0x00000004u; - return aggregate_value_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return aggregate_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void UninterpretedOption::set_allocated_aggregate_value(::std::string* aggregate_value) { +inline void UninterpretedOption::set_allocated_aggregate_value(std::string* aggregate_value) { if (aggregate_value != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - aggregate_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), aggregate_value, + aggregate_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), aggregate_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) } -inline ::std::string* UninterpretedOption::unsafe_arena_release_aggregate_value() { +inline std::string* UninterpretedOption::unsafe_arena_release_aggregate_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.UninterpretedOption.aggregate_value) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000004u; - return aggregate_value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return aggregate_value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void UninterpretedOption::unsafe_arena_set_allocated_aggregate_value( - ::std::string* aggregate_value) { + std::string* aggregate_value) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (aggregate_value != nullptr) { _has_bits_[0] |= 0x00000004u; } else { _has_bits_[0] &= ~0x00000004u; } - aggregate_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + aggregate_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), aggregate_value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.UninterpretedOption.aggregate_value) } @@ -10875,24 +10664,24 @@ inline int SourceCodeInfo_Location::path_size() const { inline void SourceCodeInfo_Location::clear_path() { path_.Clear(); } -inline ::google::protobuf::int32 SourceCodeInfo_Location::path(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::path(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.path) return path_.Get(index); } -inline void SourceCodeInfo_Location::set_path(int index, ::google::protobuf::int32 value) { +inline void SourceCodeInfo_Location::set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.path) } -inline void SourceCodeInfo_Location::add_path(::google::protobuf::int32 value) { +inline void SourceCodeInfo_Location::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Add(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.path) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& SourceCodeInfo_Location::path() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.path) return path_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* SourceCodeInfo_Location::mutable_path() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.path) return &path_; @@ -10905,24 +10694,24 @@ inline int SourceCodeInfo_Location::span_size() const { inline void SourceCodeInfo_Location::clear_span() { span_.Clear(); } -inline ::google::protobuf::int32 SourceCodeInfo_Location::span(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int32 SourceCodeInfo_Location::span(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.span) return span_.Get(index); } -inline void SourceCodeInfo_Location::set_span(int index, ::google::protobuf::int32 value) { +inline void SourceCodeInfo_Location::set_span(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { span_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.span) } -inline void SourceCodeInfo_Location::add_span(::google::protobuf::int32 value) { +inline void SourceCodeInfo_Location::add_span(::PROTOBUF_NAMESPACE_ID::int32 value) { span_.Add(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.span) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& SourceCodeInfo_Location::span() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.span) return span_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* SourceCodeInfo_Location::mutable_span() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.span) return &span_; @@ -10933,79 +10722,77 @@ inline bool SourceCodeInfo_Location::has_leading_comments() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void SourceCodeInfo_Location::clear_leading_comments() { - leading_comments_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + leading_comments_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& SourceCodeInfo_Location::leading_comments() const { +inline const std::string& SourceCodeInfo_Location::leading_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_comments) return leading_comments_.Get(); } -inline void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) { +inline void SourceCodeInfo_Location::set_leading_comments(const std::string& value) { _has_bits_[0] |= 0x00000001u; - leading_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments) } -#if LANG_CXX11 -inline void SourceCodeInfo_Location::set_leading_comments(::std::string&& value) { +inline void SourceCodeInfo_Location::set_leading_comments(std::string&& value) { _has_bits_[0] |= 0x00000001u; leading_comments_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.leading_comments) } -#endif inline void SourceCodeInfo_Location::set_leading_comments(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - leading_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.leading_comments) } inline void SourceCodeInfo_Location::set_leading_comments(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - leading_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + leading_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_comments) } -inline ::std::string* SourceCodeInfo_Location::mutable_leading_comments() { +inline std::string* SourceCodeInfo_Location::mutable_leading_comments() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_comments) - return leading_comments_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return leading_comments_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* SourceCodeInfo_Location::release_leading_comments() { +inline std::string* SourceCodeInfo_Location::release_leading_comments() { // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.leading_comments) if (!has_leading_comments()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return leading_comments_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return leading_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void SourceCodeInfo_Location::set_allocated_leading_comments(::std::string* leading_comments) { +inline void SourceCodeInfo_Location::set_allocated_leading_comments(std::string* leading_comments) { if (leading_comments != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - leading_comments_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), leading_comments, + leading_comments_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), leading_comments, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) } -inline ::std::string* SourceCodeInfo_Location::unsafe_arena_release_leading_comments() { +inline std::string* SourceCodeInfo_Location::unsafe_arena_release_leading_comments() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.SourceCodeInfo.Location.leading_comments) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return leading_comments_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return leading_comments_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void SourceCodeInfo_Location::unsafe_arena_set_allocated_leading_comments( - ::std::string* leading_comments) { + std::string* leading_comments) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (leading_comments != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - leading_comments_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + leading_comments_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), leading_comments, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.SourceCodeInfo.Location.leading_comments) } @@ -11015,79 +10802,77 @@ inline bool SourceCodeInfo_Location::has_trailing_comments() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void SourceCodeInfo_Location::clear_trailing_comments() { - trailing_comments_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + trailing_comments_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000002u; } -inline const ::std::string& SourceCodeInfo_Location::trailing_comments() const { +inline const std::string& SourceCodeInfo_Location::trailing_comments() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.trailing_comments) return trailing_comments_.Get(); } -inline void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) { +inline void SourceCodeInfo_Location::set_trailing_comments(const std::string& value) { _has_bits_[0] |= 0x00000002u; - trailing_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments) } -#if LANG_CXX11 -inline void SourceCodeInfo_Location::set_trailing_comments(::std::string&& value) { +inline void SourceCodeInfo_Location::set_trailing_comments(std::string&& value) { _has_bits_[0] |= 0x00000002u; trailing_comments_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.trailing_comments) } -#endif inline void SourceCodeInfo_Location::set_trailing_comments(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000002u; - trailing_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceCodeInfo.Location.trailing_comments) } inline void SourceCodeInfo_Location::set_trailing_comments(const char* value, size_t size) { _has_bits_[0] |= 0x00000002u; - trailing_comments_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + trailing_comments_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.trailing_comments) } -inline ::std::string* SourceCodeInfo_Location::mutable_trailing_comments() { +inline std::string* SourceCodeInfo_Location::mutable_trailing_comments() { _has_bits_[0] |= 0x00000002u; // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.trailing_comments) - return trailing_comments_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return trailing_comments_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* SourceCodeInfo_Location::release_trailing_comments() { +inline std::string* SourceCodeInfo_Location::release_trailing_comments() { // @@protoc_insertion_point(field_release:google.protobuf.SourceCodeInfo.Location.trailing_comments) if (!has_trailing_comments()) { return nullptr; } _has_bits_[0] &= ~0x00000002u; - return trailing_comments_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return trailing_comments_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void SourceCodeInfo_Location::set_allocated_trailing_comments(::std::string* trailing_comments) { +inline void SourceCodeInfo_Location::set_allocated_trailing_comments(std::string* trailing_comments) { if (trailing_comments != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - trailing_comments_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), trailing_comments, + trailing_comments_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trailing_comments, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) } -inline ::std::string* SourceCodeInfo_Location::unsafe_arena_release_trailing_comments() { +inline std::string* SourceCodeInfo_Location::unsafe_arena_release_trailing_comments() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.SourceCodeInfo.Location.trailing_comments) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000002u; - return trailing_comments_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return trailing_comments_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void SourceCodeInfo_Location::unsafe_arena_set_allocated_trailing_comments( - ::std::string* trailing_comments) { + std::string* trailing_comments) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (trailing_comments != nullptr) { _has_bits_[0] |= 0x00000002u; } else { _has_bits_[0] &= ~0x00000002u; } - trailing_comments_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + trailing_comments_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trailing_comments, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.SourceCodeInfo.Location.trailing_comments) } @@ -11099,24 +10884,22 @@ inline int SourceCodeInfo_Location::leading_detached_comments_size() const { inline void SourceCodeInfo_Location::clear_leading_detached_comments() { leading_detached_comments_.Clear(); } -inline const ::std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const { +inline const std::string& SourceCodeInfo_Location::leading_detached_comments(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return leading_detached_comments_.Get(index); } -inline ::std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { +inline std::string* SourceCodeInfo_Location::mutable_leading_detached_comments(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return leading_detached_comments_.Mutable(index); } -inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const ::std::string& value) { +inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) leading_detached_comments_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, ::std::string&& value) { +inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) leading_detached_comments_.Mutable(index)->assign(std::move(value)); } -#endif inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); leading_detached_comments_.Mutable(index)->assign(value); @@ -11127,20 +10910,18 @@ inline void SourceCodeInfo_Location::set_leading_detached_comments(int index, co reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } -inline ::std::string* SourceCodeInfo_Location::add_leading_detached_comments() { +inline std::string* SourceCodeInfo_Location::add_leading_detached_comments() { // @@protoc_insertion_point(field_add_mutable:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return leading_detached_comments_.Add(); } -inline void SourceCodeInfo_Location::add_leading_detached_comments(const ::std::string& value) { +inline void SourceCodeInfo_Location::add_leading_detached_comments(const std::string& value) { leading_detached_comments_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } -#if LANG_CXX11 -inline void SourceCodeInfo_Location::add_leading_detached_comments(::std::string&& value) { +inline void SourceCodeInfo_Location::add_leading_detached_comments(std::string&& value) { leading_detached_comments_.Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } -#endif inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* value) { GOOGLE_DCHECK(value != nullptr); leading_detached_comments_.Add()->assign(value); @@ -11150,12 +10931,12 @@ inline void SourceCodeInfo_Location::add_leading_detached_comments(const char* v leading_detached_comments_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& SourceCodeInfo_Location::leading_detached_comments() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return leading_detached_comments_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* SourceCodeInfo_Location::mutable_leading_detached_comments() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.Location.leading_detached_comments) return &leading_detached_comments_; @@ -11172,24 +10953,24 @@ inline int SourceCodeInfo::location_size() const { inline void SourceCodeInfo::clear_location() { location_.Clear(); } -inline ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) { +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::mutable_location(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.SourceCodeInfo.location) return location_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >* SourceCodeInfo::mutable_location() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.SourceCodeInfo.location) return &location_; } -inline const ::google::protobuf::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const { +inline const PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location& SourceCodeInfo::location(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.SourceCodeInfo.location) return location_.Get(index); } -inline ::google::protobuf::SourceCodeInfo_Location* SourceCodeInfo::add_location() { +inline PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location* SourceCodeInfo::add_location() { // @@protoc_insertion_point(field_add:google.protobuf.SourceCodeInfo.location) return location_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::SourceCodeInfo_Location >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::SourceCodeInfo_Location >& SourceCodeInfo::location() const { // @@protoc_insertion_point(field_list:google.protobuf.SourceCodeInfo.location) return location_; @@ -11206,24 +10987,24 @@ inline int GeneratedCodeInfo_Annotation::path_size() const { inline void GeneratedCodeInfo_Annotation::clear_path() { path_.Clear(); } -inline ::google::protobuf::int32 GeneratedCodeInfo_Annotation::path(int index) const { +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::path(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.path) return path_.Get(index); } -inline void GeneratedCodeInfo_Annotation::set_path(int index, ::google::protobuf::int32 value) { +inline void GeneratedCodeInfo_Annotation::set_path(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Set(index, value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.path) } -inline void GeneratedCodeInfo_Annotation::add_path(::google::protobuf::int32 value) { +inline void GeneratedCodeInfo_Annotation::add_path(::PROTOBUF_NAMESPACE_ID::int32 value) { path_.Add(value); // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.Annotation.path) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& GeneratedCodeInfo_Annotation::path() const { // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.Annotation.path) return path_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* GeneratedCodeInfo_Annotation::mutable_path() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.Annotation.path) return &path_; @@ -11234,79 +11015,77 @@ inline bool GeneratedCodeInfo_Annotation::has_source_file() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GeneratedCodeInfo_Annotation::clear_source_file() { - source_file_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + source_file_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _has_bits_[0] &= ~0x00000001u; } -inline const ::std::string& GeneratedCodeInfo_Annotation::source_file() const { +inline const std::string& GeneratedCodeInfo_Annotation::source_file() const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.source_file) return source_file_.Get(); } -inline void GeneratedCodeInfo_Annotation::set_source_file(const ::std::string& value) { +inline void GeneratedCodeInfo_Annotation::set_source_file(const std::string& value) { _has_bits_[0] |= 0x00000001u; - source_file_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } -#if LANG_CXX11 -inline void GeneratedCodeInfo_Annotation::set_source_file(::std::string&& value) { +inline void GeneratedCodeInfo_Annotation::set_source_file(std::string&& value) { _has_bits_[0] |= 0x00000001u; source_file_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } -#endif inline void GeneratedCodeInfo_Annotation::set_source_file(const char* value) { GOOGLE_DCHECK(value != nullptr); _has_bits_[0] |= 0x00000001u; - source_file_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } inline void GeneratedCodeInfo_Annotation::set_source_file(const char* value, size_t size) { _has_bits_[0] |= 0x00000001u; - source_file_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + source_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } -inline ::std::string* GeneratedCodeInfo_Annotation::mutable_source_file() { +inline std::string* GeneratedCodeInfo_Annotation::mutable_source_file() { _has_bits_[0] |= 0x00000001u; // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.Annotation.source_file) - return source_file_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return source_file_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline ::std::string* GeneratedCodeInfo_Annotation::release_source_file() { +inline std::string* GeneratedCodeInfo_Annotation::release_source_file() { // @@protoc_insertion_point(field_release:google.protobuf.GeneratedCodeInfo.Annotation.source_file) if (!has_source_file()) { return nullptr; } _has_bits_[0] &= ~0x00000001u; - return source_file_.ReleaseNonDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + return source_file_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(::std::string* source_file) { +inline void GeneratedCodeInfo_Annotation::set_allocated_source_file(std::string* source_file) { if (source_file != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - source_file_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source_file, + source_file_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), source_file, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } -inline ::std::string* GeneratedCodeInfo_Annotation::unsafe_arena_release_source_file() { +inline std::string* GeneratedCodeInfo_Annotation::unsafe_arena_release_source_file() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.GeneratedCodeInfo.Annotation.source_file) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); _has_bits_[0] &= ~0x00000001u; - return source_file_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return source_file_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline void GeneratedCodeInfo_Annotation::unsafe_arena_set_allocated_source_file( - ::std::string* source_file) { + std::string* source_file) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (source_file != nullptr) { _has_bits_[0] |= 0x00000001u; } else { _has_bits_[0] &= ~0x00000001u; } - source_file_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + source_file_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), source_file, GetArenaNoVirtual()); // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } @@ -11319,11 +11098,11 @@ inline void GeneratedCodeInfo_Annotation::clear_begin() { begin_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::google::protobuf::int32 GeneratedCodeInfo_Annotation::begin() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::begin() const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.begin) return begin_; } -inline void GeneratedCodeInfo_Annotation::set_begin(::google::protobuf::int32 value) { +inline void GeneratedCodeInfo_Annotation::set_begin(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000002u; begin_ = value; // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.begin) @@ -11337,11 +11116,11 @@ inline void GeneratedCodeInfo_Annotation::clear_end() { end_ = 0; _has_bits_[0] &= ~0x00000004u; } -inline ::google::protobuf::int32 GeneratedCodeInfo_Annotation::end() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 GeneratedCodeInfo_Annotation::end() const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.Annotation.end) return end_; } -inline void GeneratedCodeInfo_Annotation::set_end(::google::protobuf::int32 value) { +inline void GeneratedCodeInfo_Annotation::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) { _has_bits_[0] |= 0x00000004u; end_ = value; // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.end) @@ -11358,24 +11137,24 @@ inline int GeneratedCodeInfo::annotation_size() const { inline void GeneratedCodeInfo::clear_annotation() { annotation_.Clear(); } -inline ::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::mutable_annotation(int index) { +inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::mutable_annotation(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.GeneratedCodeInfo.annotation) return annotation_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >* GeneratedCodeInfo::mutable_annotation() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.GeneratedCodeInfo.annotation) return &annotation_; } -inline const ::google::protobuf::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::annotation(int index) const { +inline const PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation& GeneratedCodeInfo::annotation(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.GeneratedCodeInfo.annotation) return annotation_.Get(index); } -inline ::google::protobuf::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() { +inline PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation* GeneratedCodeInfo::add_annotation() { // @@protoc_insertion_point(field_add:google.protobuf.GeneratedCodeInfo.annotation) return annotation_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::GeneratedCodeInfo_Annotation >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::GeneratedCodeInfo_Annotation >& GeneratedCodeInfo::annotation() const { // @@protoc_insertion_point(field_list:google.protobuf.GeneratedCodeInfo.annotation) return annotation_; @@ -11439,47 +11218,44 @@ GeneratedCodeInfo::annotation() const { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::google::protobuf::FieldDescriptorProto_Type> : ::std::true_type {}; +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldDescriptorProto_Type>() { - return ::google::protobuf::FieldDescriptorProto_Type_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type>() { + return PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Type_descriptor(); } -template <> struct is_proto_enum< ::google::protobuf::FieldDescriptorProto_Label> : ::std::true_type {}; +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldDescriptorProto_Label>() { - return ::google::protobuf::FieldDescriptorProto_Label_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label>() { + return PROTOBUF_NAMESPACE_ID::FieldDescriptorProto_Label_descriptor(); } -template <> struct is_proto_enum< ::google::protobuf::FileOptions_OptimizeMode> : ::std::true_type {}; +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FileOptions_OptimizeMode>() { - return ::google::protobuf::FileOptions_OptimizeMode_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode>() { + return PROTOBUF_NAMESPACE_ID::FileOptions_OptimizeMode_descriptor(); } -template <> struct is_proto_enum< ::google::protobuf::FieldOptions_CType> : ::std::true_type {}; +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::FieldOptions_CType> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldOptions_CType>() { - return ::google::protobuf::FieldOptions_CType_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::FieldOptions_CType>() { + return PROTOBUF_NAMESPACE_ID::FieldOptions_CType_descriptor(); } -template <> struct is_proto_enum< ::google::protobuf::FieldOptions_JSType> : ::std::true_type {}; +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::FieldOptions_JSType> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::FieldOptions_JSType>() { - return ::google::protobuf::FieldOptions_JSType_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::FieldOptions_JSType>() { + return PROTOBUF_NAMESPACE_ID::FieldOptions_JSType_descriptor(); } -template <> struct is_proto_enum< ::google::protobuf::MethodOptions_IdempotencyLevel> : ::std::true_type {}; +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::MethodOptions_IdempotencyLevel>() { - return ::google::protobuf::MethodOptions_IdempotencyLevel_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel>() { + return PROTOBUF_NAMESPACE_ID::MethodOptions_IdempotencyLevel_descriptor(); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fdescriptor_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fdescriptor_2eproto diff --git a/src/google/protobuf/descriptor.proto b/src/google/protobuf/descriptor.proto index 87201c7262..8c1273dbe4 100644 --- a/src/google/protobuf/descriptor.proto +++ b/src/google/protobuf/descriptor.proto @@ -417,7 +417,6 @@ message FileOptions { // determining the namespace. optional string php_namespace = 41; - // Use this option to change the namespace of php generated metadata classes. // Default is empty. When this option is empty, the proto file name will be used // for determining the namespace. diff --git a/src/google/protobuf/descriptor_database.cc b/src/google/protobuf/descriptor_database.cc index 1f5ba48087..55d6bb1f9c 100644 --- a/src/google/protobuf/descriptor_database.cc +++ b/src/google/protobuf/descriptor_database.cc @@ -37,7 +37,6 @@ #include #include -#include #include #include @@ -62,7 +61,7 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddFile( // We must be careful here -- calling file.package() if file.has_package() is // false could access an uninitialized static-storage variable if we are being // run at startup time. - string path = file.has_package() ? file.package() : string(); + std::string path = file.has_package() ? file.package() : std::string(); if (!path.empty()) path += '.'; for (int i = 0; i < file.message_type_size(); i++) { @@ -85,7 +84,7 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddFile( template bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( - const string& name, Value value) { + const std::string& name, Value value) { // We need to make sure not to violate our map invariant. // If the symbol name is invalid it could break our lookup algorithm (which @@ -98,12 +97,13 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( // Try to look up the symbol to make sure a super-symbol doesn't already // exist. - typename std::map::iterator iter = FindLastLessOrEqual(name); + typename std::map::iterator iter = + FindLastLessOrEqual(name); if (iter == by_symbol_.end()) { // Apparently the map is currently empty. Just insert and be done with it. by_symbol_.insert( - typename std::map::value_type(name, value)); + typename std::map::value_type(name, value)); return true; } @@ -130,8 +130,8 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddSymbol( // Insert the new symbol using the iterator as a hint, the new entry will // appear immediately before the one the iterator is pointing at. - by_symbol_.insert(iter, - typename std::map::value_type(name, value)); + by_symbol_.insert( + iter, typename std::map::value_type(name, value)); return true; } @@ -175,14 +175,15 @@ bool SimpleDescriptorDatabase::DescriptorIndex::AddExtension( template Value SimpleDescriptorDatabase::DescriptorIndex::FindFile( - const string& filename) { + const std::string& filename) { return FindWithDefault(by_name_, filename, Value()); } template Value SimpleDescriptorDatabase::DescriptorIndex::FindSymbol( - const string& name) { - typename std::map::iterator iter = FindLastLessOrEqual(name); + const std::string& name) { + typename std::map::iterator iter = + FindLastLessOrEqual(name); return (iter != by_symbol_.end() && IsSubSymbol(iter->first, name)) ? iter->second : Value(); @@ -190,17 +191,15 @@ Value SimpleDescriptorDatabase::DescriptorIndex::FindSymbol( template Value SimpleDescriptorDatabase::DescriptorIndex::FindExtension( - const string& containing_type, - int field_number) { + const std::string& containing_type, int field_number) { return FindWithDefault( by_extension_, std::make_pair(containing_type, field_number), Value()); } template bool SimpleDescriptorDatabase::DescriptorIndex::FindAllExtensionNumbers( - const string& containing_type, - std::vector* output) { - typename std::map, Value>::const_iterator it = + const std::string& containing_type, std::vector* output) { + typename std::map, Value>::const_iterator it = by_extension_.lower_bound(std::make_pair(containing_type, 0)); bool success = false; @@ -215,7 +214,7 @@ bool SimpleDescriptorDatabase::DescriptorIndex::FindAllExtensionNumbers( template void SimpleDescriptorDatabase::DescriptorIndex::FindAllFileNames( - std::vector* output) { + std::vector* output) { output->resize(by_name_.size()); int i = 0; for (const auto& kv : by_name_) { @@ -225,13 +224,13 @@ void SimpleDescriptorDatabase::DescriptorIndex::FindAllFileNames( } template -typename std::map::iterator +typename std::map::iterator SimpleDescriptorDatabase::DescriptorIndex::FindLastLessOrEqual( - const string& name) { + const std::string& name) { // Find the last key in the map which sorts less than or equal to the // symbol name. Since upper_bound() returns the *first* key that sorts // *greater* than the input, we want the element immediately before that. - typename std::map::iterator iter = + typename std::map::iterator iter = by_symbol_.upper_bound(name); if (iter != by_symbol_.begin()) --iter; return iter; @@ -239,7 +238,7 @@ SimpleDescriptorDatabase::DescriptorIndex::FindLastLessOrEqual( template bool SimpleDescriptorDatabase::DescriptorIndex::IsSubSymbol( - const string& sub_symbol, const string& super_symbol) { + const std::string& sub_symbol, const std::string& super_symbol) { return sub_symbol == super_symbol || (HasPrefixString(super_symbol, sub_symbol) && super_symbol[sub_symbol.size()] == '.'); @@ -247,7 +246,7 @@ bool SimpleDescriptorDatabase::DescriptorIndex::IsSubSymbol( template bool SimpleDescriptorDatabase::DescriptorIndex::ValidateSymbolName( - const string& name) { + const std::string& name) { for (int i = 0; i < name.size(); i++) { // I don't trust ctype.h due to locales. :( if (name[i] != '.' && name[i] != '_' && @@ -278,33 +277,30 @@ bool SimpleDescriptorDatabase::AddAndOwn(const FileDescriptorProto* file) { return index_.AddFile(*file, file); } -bool SimpleDescriptorDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { +bool SimpleDescriptorDatabase::FindFileByName(const std::string& filename, + FileDescriptorProto* output) { return MaybeCopy(index_.FindFile(filename), output); } bool SimpleDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { + const std::string& symbol_name, FileDescriptorProto* output) { return MaybeCopy(index_.FindSymbol(symbol_name), output); } bool SimpleDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, + const std::string& containing_type, int field_number, FileDescriptorProto* output) { return MaybeCopy(index_.FindExtension(containing_type, field_number), output); } bool SimpleDescriptorDatabase::FindAllExtensionNumbers( - const string& extendee_type, - std::vector* output) { + const std::string& extendee_type, std::vector* output) { return index_.FindAllExtensionNumbers(extendee_type, output); } -bool SimpleDescriptorDatabase::FindAllFileNames(std::vector* output) { +bool SimpleDescriptorDatabase::FindAllFileNames( + std::vector* output) { index_.FindAllFileNames(output); return true; } @@ -345,21 +341,18 @@ bool EncodedDescriptorDatabase::AddCopy( return Add(copy, size); } -bool EncodedDescriptorDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { +bool EncodedDescriptorDatabase::FindFileByName(const std::string& filename, + FileDescriptorProto* output) { return MaybeParse(index_.FindFile(filename), output); } bool EncodedDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { + const std::string& symbol_name, FileDescriptorProto* output) { return MaybeParse(index_.FindSymbol(symbol_name), output); } bool EncodedDescriptorDatabase::FindNameOfFileContainingSymbol( - const string& symbol_name, - string* output) { + const std::string& symbol_name, std::string* output) { std::pair encoded_file = index_.FindSymbol(symbol_name); if (encoded_file.first == NULL) return false; @@ -387,16 +380,14 @@ bool EncodedDescriptorDatabase::FindNameOfFileContainingSymbol( } bool EncodedDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, + const std::string& containing_type, int field_number, FileDescriptorProto* output) { return MaybeParse(index_.FindExtension(containing_type, field_number), output); } bool EncodedDescriptorDatabase::FindAllExtensionNumbers( - const string& extendee_type, - std::vector* output) { + const std::string& extendee_type, std::vector* output) { return index_.FindAllExtensionNumbers(extendee_type, output); } @@ -413,9 +404,8 @@ DescriptorPoolDatabase::DescriptorPoolDatabase(const DescriptorPool& pool) : pool_(pool) {} DescriptorPoolDatabase::~DescriptorPoolDatabase() {} -bool DescriptorPoolDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { +bool DescriptorPoolDatabase::FindFileByName(const std::string& filename, + FileDescriptorProto* output) { const FileDescriptor* file = pool_.FindFileByName(filename); if (file == NULL) return false; output->Clear(); @@ -424,8 +414,7 @@ bool DescriptorPoolDatabase::FindFileByName( } bool DescriptorPoolDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { + const std::string& symbol_name, FileDescriptorProto* output) { const FileDescriptor* file = pool_.FindFileContainingSymbol(symbol_name); if (file == NULL) return false; output->Clear(); @@ -434,8 +423,7 @@ bool DescriptorPoolDatabase::FindFileContainingSymbol( } bool DescriptorPoolDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, + const std::string& containing_type, int field_number, FileDescriptorProto* output) { const Descriptor* extendee = pool_.FindMessageTypeByName(containing_type); if (extendee == NULL) return false; @@ -450,8 +438,7 @@ bool DescriptorPoolDatabase::FindFileContainingExtension( } bool DescriptorPoolDatabase::FindAllExtensionNumbers( - const string& extendee_type, - std::vector* output) { + const std::string& extendee_type, std::vector* output) { const Descriptor* extendee = pool_.FindMessageTypeByName(extendee_type); if (extendee == NULL) return false; @@ -478,9 +465,8 @@ MergedDescriptorDatabase::MergedDescriptorDatabase( : sources_(sources) {} MergedDescriptorDatabase::~MergedDescriptorDatabase() {} -bool MergedDescriptorDatabase::FindFileByName( - const string& filename, - FileDescriptorProto* output) { +bool MergedDescriptorDatabase::FindFileByName(const std::string& filename, + FileDescriptorProto* output) { for (int i = 0; i < sources_.size(); i++) { if (sources_[i]->FindFileByName(filename, output)) { return true; @@ -490,8 +476,7 @@ bool MergedDescriptorDatabase::FindFileByName( } bool MergedDescriptorDatabase::FindFileContainingSymbol( - const string& symbol_name, - FileDescriptorProto* output) { + const std::string& symbol_name, FileDescriptorProto* output) { for (int i = 0; i < sources_.size(); i++) { if (sources_[i]->FindFileContainingSymbol(symbol_name, output)) { // The symbol was found in source i. However, if one of the previous @@ -512,8 +497,7 @@ bool MergedDescriptorDatabase::FindFileContainingSymbol( } bool MergedDescriptorDatabase::FindFileContainingExtension( - const string& containing_type, - int field_number, + const std::string& containing_type, int field_number, FileDescriptorProto* output) { for (int i = 0; i < sources_.size(); i++) { if (sources_[i]->FindFileContainingExtension( @@ -536,8 +520,7 @@ bool MergedDescriptorDatabase::FindFileContainingExtension( } bool MergedDescriptorDatabase::FindAllExtensionNumbers( - const string& extendee_type, - std::vector* output) { + const std::string& extendee_type, std::vector* output) { std::set merged_results; std::vector results; bool success = false; diff --git a/src/google/protobuf/descriptor_database.h b/src/google/protobuf/descriptor_database.h index 48892af10a..5ac0383010 100644 --- a/src/google/protobuf/descriptor_database.h +++ b/src/google/protobuf/descriptor_database.h @@ -262,7 +262,8 @@ class PROTOBUF_EXPORT SimpleDescriptorDatabase : public DescriptorDatabase { // True if either the arguments are equal or super_symbol identifies a // parent symbol of sub_symbol (e.g. "foo.bar" is a parent of // "foo.bar.baz", but not a parent of "foo.barbaz"). - bool IsSubSymbol(const std::string& sub_symbol, const std::string& super_symbol); + bool IsSubSymbol(const std::string& sub_symbol, + const std::string& super_symbol); // Returns true if and only if all characters in the name are alphanumerics, // underscores, or periods. diff --git a/src/google/protobuf/descriptor_database_unittest.cc b/src/google/protobuf/descriptor_database_unittest.cc index 7d3f17ca32..423a7002e9 100644 --- a/src/google/protobuf/descriptor_database_unittest.cc +++ b/src/google/protobuf/descriptor_database_unittest.cc @@ -60,7 +60,7 @@ static void AddToDatabase(SimpleDescriptorDatabase* database, } static void ExpectContainsType(const FileDescriptorProto& proto, - const string& type_name) { + const std::string& type_name) { for (int i = 0; i < proto.message_type_size(); i++) { if (proto.message_type(i).name() == type_name) return; } @@ -124,7 +124,7 @@ class EncodedDescriptorDatabaseTestCase : public DescriptorDatabaseTestCase { return &database_; } virtual bool AddToDatabase(const FileDescriptorProto& file) { - string data; + std::string data; file.SerializeToString(&data); return database_.AddCopy(data.data(), data.size()); } @@ -497,10 +497,10 @@ TEST(EncodedDescriptorDatabaseExtraTest, FindNameOfFileContainingSymbol) { file2b.add_message_type()->set_name("Bar"); // Normal serialization allows our optimization to kick in. - string data1 = file1.SerializeAsString(); + std::string data1 = file1.SerializeAsString(); // Force out-of-order serialization to test slow path. - string data2 = file2b.SerializeAsString() + file2a.SerializeAsString(); + std::string data2 = file2b.SerializeAsString() + file2a.SerializeAsString(); // Create EncodedDescriptorDatabase containing both files. EncodedDescriptorDatabase db; @@ -508,7 +508,7 @@ TEST(EncodedDescriptorDatabaseExtraTest, FindNameOfFileContainingSymbol) { db.Add(data2.data(), data2.size()); // Test! - string filename; + std::string filename; EXPECT_TRUE(db.FindNameOfFileContainingSymbol("foo.Foo", &filename)); EXPECT_EQ("foo.proto", filename); EXPECT_TRUE(db.FindNameOfFileContainingSymbol("foo.Foo.Blah", &filename)); @@ -530,7 +530,7 @@ TEST(SimpleDescriptorDatabaseExtraTest, FindAllFileNames) { db.Add(f); // Test! - std::vector all_files; + std::vector all_files; db.FindAllFileNames(&all_files); EXPECT_THAT(all_files, testing::ElementsAre("foo.proto")); } diff --git a/src/google/protobuf/descriptor_unittest.cc b/src/google/protobuf/descriptor_unittest.cc index ad32f819d5..e93d01bdc0 100644 --- a/src/google/protobuf/descriptor_unittest.cc +++ b/src/google/protobuf/descriptor_unittest.cc @@ -71,41 +71,43 @@ namespace protobuf { namespace descriptor_unittest { // Some helpers to make assembling descriptors faster. -DescriptorProto* AddMessage(FileDescriptorProto* file, const string& name) { +DescriptorProto* AddMessage(FileDescriptorProto* file, + const std::string& name) { DescriptorProto* result = file->add_message_type(); result->set_name(name); return result; } -DescriptorProto* AddNestedMessage(DescriptorProto* parent, const string& name) { +DescriptorProto* AddNestedMessage(DescriptorProto* parent, + const std::string& name) { DescriptorProto* result = parent->add_nested_type(); result->set_name(name); return result; } -EnumDescriptorProto* AddEnum(FileDescriptorProto* file, const string& name) { +EnumDescriptorProto* AddEnum(FileDescriptorProto* file, + const std::string& name) { EnumDescriptorProto* result = file->add_enum_type(); result->set_name(name); return result; } EnumDescriptorProto* AddNestedEnum(DescriptorProto* parent, - const string& name) { + const std::string& name) { EnumDescriptorProto* result = parent->add_enum_type(); result->set_name(name); return result; } ServiceDescriptorProto* AddService(FileDescriptorProto* file, - const string& name) { + const std::string& name) { ServiceDescriptorProto* result = file->add_service(); result->set_name(name); return result; } -FieldDescriptorProto* AddField(DescriptorProto* parent, - const string& name, int number, - FieldDescriptorProto::Label label, +FieldDescriptorProto* AddField(DescriptorProto* parent, const std::string& name, + int number, FieldDescriptorProto::Label label, FieldDescriptorProto::Type type) { FieldDescriptorProto* result = parent->add_field(); result->set_name(name); @@ -116,8 +118,8 @@ FieldDescriptorProto* AddField(DescriptorProto* parent, } FieldDescriptorProto* AddExtension(FileDescriptorProto* file, - const string& extendee, - const string& name, int number, + const std::string& extendee, + const std::string& name, int number, FieldDescriptorProto::Label label, FieldDescriptorProto::Type type) { FieldDescriptorProto* result = file->add_extension(); @@ -130,8 +132,8 @@ FieldDescriptorProto* AddExtension(FileDescriptorProto* file, } FieldDescriptorProto* AddNestedExtension(DescriptorProto* parent, - const string& extendee, - const string& name, int number, + const std::string& extendee, + const std::string& name, int number, FieldDescriptorProto::Label label, FieldDescriptorProto::Type type) { FieldDescriptorProto* result = parent->add_extension(); @@ -168,7 +170,7 @@ EnumDescriptorProto::EnumReservedRange* AddReservedRange( } EnumValueDescriptorProto* AddEnumValue(EnumDescriptorProto* enum_proto, - const string& name, int number) { + const std::string& name, int number) { EnumValueDescriptorProto* result = enum_proto->add_value(); result->set_name(name); result->set_number(number); @@ -176,9 +178,9 @@ EnumValueDescriptorProto* AddEnumValue(EnumDescriptorProto* enum_proto, } MethodDescriptorProto* AddMethod(ServiceDescriptorProto* service, - const string& name, - const string& input_type, - const string& output_type) { + const std::string& name, + const std::string& input_type, + const std::string& output_type) { MethodDescriptorProto* result = service->add_method(); result->set_name(name); result->set_input_type(input_type); @@ -188,7 +190,7 @@ MethodDescriptorProto* AddMethod(ServiceDescriptorProto* service, // Empty enums technically aren't allowed. We need to insert a dummy value // into them. -void AddEmptyEnum(FileDescriptorProto* file, const string& name) { +void AddEmptyEnum(FileDescriptorProto* file, const std::string& name) { AddEnumValue(AddEnum(file, name), name + "_DUMMY", 1); } @@ -197,13 +199,13 @@ class MockErrorCollector : public DescriptorPool::ErrorCollector { MockErrorCollector() {} ~MockErrorCollector() {} - string text_; - string warning_text_; + std::string text_; + std::string warning_text_; // implements ErrorCollector --------------------------------------- - void AddError(const string& filename, - const string& element_name, const Message* descriptor, - ErrorLocation location, const string& message) { + void AddError(const std::string& filename, const std::string& element_name, + const Message* descriptor, ErrorLocation location, + const std::string& message) { const char* location_name = NULL; switch (location) { case NAME : location_name = "NAME" ; break; @@ -224,9 +226,9 @@ class MockErrorCollector : public DescriptorPool::ErrorCollector { } // implements ErrorCollector --------------------------------------- - void AddWarning(const string& filename, const string& element_name, + void AddWarning(const std::string& filename, const std::string& element_name, const Message* descriptor, ErrorLocation location, - const string& message) { + const std::string& message) { const char* location_name = NULL; switch (location) { case NAME : location_name = "NAME" ; break; @@ -504,8 +506,8 @@ TEST_F(FileDescriptorTest, Syntax) { } void ExtractDebugString( - const FileDescriptor* file, std::set* visited, - std::vector >* debug_strings) { + const FileDescriptor* file, std::set* visited, + std::vector>* debug_strings) { if (!visited->insert(file->name()).second) { return; } @@ -518,20 +520,20 @@ void ExtractDebugString( class SimpleErrorCollector : public io::ErrorCollector { public: // implements ErrorCollector --------------------------------------- - void AddError(int line, int column, const string& message) { + void AddError(int line, int column, const std::string& message) { last_error_ = StringPrintf("%d:%d:", line, column) + message; } - const string& last_error() { return last_error_; } + const std::string& last_error() { return last_error_; } private: - string last_error_; + std::string last_error_; }; // Test that the result of FileDescriptor::DebugString() can be used to create // the original descriptors. TEST_F(FileDescriptorTest, DebugStringRoundTrip) { - std::set visited; - std::vector > debug_strings; + std::set visited; + std::vector> debug_strings; ExtractDebugString(protobuf_unittest::TestAllTypes::descriptor()->file(), &visited, &debug_strings); ExtractDebugString( @@ -543,8 +545,8 @@ TEST_F(FileDescriptorTest, DebugStringRoundTrip) { DescriptorPool pool; for (int i = 0; i < debug_strings.size(); ++i) { - const string& name = debug_strings[i].first; - const string& content = debug_strings[i].second; + const std::string& name = debug_strings[i].first; + const std::string& content = debug_strings[i].second; io::ArrayInputStream input_stream(content.data(), content.size()); SimpleErrorCollector error_collector; io::Tokenizer tokenizer(&input_stream, &error_collector); @@ -2268,7 +2270,7 @@ TEST_F(MiscTest, TypeNames) { EXPECT_STREQ("fixed64" , GetTypeNameForFieldType(FD::TYPE_FIXED64 )); EXPECT_STREQ("fixed32" , GetTypeNameForFieldType(FD::TYPE_FIXED32 )); EXPECT_STREQ("bool" , GetTypeNameForFieldType(FD::TYPE_BOOL )); - EXPECT_STREQ("string" , GetTypeNameForFieldType(FD::TYPE_STRING )); + EXPECT_STREQ("string", GetTypeNameForFieldType(FD::TYPE_STRING)); EXPECT_STREQ("group" , GetTypeNameForFieldType(FD::TYPE_GROUP )); EXPECT_STREQ("message" , GetTypeNameForFieldType(FD::TYPE_MESSAGE )); EXPECT_STREQ("bytes" , GetTypeNameForFieldType(FD::TYPE_BYTES )); @@ -2293,7 +2295,7 @@ TEST_F(MiscTest, StaticTypeNames) { EXPECT_STREQ("fixed64" , FD::TypeName(FD::TYPE_FIXED64 )); EXPECT_STREQ("fixed32" , FD::TypeName(FD::TYPE_FIXED32 )); EXPECT_STREQ("bool" , FD::TypeName(FD::TYPE_BOOL )); - EXPECT_STREQ("string" , FD::TypeName(FD::TYPE_STRING )); + EXPECT_STREQ("string", FD::TypeName(FD::TYPE_STRING)); EXPECT_STREQ("group" , FD::TypeName(FD::TYPE_GROUP )); EXPECT_STREQ("message" , FD::TypeName(FD::TYPE_MESSAGE )); EXPECT_STREQ("bytes" , FD::TypeName(FD::TYPE_BYTES )); @@ -2343,10 +2345,10 @@ TEST_F(MiscTest, CppTypeNames) { EXPECT_STREQ("uint64" , GetCppTypeNameForFieldType(FD::TYPE_FIXED64 )); EXPECT_STREQ("uint32" , GetCppTypeNameForFieldType(FD::TYPE_FIXED32 )); EXPECT_STREQ("bool" , GetCppTypeNameForFieldType(FD::TYPE_BOOL )); - EXPECT_STREQ("string" , GetCppTypeNameForFieldType(FD::TYPE_STRING )); + EXPECT_STREQ("string", GetCppTypeNameForFieldType(FD::TYPE_STRING)); EXPECT_STREQ("message", GetCppTypeNameForFieldType(FD::TYPE_GROUP )); EXPECT_STREQ("message", GetCppTypeNameForFieldType(FD::TYPE_MESSAGE )); - EXPECT_STREQ("string" , GetCppTypeNameForFieldType(FD::TYPE_BYTES )); + EXPECT_STREQ("string", GetCppTypeNameForFieldType(FD::TYPE_BYTES)); EXPECT_STREQ("uint32" , GetCppTypeNameForFieldType(FD::TYPE_UINT32 )); EXPECT_STREQ("enum" , GetCppTypeNameForFieldType(FD::TYPE_ENUM )); EXPECT_STREQ("int32" , GetCppTypeNameForFieldType(FD::TYPE_SFIXED32)); @@ -2368,7 +2370,7 @@ TEST_F(MiscTest, StaticCppTypeNames) { EXPECT_STREQ("float" , FD::CppTypeName(FD::CPPTYPE_FLOAT )); EXPECT_STREQ("bool" , FD::CppTypeName(FD::CPPTYPE_BOOL )); EXPECT_STREQ("enum" , FD::CppTypeName(FD::CPPTYPE_ENUM )); - EXPECT_STREQ("string" , FD::CppTypeName(FD::CPPTYPE_STRING )); + EXPECT_STREQ("string", FD::CppTypeName(FD::CPPTYPE_STRING)); EXPECT_STREQ("message", FD::CppTypeName(FD::CPPTYPE_MESSAGE)); } @@ -2453,7 +2455,7 @@ TEST_F(MiscTest, DefaultValues) { AddField(message_proto, "bool" , 7, label, FD::TYPE_BOOL ) ->set_default_value("true"); AddField(message_proto, "string", 8, label, FD::TYPE_STRING) - ->set_default_value("hello"); + ->set_default_value("hello"); AddField(message_proto, "data" , 9, label, FD::TYPE_BYTES ) ->set_default_value("\\001\\002\\003"); @@ -2993,7 +2995,7 @@ TEST(CustomOptions, OptionTypes) { EXPECT_EQ("Hello, \"World\"", options->GetExtension(protobuf_unittest::string_opt)); - EXPECT_EQ(string("Hello\0World", 11), + EXPECT_EQ(std::string("Hello\0World", 11), options->GetExtension(protobuf_unittest::bytes_opt)); EXPECT_EQ(protobuf_unittest::DummyMessageContainingEnum::TEST_OPTION_ENUM_TYPE2, @@ -3541,7 +3543,7 @@ class ValidationErrorTest : public testing::Test { protected: // Parse file_text as a FileDescriptorProto in text format and add it // to the DescriptorPool. Expect no errors. - const FileDescriptor* BuildFile(const string& file_text) { + const FileDescriptor* BuildFile(const std::string& file_text) { FileDescriptorProto file_proto; EXPECT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); return GOOGLE_CHECK_NOTNULL(pool_.BuildFile(file_proto)); @@ -3550,8 +3552,8 @@ class ValidationErrorTest : public testing::Test { // Parse file_text as a FileDescriptorProto in text format and add it // to the DescriptorPool. Expect errors to be produced which match the // given error text. - void BuildFileWithErrors(const string& file_text, - const string& expected_errors) { + void BuildFileWithErrors(const std::string& file_text, + const std::string& expected_errors) { FileDescriptorProto file_proto; ASSERT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); @@ -3564,8 +3566,8 @@ class ValidationErrorTest : public testing::Test { // Parse file_text as a FileDescriptorProto in text format and add it // to the DescriptorPool. Expect errors to be produced which match the // given warning text. - void BuildFileWithWarnings(const string& file_text, - const string& expected_warnings) { + void BuildFileWithWarnings(const std::string& file_text, + const std::string& expected_warnings) { FileDescriptorProto file_proto; ASSERT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); @@ -5395,16 +5397,17 @@ TEST_F(ValidationErrorTest, StringOptionValueIsNotString) { BuildDescriptorMessagesInTestPool(); BuildFileWithErrors( - "name: \"foo.proto\" " - "dependency: \"google/protobuf/descriptor.proto\" " - "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " - " type: TYPE_STRING extendee: \"google.protobuf.FileOptions\" }" - "options { uninterpreted_option { name { name_part: \"foo\" " - " is_extension: true } " - " identifier_value: \"QUUX\" } }", + "name: \"foo.proto\" " + "dependency: \"google/protobuf/descriptor.proto\" " + "extension { name: \"foo\" number: 7672757 label: LABEL_OPTIONAL " + " type: TYPE_STRING extendee: \"google.protobuf.FileOptions\" }" + "options { uninterpreted_option { name { name_part: \"foo\" " + " is_extension: true } " + " identifier_value: \"QUUX\" } }", - "foo.proto: foo.proto: OPTION_VALUE: Value must be quoted string for " - "string option \"foo\".\n"); + "foo.proto: foo.proto: OPTION_VALUE: Value must be quoted string " + "for " + "string option \"foo\".\n"); } TEST_F(ValidationErrorTest, JsonNameOptionOnExtensions) { @@ -5449,7 +5452,7 @@ TEST_F(ValidationErrorTest, DuplicateExtensionFieldNumber) { // Helper function for tests that check for aggregate value parsing // errors. The "value" argument is embedded inside the // "uninterpreted_option" portion of the result. -static string EmbedAggregateValue(const char* value) { +static std::string EmbedAggregateValue(const char* value) { return strings::Substitute( "name: \"foo.proto\" " "dependency: \"google/protobuf/descriptor.proto\" " @@ -5610,7 +5613,7 @@ TEST_F(ValidationErrorTest, ErrorsReportedToLogError) { "message_type { name: \"Foo\" } ", &file_proto)); - std::vector errors; + std::vector errors; { ScopedMemoryLog log; @@ -6445,7 +6448,7 @@ class DatabaseBackedPoolTest : public testing::Test { ~ErrorDescriptorDatabase() {} // implements DescriptorDatabase --------------------------------- - bool FindFileByName(const string& filename, + bool FindFileByName(const std::string& filename, FileDescriptorProto* output) { // error.proto and error2.proto cyclically import each other. if (filename == "error.proto") { @@ -6462,11 +6465,11 @@ class DatabaseBackedPoolTest : public testing::Test { return false; } } - bool FindFileContainingSymbol(const string& symbol_name, + bool FindFileContainingSymbol(const std::string& symbol_name, FileDescriptorProto* output) { return false; } - bool FindFileContainingExtension(const string& containing_type, + bool FindFileContainingExtension(const std::string& containing_type, int field_number, FileDescriptorProto* output) { return false; @@ -6492,17 +6495,17 @@ class DatabaseBackedPoolTest : public testing::Test { } // implements DescriptorDatabase --------------------------------- - bool FindFileByName(const string& filename, + bool FindFileByName(const std::string& filename, FileDescriptorProto* output) { ++call_count_; return wrapped_db_->FindFileByName(filename, output); } - bool FindFileContainingSymbol(const string& symbol_name, + bool FindFileContainingSymbol(const std::string& symbol_name, FileDescriptorProto* output) { ++call_count_; return wrapped_db_->FindFileContainingSymbol(symbol_name, output); } - bool FindFileContainingExtension(const string& containing_type, + bool FindFileContainingExtension(const std::string& containing_type, int field_number, FileDescriptorProto* output) { ++call_count_; @@ -6523,15 +6526,15 @@ class DatabaseBackedPoolTest : public testing::Test { DescriptorDatabase* wrapped_db_; // implements DescriptorDatabase --------------------------------- - bool FindFileByName(const string& filename, + bool FindFileByName(const std::string& filename, FileDescriptorProto* output) { return wrapped_db_->FindFileByName(filename, output); } - bool FindFileContainingSymbol(const string& symbol_name, + bool FindFileContainingSymbol(const std::string& symbol_name, FileDescriptorProto* output) { return FindFileByName("foo.proto", output); } - bool FindFileContainingExtension(const string& containing_type, + bool FindFileContainingExtension(const std::string& containing_type, int field_number, FileDescriptorProto* output) { return FindFileByName("foo.proto", output); @@ -6646,7 +6649,7 @@ TEST_F(DatabaseBackedPoolTest, ErrorWithoutErrorCollector) { ErrorDescriptorDatabase error_database; DescriptorPool pool(&error_database); - std::vector errors; + std::vector errors; { ScopedMemoryLog log; @@ -6809,7 +6812,7 @@ class ExponentialErrorDatabase : public DescriptorDatabase { ~ExponentialErrorDatabase() {} // implements DescriptorDatabase --------------------------------- - bool FindFileByName(const string& filename, + bool FindFileByName(const std::string& filename, FileDescriptorProto* output) { int file_num = -1; FullMatch(filename, "file", ".proto", &file_num); @@ -6819,7 +6822,7 @@ class ExponentialErrorDatabase : public DescriptorDatabase { return false; } } - bool FindFileContainingSymbol(const string& symbol_name, + bool FindFileContainingSymbol(const std::string& symbol_name, FileDescriptorProto* output) { int file_num = -1; FullMatch(symbol_name, "Message", "", &file_num); @@ -6829,17 +6832,15 @@ class ExponentialErrorDatabase : public DescriptorDatabase { return false; } } - bool FindFileContainingExtension(const string& containing_type, + bool FindFileContainingExtension(const std::string& containing_type, int field_number, FileDescriptorProto* output) { return false; } private: - void FullMatch(const string& name, - const string& begin_with, - const string& end_with, - int* file_num) { + void FullMatch(const std::string& name, const std::string& begin_with, + const std::string& end_with, int* file_num) { int begin_size = begin_with.size(); int end_size = end_with.size(); if (name.substr(0, begin_size) != begin_with || @@ -6917,15 +6918,14 @@ class AbortingErrorCollector : public DescriptorPool::ErrorCollector { public: AbortingErrorCollector() {} - virtual void AddError( - const string &filename, - const string &element_name, - const Message *message, - ErrorLocation location, - const string &error_message) { + virtual void AddError(const std::string& filename, + const std::string& element_name, const Message* message, + ErrorLocation location, + const std::string& error_message) { GOOGLE_LOG(FATAL) << "AddError() called unexpectedly: " << filename << " [" << element_name << "]: " << error_message; } + private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AbortingErrorCollector); }; @@ -6933,17 +6933,17 @@ class AbortingErrorCollector : public DescriptorPool::ErrorCollector { // A source tree containing only one file. class SingletonSourceTree : public compiler::SourceTree { public: - SingletonSourceTree(const string& filename, const string& contents) + SingletonSourceTree(const std::string& filename, const std::string& contents) : filename_(filename), contents_(contents) {} - virtual io::ZeroCopyInputStream* Open(const string& filename) { + virtual io::ZeroCopyInputStream* Open(const std::string& filename) { return filename == filename_ ? new io::ArrayInputStream(contents_.data(), contents_.size()) : NULL; } private: - const string filename_; - const string contents_; + const std::string filename_; + const std::string contents_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(SingletonSourceTree); }; @@ -7039,7 +7039,7 @@ class SourceLocationTest : public testing::Test { simple_db_.Add(file_proto_); } - static string PrintSourceLocation(const SourceLocation &loc) { + static std::string PrintSourceLocation(const SourceLocation& loc) { return strings::Substitute("$0:$1-$2:$3", 1 + loc.start_line, 1 + loc.start_column, @@ -7600,7 +7600,7 @@ class LazilyBuildDependenciesTest : public testing::Test { db_.Add(tmp); } - void ParseProtoAndAddToDb(const string& proto) { + void ParseProtoAndAddToDb(const std::string& proto) { FileDescriptorProto tmp; ASSERT_TRUE(TextFormat::ParseFromString(proto, &tmp)); db_.Add(tmp); @@ -7608,12 +7608,12 @@ class LazilyBuildDependenciesTest : public testing::Test { void AddSimpleMessageProtoFileToDb(const char* file_name, const char* message_name) { - ParseProtoAndAddToDb("name: '" + string(file_name) + + ParseProtoAndAddToDb("name: '" + std::string(file_name) + ".proto' " "package: \"protobuf_unittest\" " "message_type { " " name:'" + - string(message_name) + + std::string(message_name) + "' " " field { name:'a' number:1 " " label:LABEL_OPTIONAL " @@ -7623,15 +7623,15 @@ class LazilyBuildDependenciesTest : public testing::Test { void AddSimpleEnumProtoFileToDb(const char* file_name, const char* enum_name, const char* enum_value_name) { - ParseProtoAndAddToDb("name: '" + string(file_name) + + ParseProtoAndAddToDb("name: '" + std::string(file_name) + ".proto' " "package: 'protobuf_unittest' " "enum_type { " " name:'" + - string(enum_name) + + std::string(enum_name) + "' " " value { name:'" + - string(enum_value_name) + + std::string(enum_value_name) + "' number:1 } " "}"); } diff --git a/src/google/protobuf/duration.pb.cc b/src/google/protobuf/duration.pb.cc index ed8bceeadb..ef83b78608 100644 --- a/src/google/protobuf/duration.pb.cc +++ b/src/google/protobuf/duration.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,54 +16,52 @@ // @@protoc_insertion_point(includes) #include -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class DurationDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Duration_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsDuration_google_2fprotobuf_2fduration_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Duration_default_instance_; - new (ptr) ::google::protobuf::Duration(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Duration_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Duration(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Duration::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Duration::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Duration_google_2fprotobuf_2fduration_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDuration_google_2fprotobuf_2fduration_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Duration_google_2fprotobuf_2fduration_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDuration_google_2fprotobuf_2fduration_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2fduration_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_Duration_google_2fprotobuf_2fduration_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Duration_google_2fprotobuf_2fduration_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fduration_2eproto[1]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fduration_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fduration_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fduration_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Duration, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Duration, seconds_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Duration, nanos_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, seconds_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Duration, nanos_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::protobuf::Duration)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Duration)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_Duration_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Duration_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fduration_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fduration_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fduration_2eproto, "google/protobuf/duration.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fduration_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fduration_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fduration_2eproto, file_level_service_descriptors_google_2fprotobuf_2fduration_2eproto, @@ -77,23 +75,22 @@ const char descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto[] = "f/ptypes/duration\370\001\001\242\002\003GPB\252\002\036Google.Prot" "obuf.WellKnownTypesb\006proto3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fduration_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fduration_2eproto = { false, InitDefaults_google_2fprotobuf_2fduration_2eproto, descriptor_table_protodef_google_2fprotobuf_2fduration_2eproto, "google/protobuf/duration.proto", &assign_descriptors_table_google_2fprotobuf_2fduration_2eproto, 227, }; void AddDescriptors_google_2fprotobuf_2fduration_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fduration_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fduration_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fduration_2eproto = []() { AddDescriptors_google_2fprotobuf_2fduration_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN // =================================================================== @@ -109,19 +106,19 @@ const int Duration::kNanosFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Duration::Duration() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Duration) } -Duration::Duration(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +Duration::Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Duration) } Duration::Duration(const Duration& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&seconds_, &from.seconds_, @@ -149,20 +146,20 @@ void Duration::ArenaDtor(void* object) { Duration* _this = reinterpret_cast< Duration* >(object); (void)_this; } -void Duration::RegisterArenaDtor(::google::protobuf::Arena*) { +void Duration::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void Duration::SetCachedSize(int size) const { _cached_size_.Set(size); } const Duration& Duration::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Duration_google_2fprotobuf_2fduration_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Duration_google_2fprotobuf_2fduration_2eproto.base); return *internal_default_instance(); } void Duration::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Duration) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -173,23 +170,24 @@ void Duration::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Duration::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Duration::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // int64 seconds = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_seconds(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_seconds(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // int32 nanos = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_nanos(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_nanos(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -210,21 +208,21 @@ const char* Duration::_InternalParse(const char* ptr, ::google::protobuf::intern } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Duration::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Duration) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int64 seconds = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( input, &seconds_))); } else { goto handle_unusual; @@ -234,10 +232,10 @@ bool Duration::MergePartialFromCodedStream( // int32 nanos = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &nanos_))); } else { goto handle_unusual; @@ -250,7 +248,7 @@ bool Duration::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -267,46 +265,46 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Duration::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Duration) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->seconds(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->seconds(), output); } // int32 nanos = 2; if (this->nanos() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Duration) } -::google::protobuf::uint8* Duration::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Duration::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Duration) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->seconds(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->seconds(), target); } // int32 nanos = 2; if (this->nanos() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Duration) @@ -319,41 +317,41 @@ size_t Duration::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( this->seconds()); } // int32 nanos = 2; if (this->nanos() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->nanos()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Duration::MergeFrom(const ::google::protobuf::Message& from) { +void Duration::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Duration) GOOGLE_DCHECK_NE(&from, this); const Duration* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Duration) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Duration) MergeFrom(*source); @@ -364,7 +362,7 @@ void Duration::MergeFrom(const Duration& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Duration) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.seconds() != 0) { @@ -375,7 +373,7 @@ void Duration::MergeFrom(const Duration& from) { } } -void Duration::CopyFrom(const ::google::protobuf::Message& from) { +void Duration::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Duration) if (&from == this) return; Clear(); @@ -419,22 +417,19 @@ void Duration::InternalSwap(Duration* other) { swap(nanos_, other->nanos_); } -::google::protobuf::Metadata Duration::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fduration_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Duration::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fduration_2eproto); return ::file_level_metadata_google_2fprotobuf_2fduration_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::Duration* Arena::CreateMaybeMessage< ::google::protobuf::Duration >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::Duration >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Duration >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Duration >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/duration.pb.h b/src/google/protobuf/duration.pb.h index a9920983bc..a1bd8499f7 100644 --- a/src/google/protobuf/duration.pb.h +++ b/src/google/protobuf/duration.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/duration.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto #include #include @@ -31,61 +31,56 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fduration_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fduration_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2fduration_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class Duration; class DurationDefaultTypeInternal; PROTOBUF_EXPORT extern DurationDefaultTypeInternal _Duration_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::Duration* Arena::CreateMaybeMessage<::google::protobuf::Duration>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN // =================================================================== class PROTOBUF_EXPORT Duration final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ { public: Duration(); virtual ~Duration(); Duration(const Duration& from); - - inline Duration& operator=(const Duration& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Duration(Duration&& from) noexcept : Duration() { *this = ::std::move(from); } + inline Duration& operator=(const Duration& from) { + CopyFrom(from); + return *this; + } inline Duration& operator=(Duration&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -94,14 +89,14 @@ class PROTOBUF_EXPORT Duration final : } return *this; } - #endif - inline ::google::protobuf::Arena* GetArena() const final { + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Duration& default_instance(); @@ -126,11 +121,11 @@ class PROTOBUF_EXPORT Duration final : return CreateMaybeMessage(nullptr); } - Duration* New(::google::protobuf::Arena* arena) const final { + Duration* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Duration& from); void MergeFrom(const Duration& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -138,15 +133,15 @@ class PROTOBUF_EXPORT Duration final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -154,17 +149,17 @@ class PROTOBUF_EXPORT Duration final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Duration* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Duration"; } protected: - explicit Duration(::google::protobuf::Arena* arena); + explicit Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -172,7 +167,7 @@ class PROTOBUF_EXPORT Duration final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -181,26 +176,26 @@ class PROTOBUF_EXPORT Duration final : // int64 seconds = 1; void clear_seconds(); static const int kSecondsFieldNumber = 1; - ::google::protobuf::int64 seconds() const; - void set_seconds(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 seconds() const; + void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); // int32 nanos = 2; void clear_nanos(); static const int kNanosFieldNumber = 2; - ::google::protobuf::int32 nanos() const; - void set_nanos(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 nanos() const; + void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.Duration) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::int64 seconds_; - ::google::protobuf::int32 nanos_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::int64 seconds_; + ::PROTOBUF_NAMESPACE_ID::int32 nanos_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fduration_2eproto; }; // =================================================================== @@ -218,11 +213,11 @@ class PROTOBUF_EXPORT Duration final : inline void Duration::clear_seconds() { seconds_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 Duration::seconds() const { +inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::seconds() const { // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds) return seconds_; } -inline void Duration::set_seconds(::google::protobuf::int64 value) { +inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { seconds_ = value; // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds) @@ -232,11 +227,11 @@ inline void Duration::set_seconds(::google::protobuf::int64 value) { inline void Duration::clear_nanos() { nanos_ = 0; } -inline ::google::protobuf::int32 Duration::nanos() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::nanos() const { // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) return nanos_; } -inline void Duration::set_nanos(::google::protobuf::int32 value) { +inline void Duration::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { nanos_ = value; // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos) @@ -248,10 +243,9 @@ inline void Duration::set_nanos(::google::protobuf::int32 value) { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto diff --git a/src/google/protobuf/dynamic_message.cc b/src/google/protobuf/dynamic_message.cc index 6e4338f413..44c1fd7394 100644 --- a/src/google/protobuf/dynamic_message.cc +++ b/src/google/protobuf/dynamic_message.cc @@ -128,7 +128,7 @@ int FieldSpaceUsed(const FieldDescriptor* field) { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - return sizeof(RepeatedPtrField); + return sizeof(RepeatedPtrField); } break; } @@ -379,7 +379,7 @@ void DynamicMessage::SharedCtor(bool lock_factory) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: if (!field->is_repeated()) { - const string* default_value; + const std::string* default_value; if (is_prototype()) { default_value = &field->default_value_string(); } else { @@ -391,7 +391,7 @@ void DynamicMessage::SharedCtor(bool lock_factory) { ArenaStringPtr* asp = new(field_ptr) ArenaStringPtr(); asp->UnsafeSetDefault(default_value); } else { - new (field_ptr) RepeatedPtrField(arena_); + new (field_ptr) RepeatedPtrField(arena_); } break; } @@ -470,10 +470,9 @@ DynamicMessage::~DynamicMessage() { switch (field->options().ctype()) { default: case FieldOptions::STRING: { - const ::std::string* default_value = + const std::string* default_value = &(reinterpret_cast( - reinterpret_cast( - type_info_->prototype) + + reinterpret_cast(type_info_->prototype) + type_info_->offsets[i]) ->Get()); reinterpret_cast(field_ptr)->Destroy( @@ -511,8 +510,8 @@ DynamicMessage::~DynamicMessage() { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - reinterpret_cast*>(field_ptr) - ->~RepeatedPtrField(); + reinterpret_cast*>(field_ptr) + ->~RepeatedPtrField(); break; } break; @@ -531,7 +530,7 @@ DynamicMessage::~DynamicMessage() { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: { - const ::std::string* default_value = + const std::string* default_value = &(reinterpret_cast( type_info_->prototype->OffsetToPointer( type_info_->offsets[i])) diff --git a/src/google/protobuf/empty.pb.cc b/src/google/protobuf/empty.pb.cc index 5c34b5fc18..1831645b54 100644 --- a/src/google/protobuf/empty.pb.cc +++ b/src/google/protobuf/empty.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,52 +16,50 @@ // @@protoc_insertion_point(includes) #include -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class EmptyDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Empty_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsEmpty_google_2fprotobuf_2fempty_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Empty_default_instance_; - new (ptr) ::google::protobuf::Empty(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Empty_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Empty(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Empty::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Empty::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Empty_google_2fprotobuf_2fempty_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmpty_google_2fprotobuf_2fempty_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Empty_google_2fprotobuf_2fempty_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEmpty_google_2fprotobuf_2fempty_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2fempty_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fempty_2eproto[1]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fempty_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fempty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fempty_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Empty, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Empty, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::protobuf::Empty)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Empty)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_Empty_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Empty_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fempty_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fempty_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fempty_2eproto, "google/protobuf/empty.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fempty_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fempty_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fempty_2eproto, file_level_service_descriptors_google_2fprotobuf_2fempty_2eproto, @@ -74,23 +72,22 @@ const char descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto[] = "/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf" ".WellKnownTypesb\006proto3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fempty_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fempty_2eproto = { false, InitDefaults_google_2fprotobuf_2fempty_2eproto, descriptor_table_protodef_google_2fprotobuf_2fempty_2eproto, "google/protobuf/empty.proto", &assign_descriptors_table_google_2fprotobuf_2fempty_2eproto, 183, }; void AddDescriptors_google_2fprotobuf_2fempty_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fempty_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fempty_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fempty_2eproto = []() { AddDescriptors_google_2fprotobuf_2fempty_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN // =================================================================== @@ -104,19 +101,19 @@ class Empty::HasBitSetters { #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Empty::Empty() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Empty) } -Empty::Empty(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +Empty::Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty) } Empty::Empty(const Empty& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty) @@ -138,20 +135,20 @@ void Empty::ArenaDtor(void* object) { Empty* _this = reinterpret_cast< Empty* >(object); (void)_this; } -void Empty::RegisterArenaDtor(::google::protobuf::Arena*) { +void Empty::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void Empty::SetCachedSize(int size) const { _cached_size_.Set(size); } const Empty& Empty::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Empty_google_2fprotobuf_2fempty_2eproto.base); return *internal_default_instance(); } void Empty::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Empty) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -159,10 +156,11 @@ void Empty::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Empty::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Empty::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { default: { @@ -181,19 +179,19 @@ const char* Empty::_InternalParse(const char* ptr, ::google::protobuf::internal: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Empty::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Empty) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; handle_unusual: if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); } success: @@ -207,26 +205,26 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Empty::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Empty) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Empty) } -::google::protobuf::uint8* Empty::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Empty::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Empty) @@ -239,27 +237,27 @@ size_t Empty::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Empty::MergeFrom(const ::google::protobuf::Message& from) { +void Empty::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Empty) GOOGLE_DCHECK_NE(&from, this); const Empty* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Empty) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Empty) MergeFrom(*source); @@ -270,12 +268,12 @@ void Empty::MergeFrom(const Empty& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Empty) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; } -void Empty::CopyFrom(const ::google::protobuf::Message& from) { +void Empty::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Empty) if (&from == this) return; Clear(); @@ -317,22 +315,19 @@ void Empty::InternalSwap(Empty* other) { _internal_metadata_.Swap(&other->_internal_metadata_); } -::google::protobuf::Metadata Empty::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fempty_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Empty::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fempty_2eproto); return ::file_level_metadata_google_2fprotobuf_2fempty_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::Empty* Arena::CreateMaybeMessage< ::google::protobuf::Empty >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::Empty >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Empty* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Empty >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Empty >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/empty.pb.h b/src/google/protobuf/empty.pb.h index 5fc3e50ea5..c2813c8c76 100644 --- a/src/google/protobuf/empty.pb.h +++ b/src/google/protobuf/empty.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/empty.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fempty_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fempty_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fempty_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fempty_2eproto #include #include @@ -31,61 +31,56 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fempty_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fempty_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2fempty_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class Empty; class EmptyDefaultTypeInternal; PROTOBUF_EXPORT extern EmptyDefaultTypeInternal _Empty_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::Empty* Arena::CreateMaybeMessage<::google::protobuf::Empty>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Empty* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN // =================================================================== class PROTOBUF_EXPORT Empty final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ { public: Empty(); virtual ~Empty(); Empty(const Empty& from); - - inline Empty& operator=(const Empty& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Empty(Empty&& from) noexcept : Empty() { *this = ::std::move(from); } + inline Empty& operator=(const Empty& from) { + CopyFrom(from); + return *this; + } inline Empty& operator=(Empty&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -94,14 +89,14 @@ class PROTOBUF_EXPORT Empty final : } return *this; } - #endif - inline ::google::protobuf::Arena* GetArena() const final { + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Empty& default_instance(); @@ -126,11 +121,11 @@ class PROTOBUF_EXPORT Empty final : return CreateMaybeMessage(nullptr); } - Empty* New(::google::protobuf::Arena* arena) const final { + Empty* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Empty& from); void MergeFrom(const Empty& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -138,15 +133,15 @@ class PROTOBUF_EXPORT Empty final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -154,17 +149,17 @@ class PROTOBUF_EXPORT Empty final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Empty* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Empty"; } protected: - explicit Empty(::google::protobuf::Arena* arena); + explicit Empty(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -172,7 +167,7 @@ class PROTOBUF_EXPORT Empty final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -182,11 +177,11 @@ class PROTOBUF_EXPORT Empty final : private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fempty_2eproto; }; // =================================================================== @@ -206,10 +201,9 @@ class PROTOBUF_EXPORT Empty final : // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fempty_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fempty_2eproto diff --git a/src/google/protobuf/extension_set.cc b/src/google/protobuf/extension_set.cc index 61b5598e30..795df3ddd6 100644 --- a/src/google/protobuf/extension_set.cc +++ b/src/google/protobuf/extension_set.cc @@ -45,7 +45,6 @@ #include #include #include -#include #include #include @@ -423,7 +422,7 @@ void* ExtensionSet::MutableRawRepeatedField(int number, FieldType field_type, break; case WireFormatLite::CPPTYPE_STRING: extension->repeated_string_value = - Arena::CreateMessage >(arena_); + Arena::CreateMessage>(arena_); break; case WireFormatLite::CPPTYPE_MESSAGE: extension->repeated_message_value = @@ -511,8 +510,8 @@ void ExtensionSet::AddEnum(int number, FieldType type, // ------------------------------------------------------------------- // Strings -const string& ExtensionSet::GetString(int number, - const string& default_value) const { +const std::string& ExtensionSet::GetString( + int number, const std::string& default_value) const { const Extension* extension = FindOrNull(number); if (extension == NULL || extension->is_cleared) { // Not present. Return the default value. @@ -523,14 +522,14 @@ const string& ExtensionSet::GetString(int number, } } -string* ExtensionSet::MutableString(int number, FieldType type, - const FieldDescriptor* descriptor) { +std::string* ExtensionSet::MutableString(int number, FieldType type, + const FieldDescriptor* descriptor) { Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; GOOGLE_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_STRING); extension->is_repeated = false; - extension->string_value = Arena::Create(arena_); + extension->string_value = Arena::Create(arena_); } else { GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, STRING); } @@ -538,22 +537,23 @@ string* ExtensionSet::MutableString(int number, FieldType type, return extension->string_value; } -const string& ExtensionSet::GetRepeatedString(int number, int index) const { +const std::string& ExtensionSet::GetRepeatedString(int number, + int index) const { const Extension* extension = FindOrNull(number); GOOGLE_CHECK(extension != NULL) << "Index out-of-bounds (field is empty)."; GOOGLE_DCHECK_TYPE(*extension, REPEATED, STRING); return extension->repeated_string_value->Get(index); } -string* ExtensionSet::MutableRepeatedString(int number, int index) { +std::string* ExtensionSet::MutableRepeatedString(int number, int index) { Extension* extension = FindOrNull(number); GOOGLE_CHECK(extension != NULL) << "Index out-of-bounds (field is empty)."; GOOGLE_DCHECK_TYPE(*extension, REPEATED, STRING); return extension->repeated_string_value->Mutable(index); } -string* ExtensionSet::AddString(int number, FieldType type, - const FieldDescriptor* descriptor) { +std::string* ExtensionSet::AddString(int number, FieldType type, + const FieldDescriptor* descriptor) { Extension* extension; if (MaybeNewExtension(number, descriptor, &extension)) { extension->type = type; @@ -561,7 +561,7 @@ string* ExtensionSet::AddString(int number, FieldType type, extension->is_repeated = true; extension->is_packed = false; extension->repeated_string_value = - Arena::CreateMessage >(arena_); + Arena::CreateMessage>(arena_); } else { GOOGLE_DCHECK_TYPE(*extension, REPEATED, STRING); } @@ -962,7 +962,7 @@ void ExtensionSet::InternalExtensionMergeFrom( HANDLE_TYPE( DOUBLE, double, RepeatedField < double>); HANDLE_TYPE( BOOL, bool, RepeatedField < bool>); HANDLE_TYPE( ENUM, enum, RepeatedField < int>); - HANDLE_TYPE( STRING, string, RepeatedPtrField< string>); + HANDLE_TYPE(STRING, string, RepeatedPtrField); #undef HANDLE_TYPE case WireFormatLite::CPPTYPE_MESSAGE: @@ -1343,19 +1343,23 @@ bool ExtensionSet::ParseFieldWithExtensionInfo( } case WireFormatLite::TYPE_STRING: { - string* value = extension.is_repeated ? - AddString(number, WireFormatLite::TYPE_STRING, extension.descriptor) : - MutableString(number, WireFormatLite::TYPE_STRING, - extension.descriptor); + std::string* value = + extension.is_repeated + ? AddString(number, WireFormatLite::TYPE_STRING, + extension.descriptor) + : MutableString(number, WireFormatLite::TYPE_STRING, + extension.descriptor); if (!WireFormatLite::ReadString(input, value)) return false; break; } case WireFormatLite::TYPE_BYTES: { - string* value = extension.is_repeated ? - AddString(number, WireFormatLite::TYPE_BYTES, extension.descriptor) : - MutableString(number, WireFormatLite::TYPE_BYTES, - extension.descriptor); + std::string* value = + extension.is_repeated + ? AddString(number, WireFormatLite::TYPE_BYTES, + extension.descriptor) + : MutableString(number, WireFormatLite::TYPE_BYTES, + extension.descriptor); if (!WireFormatLite::ReadBytes(input, value)) return false; break; } @@ -1453,7 +1457,7 @@ bool ExtensionSet::ParseMessageSetItemLite(io::CodedInputStream* input, bool ExtensionSet::ParseMessageSet(io::CodedInputStream* input, const MessageLite* containing_type, - string* unknown_fields) { + std::string* unknown_fields) { io::StringOutputStream zcis(unknown_fields); io::CodedOutputStream output(&zcis); CodedOutputStreamFieldSkipper skipper(&output); diff --git a/src/google/protobuf/extension_set.h b/src/google/protobuf/extension_set.h index f29a0b5cc1..a3696624f4 100644 --- a/src/google/protobuf/extension_set.h +++ b/src/google/protobuf/extension_set.h @@ -253,7 +253,8 @@ class PROTOBUF_EXPORT ExtensionSet { double GetDouble(int number, double default_value) const; bool GetBool(int number, bool default_value) const; int GetEnum(int number, int default_value) const; - const std::string& GetString(int number, const std::string& default_value) const; + const std::string& GetString(int number, + const std::string& default_value) const; const MessageLite& GetMessage(int number, const MessageLite& default_value) const; const MessageLite& GetMessage(int number, const Descriptor* message_type, @@ -1066,15 +1067,15 @@ class PROTOBUF_EXPORT StringTypeTraits { typedef StringTypeTraits Singular; static inline const std::string& Get(int number, const ExtensionSet& set, - ConstType default_value) { + ConstType default_value) { return set.GetString(number, default_value); } - static inline void Set(int number, FieldType field_type, const std::string& value, - ExtensionSet* set) { + static inline void Set(int number, FieldType field_type, + const std::string& value, ExtensionSet* set) { set->SetString(number, field_type, value, NULL); } static inline std::string* Mutable(int number, FieldType field_type, - ExtensionSet* set) { + ExtensionSet* set) { return set->MutableString(number, field_type, NULL); } template @@ -1093,7 +1094,7 @@ class PROTOBUF_EXPORT RepeatedStringTypeTraits { typedef RepeatedPtrField RepeatedFieldType; static inline const std::string& Get(int number, const ExtensionSet& set, - int index) { + int index) { return set.GetRepeatedString(number, index); } static inline void Set(int number, int index, const std::string& value, @@ -1108,7 +1109,7 @@ class PROTOBUF_EXPORT RepeatedStringTypeTraits { set->AddString(number, field_type, value, NULL); } static inline std::string* Add(int number, FieldType field_type, - ExtensionSet* set) { + ExtensionSet* set) { return set->AddString(number, field_type, NULL); } static inline const RepeatedPtrField& GetRepeated( @@ -1117,10 +1118,8 @@ class PROTOBUF_EXPORT RepeatedStringTypeTraits { set.GetRawRepeatedField(number, GetDefaultRepeatedField())); } - static inline RepeatedPtrField* MutableRepeated(int number, - FieldType field_type, - bool is_packed, - ExtensionSet* set) { + static inline RepeatedPtrField* MutableRepeated( + int number, FieldType field_type, bool is_packed, ExtensionSet* set) { return reinterpret_cast*>( set->MutableRawRepeatedField(number, field_type, is_packed, NULL)); } @@ -1558,6 +1557,38 @@ class ExtensionIdentifier { } } // namespace internal + +// Call this function to ensure that this extensions's reflection is linked into +// the binary: +// +// google::protobuf::LinkExtensionReflection(Foo::my_extension); +// +// This will ensure that the following lookup will succeed: +// +// DescriptorPool::generated_pool()->FindExtensionByName("Foo.my_extension"); +// +// This is often relevant for parsing extensions in text mode. +// +// As a side-effect, it will also guarantee that anything else from the same +// .proto file will also be available for lookup in the generated pool. +// +// This function does not actually register the extension, so it does not need +// to be called before the lookup. However it does need to occur in a function +// that cannot be stripped from the binary (ie. it must be reachable from main). +// +// Best practice is to call this function as close as possible to where the +// reflection is actually needed. This function is very cheap to call, so you +// should not need to worry about its runtime overhead except in tight loops (on +// x86-64 it compiles into two "mov" instructions). +template +void LinkExtensionReflection( + const google::protobuf::internal::ExtensionIdentifier< + ExtendeeType, TypeTraitsType, field_type, is_packed>& extension) { + const void* volatile unused = &extension; + (void)&unused; // Use address to avoid an extra load of volatile variable. +} + } // namespace protobuf } // namespace google diff --git a/src/google/protobuf/extension_set_heavy.cc b/src/google/protobuf/extension_set_heavy.cc index 53aec2b641..f48207be7c 100644 --- a/src/google/protobuf/extension_set_heavy.cc +++ b/src/google/protobuf/extension_set_heavy.cc @@ -49,7 +49,6 @@ #include #include #include -#include #include diff --git a/src/google/protobuf/extension_set_inl.h b/src/google/protobuf/extension_set_inl.h index b73913a1c9..4bfcf3edb6 100644 --- a/src/google/protobuf/extension_set_inl.h +++ b/src/google/protobuf/extension_set_inl.h @@ -163,11 +163,12 @@ const char* ExtensionSet::ParseFieldWithExtensionInfo( case WireFormatLite::TYPE_BYTES: case WireFormatLite::TYPE_STRING: { - std::string* value = extension.is_repeated - ? AddString(number, WireFormatLite::TYPE_STRING, - extension.descriptor) - : MutableString(number, WireFormatLite::TYPE_STRING, - extension.descriptor); + std::string* value = + extension.is_repeated + ? AddString(number, WireFormatLite::TYPE_STRING, + extension.descriptor) + : MutableString(number, WireFormatLite::TYPE_STRING, + extension.descriptor); int size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); return ctx->ReadString(ptr, size, value); @@ -210,12 +211,12 @@ const char* ExtensionSet::ParseMessageSetItemTmpl(const char* ptr, std::string payload; uint32 type_id = 0; while (!ctx->Done(&ptr)) { - uint32 tag; - ptr = ReadTag(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + uint32 tag = static_cast(*ptr++); if (tag == WireFormatLite::kMessageSetTypeIdTag) { - ptr = _Parse32(ptr, &type_id); + uint64 tmp; + ptr = ParseVarint64Inline(ptr, &tmp); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + type_id = tmp; if (!payload.empty()) { ExtensionInfo extension; bool was_packed_on_wire; @@ -255,6 +256,13 @@ const char* ExtensionSet::ParseMessageSetItemTmpl(const char* ptr, GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); } } else { + if (tag >= 128) { + // Parse remainder of tag varint + uint32 tmp; + ptr = VarintParse<4>(ptr, &tmp); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + tag += (tmp - 1) << 7; + } if (tag == 0 || (tag & 7) == 4) { ctx->SetLastTag(tag); return ptr; diff --git a/src/google/protobuf/extension_set_unittest.cc b/src/google/protobuf/extension_set_unittest.cc index 41278ef035..e33d14d8cc 100644 --- a/src/google/protobuf/extension_set_unittest.cc +++ b/src/google/protobuf/extension_set_unittest.cc @@ -528,7 +528,7 @@ TEST(ExtensionSetTest, SerializationToArray) { unittest::TestAllTypes destination; TestUtil::SetAllExtensions(&source); int size = source.ByteSize(); - string data; + std::string data; data.resize(size); uint8* target = reinterpret_cast(::google::protobuf::string_as_array(&data)); uint8* end = source.SerializeWithCachedSizesToArray(target); @@ -549,7 +549,7 @@ TEST(ExtensionSetTest, SerializationToStream) { unittest::TestAllTypes destination; TestUtil::SetAllExtensions(&source); int size = source.ByteSize(); - string data; + std::string data; data.resize(size); { io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&data), size, 1); @@ -572,7 +572,7 @@ TEST(ExtensionSetTest, PackedSerializationToArray) { unittest::TestPackedTypes destination; TestUtil::SetPackedExtensions(&source); int size = source.ByteSize(); - string data; + std::string data; data.resize(size); uint8* target = reinterpret_cast(::google::protobuf::string_as_array(&data)); uint8* end = source.SerializeWithCachedSizesToArray(target); @@ -593,7 +593,7 @@ TEST(ExtensionSetTest, PackedSerializationToStream) { unittest::TestPackedTypes destination; TestUtil::SetPackedExtensions(&source); int size = source.ByteSize(); - string data; + std::string data; data.resize(size); { io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&data), size, 1); @@ -609,7 +609,7 @@ TEST(ExtensionSetTest, NestedExtensionGroup) { // Serialize as TestGroup and parse as TestGroupExtension. unittest::TestGroup source; unittest::TestGroupExtension destination; - string data; + std::string data; source.mutable_optionalgroup()->set_a(117); source.set_optional_foreign_enum(unittest::FOREIGN_BAZ); @@ -629,7 +629,7 @@ TEST(ExtensionSetTest, Parsing) { // Serialize as TestAllTypes and parse as TestAllExtensions. unittest::TestAllTypes source; unittest::TestAllExtensions destination; - string data; + std::string data; TestUtil::SetAllFields(&source); source.SerializeToString(&data); @@ -642,7 +642,7 @@ TEST(ExtensionSetTest, PackedParsing) { // Serialize as TestPackedTypes and parse as TestPackedExtensions. unittest::TestPackedTypes source; unittest::TestPackedExtensions destination; - string data; + std::string data; TestUtil::SetPackedFields(&source); source.SerializeToString(&data); @@ -653,7 +653,7 @@ TEST(ExtensionSetTest, PackedParsing) { TEST(ExtensionSetTest, PackedToUnpackedParsing) { unittest::TestPackedTypes source; unittest::TestUnpackedExtensions destination; - string data; + std::string data; TestUtil::SetPackedFields(&source); source.SerializeToString(&data); @@ -677,7 +677,7 @@ TEST(ExtensionSetTest, PackedToUnpackedParsing) { TEST(ExtensionSetTest, UnpackedToPackedParsing) { unittest::TestUnpackedTypes source; unittest::TestPackedExtensions destination; - string data; + std::string data; TestUtil::SetUnpackedFields(&source); source.SerializeToString(&data); @@ -781,8 +781,9 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) { // that gets included as well. unittest::TestAllExtensions message; const int base_size = message.SpaceUsed(); - const string s("this is a fairly large string that will cause some " - "allocation in order to store it in the extension"); + const std::string s( + "this is a fairly large string that will cause some " + "allocation in order to store it in the extension"); message.SetExtension(unittest::optional_string_extension, s); int min_expected_size = base_size + s.length(); EXPECT_LE(min_expected_size, message.SpaceUsed()); @@ -855,8 +856,8 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) { { unittest::TestAllExtensions message; const int base_size = message.SpaceUsed(); - int min_expected_size = sizeof(RepeatedPtrField) + base_size; - const string value(256, 'x'); + int min_expected_size = sizeof(RepeatedPtrField) + base_size; + const std::string value(256, 'x'); // Once items are allocated, they may stick around even when cleared so // without the hardcore memory management accessors there isn't a notion of // the empty repeated field memory usage as there is with primitive types. @@ -945,9 +946,9 @@ TEST(ExtensionSetTest, RepeatedFields) { message.AddExtension(unittest::repeated_bool_extension, true); message.AddExtension(unittest::repeated_nested_enum_extension, nested_enum); message.AddExtension(unittest::repeated_string_extension, - ::std::string("test")); + std::string("test")); message.AddExtension(unittest::repeated_bytes_extension, - ::std::string("test\xFF")); + std::string("test\xFF")); message.AddExtension( unittest::repeated_nested_message_extension)->CopyFrom(nested_message); message.AddExtension(unittest::repeated_nested_enum_extension, @@ -1028,8 +1029,8 @@ TEST(ExtensionSetTest, RepeatedFields) { ASSERT_EQ(110, SumAllExtensions( message, unittest::repeated_double_extension, 0)); - RepeatedPtrField<::std::string>::iterator string_iter; - RepeatedPtrField<::std::string>::iterator string_end; + RepeatedPtrField::iterator string_iter; + RepeatedPtrField::iterator string_end; for (string_iter = message.MutableRepeatedExtension( unittest::repeated_string_extension)->begin(), string_end = message.MutableRepeatedExtension( @@ -1037,8 +1038,8 @@ TEST(ExtensionSetTest, RepeatedFields) { string_iter != string_end; ++string_iter) { *string_iter += "test"; } - RepeatedPtrField<::std::string>::const_iterator string_const_iter; - RepeatedPtrField<::std::string>::const_iterator string_const_end; + RepeatedPtrField::const_iterator string_const_iter; + RepeatedPtrField::const_iterator string_const_end; for (string_const_iter = message.GetRepeatedExtension( unittest::repeated_string_extension).begin(), string_const_end = message.GetRepeatedExtension( @@ -1182,9 +1183,9 @@ TEST(ExtensionSetTest, DynamicExtensions) { // If the field refers to one of the types nested in TestDynamicExtensions, // make it refer to the type in our dynamic proto instead. - string prefix = "." + template_descriptor->full_name() + "."; + std::string prefix = "." + template_descriptor->full_name() + "."; if (extension->has_type_name()) { - string* type_name = extension->mutable_type_name(); + std::string* type_name = extension->mutable_type_name(); if (HasPrefixString(*type_name, prefix)) { type_name->replace(0, prefix.size(), ".dynamic_extensions."); } @@ -1201,7 +1202,7 @@ TEST(ExtensionSetTest, DynamicExtensions) { // Construct a message that we can parse with the extensions we defined. // Since the extensions were based off of the fields of TestDynamicExtensions, // we can use that message to create this test message. - string data; + std::string data; unittest::TestDynamicExtensions dynamic_extension; { unittest::TestDynamicExtensions message; diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 0607b91674..221f81f1ab 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,53 +16,51 @@ // @@protoc_insertion_point(includes) #include -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class FieldMaskDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _FieldMask_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsFieldMask_google_2fprotobuf_2ffield_5fmask_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_FieldMask_default_instance_; - new (ptr) ::google::protobuf::FieldMask(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::FieldMask(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::FieldMask::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::FieldMask::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFieldMask_google_2fprotobuf_2ffield_5fmask_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsFieldMask_google_2fprotobuf_2ffield_5fmask_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2ffield_5fmask_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldMask, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::FieldMask, paths_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, paths_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::protobuf::FieldMask)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::FieldMask)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_FieldMask_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto = { {}, AddDescriptors_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets, file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto, file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto, @@ -76,23 +74,22 @@ const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] "ield_mask;field_mask\370\001\001\242\002\003GPB\252\002\036Google.P" "rotobuf.WellKnownTypesb\006proto3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = { false, InitDefaults_google_2fprotobuf_2ffield_5fmask_2eproto, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", &assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto, 230, }; void AddDescriptors_google_2fprotobuf_2ffield_5fmask_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto = []() { AddDescriptors_google_2fprotobuf_2ffield_5fmask_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN // =================================================================== @@ -107,12 +104,12 @@ const int FieldMask::kPathsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 FieldMask::FieldMask() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.FieldMask) } -FieldMask::FieldMask(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), paths_(arena) { SharedCtor(); @@ -120,7 +117,7 @@ FieldMask::FieldMask(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask) } FieldMask::FieldMask(const FieldMask& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), paths_(from.paths_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -128,7 +125,7 @@ FieldMask::FieldMask(const FieldMask& from) } void FieldMask::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base); } @@ -145,20 +142,20 @@ void FieldMask::ArenaDtor(void* object) { FieldMask* _this = reinterpret_cast< FieldMask* >(object); (void)_this; } -void FieldMask::RegisterArenaDtor(::google::protobuf::Arena*) { +void FieldMask::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void FieldMask::SetCachedSize(int size) const { _cached_size_.Set(size); } const FieldMask& FieldMask::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base); return *internal_default_instance(); } void FieldMask::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -167,20 +164,21 @@ void FieldMask::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* FieldMask::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* FieldMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated string paths = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; do { - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(add_paths(), ptr, ctx, "google.protobuf.FieldMask.paths"); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_paths(), ptr, ctx, "google.protobuf.FieldMask.paths"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } default: { @@ -200,24 +198,24 @@ const char* FieldMask::_InternalParse(const char* ptr, ::google::protobuf::inter } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool FieldMask::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.FieldMask) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated string paths = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->add_paths())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->paths(this->paths_size() - 1).data(), static_cast(this->paths(this->paths_size() - 1).length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.FieldMask.paths")); } else { goto handle_unusual; @@ -230,7 +228,7 @@ bool FieldMask::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -247,46 +245,46 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void FieldMask::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string paths = 1; for (int i = 0, n = this->paths_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->paths(i).data(), static_cast(this->paths(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); - ::google::protobuf::internal::WireFormatLite::WriteString( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( 1, this->paths(i), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.FieldMask) } -::google::protobuf::uint8* FieldMask::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* FieldMask::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated string paths = 1; for (int i = 0, n = this->paths_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->paths(i).data(), static_cast(this->paths(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: WriteStringToArray(1, this->paths(i), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask) @@ -299,35 +297,35 @@ size_t FieldMask::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string paths = 1; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->paths_size()); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->paths_size()); for (int i = 0, n = this->paths_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->paths(i)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void FieldMask::MergeFrom(const ::google::protobuf::Message& from) { +void FieldMask::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldMask) GOOGLE_DCHECK_NE(&from, this); const FieldMask* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldMask) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldMask) MergeFrom(*source); @@ -338,13 +336,13 @@ void FieldMask::MergeFrom(const FieldMask& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; paths_.MergeFrom(from.paths_); } -void FieldMask::CopyFrom(const ::google::protobuf::Message& from) { +void FieldMask::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldMask) if (&from == this) return; Clear(); @@ -387,22 +385,19 @@ void FieldMask::InternalSwap(FieldMask* other) { paths_.InternalSwap(CastToBase(&other->paths_)); } -::google::protobuf::Metadata FieldMask::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ffield_5fmask_2eproto); return ::file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::FieldMask* Arena::CreateMaybeMessage< ::google::protobuf::FieldMask >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::FieldMask >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FieldMask >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/field_mask.pb.h b/src/google/protobuf/field_mask.pb.h index 4e3b27bdcf..3e4ec510ce 100644 --- a/src/google/protobuf/field_mask.pb.h +++ b/src/google/protobuf/field_mask.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/field_mask.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2ffield_5fmask_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2ffield_5fmask_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ffield_5fmask_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ffield_5fmask_2eproto #include #include @@ -31,61 +31,56 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ffield_5fmask_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2ffield_5fmask_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class FieldMask; class FieldMaskDefaultTypeInternal; PROTOBUF_EXPORT extern FieldMaskDefaultTypeInternal _FieldMask_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::FieldMask* Arena::CreateMaybeMessage<::google::protobuf::FieldMask>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN // =================================================================== class PROTOBUF_EXPORT FieldMask final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldMask) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldMask) */ { public: FieldMask(); virtual ~FieldMask(); FieldMask(const FieldMask& from); - - inline FieldMask& operator=(const FieldMask& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 FieldMask(FieldMask&& from) noexcept : FieldMask() { *this = ::std::move(from); } + inline FieldMask& operator=(const FieldMask& from) { + CopyFrom(from); + return *this; + } inline FieldMask& operator=(FieldMask&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -94,14 +89,14 @@ class PROTOBUF_EXPORT FieldMask final : } return *this; } - #endif - inline ::google::protobuf::Arena* GetArena() const final { + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const FieldMask& default_instance(); @@ -126,11 +121,11 @@ class PROTOBUF_EXPORT FieldMask final : return CreateMaybeMessage(nullptr); } - FieldMask* New(::google::protobuf::Arena* arena) const final { + FieldMask* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const FieldMask& from); void MergeFrom(const FieldMask& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -138,15 +133,15 @@ class PROTOBUF_EXPORT FieldMask final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -154,17 +149,17 @@ class PROTOBUF_EXPORT FieldMask final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(FieldMask* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.FieldMask"; } protected: - explicit FieldMask(::google::protobuf::Arena* arena); + explicit FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -172,7 +167,7 @@ class PROTOBUF_EXPORT FieldMask final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -182,34 +177,30 @@ class PROTOBUF_EXPORT FieldMask final : int paths_size() const; void clear_paths(); static const int kPathsFieldNumber = 1; - const ::std::string& paths(int index) const; - ::std::string* mutable_paths(int index); - void set_paths(int index, const ::std::string& value); - #if LANG_CXX11 - void set_paths(int index, ::std::string&& value); - #endif + const std::string& paths(int index) const; + std::string* mutable_paths(int index); + void set_paths(int index, const std::string& value); + void set_paths(int index, std::string&& value); void set_paths(int index, const char* value); void set_paths(int index, const char* value, size_t size); - ::std::string* add_paths(); - void add_paths(const ::std::string& value); - #if LANG_CXX11 - void add_paths(::std::string&& value); - #endif + std::string* add_paths(); + void add_paths(const std::string& value); + void add_paths(std::string&& value); void add_paths(const char* value); void add_paths(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& paths() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_paths(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& paths() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_paths(); // @@protoc_insertion_point(class_scope:google.protobuf.FieldMask) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField<::std::string> paths_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField paths_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto; }; // =================================================================== @@ -230,24 +221,22 @@ inline int FieldMask::paths_size() const { inline void FieldMask::clear_paths() { paths_.Clear(); } -inline const ::std::string& FieldMask::paths(int index) const { +inline const std::string& FieldMask::paths(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths) return paths_.Get(index); } -inline ::std::string* FieldMask::mutable_paths(int index) { +inline std::string* FieldMask::mutable_paths(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths) return paths_.Mutable(index); } -inline void FieldMask::set_paths(int index, const ::std::string& value) { +inline void FieldMask::set_paths(int index, const std::string& value) { // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) paths_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void FieldMask::set_paths(int index, ::std::string&& value) { +inline void FieldMask::set_paths(int index, std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) paths_.Mutable(index)->assign(std::move(value)); } -#endif inline void FieldMask::set_paths(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); paths_.Mutable(index)->assign(value); @@ -258,20 +247,18 @@ inline void FieldMask::set_paths(int index, const char* value, size_t size) { reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths) } -inline ::std::string* FieldMask::add_paths() { +inline std::string* FieldMask::add_paths() { // @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths) return paths_.Add(); } -inline void FieldMask::add_paths(const ::std::string& value) { +inline void FieldMask::add_paths(const std::string& value) { paths_.Add()->assign(value); // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) } -#if LANG_CXX11 -inline void FieldMask::add_paths(::std::string&& value) { +inline void FieldMask::add_paths(std::string&& value) { paths_.Add(std::move(value)); // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) } -#endif inline void FieldMask::add_paths(const char* value) { GOOGLE_DCHECK(value != nullptr); paths_.Add()->assign(value); @@ -281,12 +268,12 @@ inline void FieldMask::add_paths(const char* value, size_t size) { paths_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& FieldMask::paths() const { // @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths) return paths_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* FieldMask::mutable_paths() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths) return &paths_; @@ -298,10 +285,9 @@ FieldMask::mutable_paths() { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2ffield_5fmask_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ffield_5fmask_2eproto diff --git a/src/google/protobuf/generated_enum_reflection.h b/src/google/protobuf/generated_enum_reflection.h index 774528ee5c..c683368a2e 100644 --- a/src/google/protobuf/generated_enum_reflection.h +++ b/src/google/protobuf/generated_enum_reflection.h @@ -67,15 +67,14 @@ const EnumDescriptor* GetEnumDescriptor(); namespace internal { -// Helper for EnumType_Parse functions: try to parse the string 'name' as an -// enum name of the given type, returning true and filling in value on success, -// or returning false and leaving value unchanged on failure. +// Helper for EnumType_Parse functions: try to parse the string 'name' as +// an enum name of the given type, returning true and filling in value on +// success, or returning false and leaving value unchanged on failure. PROTOBUF_EXPORT bool ParseNamedEnum(const EnumDescriptor* descriptor, const std::string& name, int* value); -template -bool ParseNamedEnum(const EnumDescriptor* descriptor, - const std::string& name, +template +bool ParseNamedEnum(const EnumDescriptor* descriptor, const std::string& name, EnumType* value) { int tmp; if (!ParseNamedEnum(descriptor, name, &tmp)) return false; @@ -87,7 +86,7 @@ bool ParseNamedEnum(const EnumDescriptor* descriptor, // function is not to be inlined, so that you can do this without including // descriptor.h. PROTOBUF_EXPORT const std::string& NameOfEnum(const EnumDescriptor* descriptor, - int value); + int value); } // namespace internal } // namespace protobuf diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc index e77026c782..c0652c3243 100644 --- a/src/google/protobuf/generated_message_reflection.cc +++ b/src/google/protobuf/generated_message_reflection.cc @@ -62,8 +62,7 @@ bool IsMapFieldInApi(const FieldDescriptor* field) { } } // anonymous namespace -bool ParseNamedEnum(const EnumDescriptor* descriptor, - const string& name, +bool ParseNamedEnum(const EnumDescriptor* descriptor, const std::string& name, int* value) { const EnumValueDescriptor* d = descriptor->FindValueByName(name); if (d == NULL) return false; @@ -71,7 +70,7 @@ bool ParseNamedEnum(const EnumDescriptor* descriptor, return true; } -const string& NameOfEnum(const EnumDescriptor* descriptor, int value) { +const std::string& NameOfEnum(const EnumDescriptor* descriptor, int value) { const EnumValueDescriptor* d = descriptor->FindValueByNumber(value); return (d == NULL ? GetEmptyString() : d->name()); } @@ -245,8 +244,9 @@ size_t GeneratedMessageReflection::SpaceUsedLong(const Message& message) const { switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - total_size += GetRaw >(message, field) - .SpaceUsedExcludingSelfLong(); + total_size += + GetRaw >(message, field) + .SpaceUsedExcludingSelfLong(); break; } break; @@ -286,18 +286,18 @@ size_t GeneratedMessageReflection::SpaceUsedLong(const Message& message) const { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: { if (IsInlined(field)) { - const string* ptr = + const std::string* ptr = &GetField(message, field).GetNoArena(); total_size += StringSpaceUsedExcludingSelfLong(*ptr); break; } - // Initially, the string points to the default value stored in - // the prototype. Only count the string if it has been changed - // from the default value. - const string* default_ptr = + // Initially, the string points to the default value stored + // in the prototype. Only count the string if it has been + // changed from the default value. + const std::string* default_ptr = &DefaultRaw(field).Get(); - const string* ptr = + const std::string* ptr = &GetField(message, field).Get(); if (ptr != default_ptr) { @@ -355,8 +355,8 @@ void GeneratedMessageReflection::SwapField( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - MutableRaw(message1, field)-> - Swap >( + MutableRaw(message1, field) + ->Swap >( MutableRaw(message2, field)); break; } @@ -437,12 +437,12 @@ void GeneratedMessageReflection::SwapField( MutableRaw(message1, field); ArenaStringPtr* string2 = MutableRaw(message2, field); - const string* default_ptr = + const std::string* default_ptr = &DefaultRaw(field).Get(); if (arena1 == arena2) { string1->Swap(string2, default_ptr, arena1); } else { - const string temp = string1->Get(); + const std::string temp = string1->Get(); string1->Set(default_ptr, string2->Get(), arena1); string2->Set(default_ptr, temp, arena2); } @@ -473,7 +473,7 @@ void GeneratedMessageReflection::SwapOneofField( bool temp_bool; int temp_int; Message* temp_message = NULL; - string temp_string; + std::string temp_string; // Stores message1's oneof field to a temp variable. const FieldDescriptor* field1 = NULL; @@ -807,14 +807,14 @@ void GeneratedMessageReflection::ClearField( default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: { if (IsInlined(field)) { - const string* default_ptr = + const std::string* default_ptr = &DefaultRaw(field).GetNoArena(); MutableRaw(message, field)->SetNoArena( default_ptr, *default_ptr); break; } - const string* default_ptr = + const std::string* default_ptr = &DefaultRaw(field).Get(); MutableRaw(message, field)->SetAllocated( default_ptr, NULL, GetArena(message)); @@ -859,7 +859,7 @@ void GeneratedMessageReflection::ClearField( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - MutableRaw >(message, field)->Clear(); + MutableRaw >(message, field)->Clear(); break; } break; @@ -909,7 +909,8 @@ void GeneratedMessageReflection::RemoveLast( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - MutableRaw >(message, field)->RemoveLast(); + MutableRaw >(message, field) + ->RemoveLast(); break; } break; @@ -1134,7 +1135,7 @@ DEFINE_PRIMITIVE_ACCESSORS(Bool , bool , bool , BOOL ) // ------------------------------------------------------------------- -string GeneratedMessageReflection::GetString( +std::string GeneratedMessageReflection::GetString( const Message& message, const FieldDescriptor* field) const { USAGE_CHECK_ALL(GetString, SINGULAR, STRING); if (field->is_extension()) { @@ -1154,9 +1155,9 @@ string GeneratedMessageReflection::GetString( } } -const string& GeneratedMessageReflection::GetStringReference( - const Message& message, - const FieldDescriptor* field, string* scratch) const { +const std::string& GeneratedMessageReflection::GetStringReference( + const Message& message, const FieldDescriptor* field, + std::string* scratch) const { USAGE_CHECK_ALL(GetStringReference, SINGULAR, STRING); if (field->is_extension()) { return GetExtensionSet(message).GetString(field->number(), @@ -1176,9 +1177,9 @@ const string& GeneratedMessageReflection::GetStringReference( } -void GeneratedMessageReflection::SetString( - Message* message, const FieldDescriptor* field, - const string& value) const { +void GeneratedMessageReflection::SetString(Message* message, + const FieldDescriptor* field, + const std::string& value) const { USAGE_CHECK_ALL(SetString, SINGULAR, STRING); if (field->is_extension()) { return MutableExtensionSet(message)->SetString(field->number(), @@ -1193,7 +1194,8 @@ void GeneratedMessageReflection::SetString( break; } - const string* default_ptr = &DefaultRaw(field).Get(); + const std::string* default_ptr = + &DefaultRaw(field).Get(); if (field->containing_oneof() && !HasOneofField(*message, field)) { ClearOneof(message, field->containing_oneof()); MutableField(message, field)->UnsafeSetDefault( @@ -1209,7 +1211,7 @@ void GeneratedMessageReflection::SetString( } -string GeneratedMessageReflection::GetRepeatedString( +std::string GeneratedMessageReflection::GetRepeatedString( const Message& message, const FieldDescriptor* field, int index) const { USAGE_CHECK_ALL(GetRepeatedString, REPEATED, STRING); if (field->is_extension()) { @@ -1218,14 +1220,14 @@ string GeneratedMessageReflection::GetRepeatedString( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - return GetRepeatedPtrField(message, field, index); + return GetRepeatedPtrField(message, field, index); } } } -const string& GeneratedMessageReflection::GetRepeatedStringReference( - const Message& message, const FieldDescriptor* field, - int index, string* scratch) const { +const std::string& GeneratedMessageReflection::GetRepeatedStringReference( + const Message& message, const FieldDescriptor* field, int index, + std::string* scratch) const { USAGE_CHECK_ALL(GetRepeatedStringReference, REPEATED, STRING); if (field->is_extension()) { return GetExtensionSet(message).GetRepeatedString(field->number(), index); @@ -1233,15 +1235,15 @@ const string& GeneratedMessageReflection::GetRepeatedStringReference( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - return GetRepeatedPtrField(message, field, index); + return GetRepeatedPtrField(message, field, index); } } } void GeneratedMessageReflection::SetRepeatedString( - Message* message, const FieldDescriptor* field, - int index, const string& value) const { + Message* message, const FieldDescriptor* field, int index, + const std::string& value) const { USAGE_CHECK_ALL(SetRepeatedString, REPEATED, STRING); if (field->is_extension()) { MutableExtensionSet(message)->SetRepeatedString( @@ -1250,16 +1252,16 @@ void GeneratedMessageReflection::SetRepeatedString( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - *MutableRepeatedField(message, field, index) = value; + *MutableRepeatedField(message, field, index) = value; break; } } } -void GeneratedMessageReflection::AddString( - Message* message, const FieldDescriptor* field, - const string& value) const { +void GeneratedMessageReflection::AddString(Message* message, + const FieldDescriptor* field, + const std::string& value) const { USAGE_CHECK_ALL(AddString, REPEATED, STRING); if (field->is_extension()) { MutableExtensionSet(message)->AddString(field->number(), @@ -1268,7 +1270,7 @@ void GeneratedMessageReflection::AddString( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: - *AddField(message, field) = value; + *AddField(message, field) = value; break; } } @@ -1825,7 +1827,7 @@ int GeneratedMessageReflection::MapSize( // ----------------------------------------------------------------------------- const FieldDescriptor* GeneratedMessageReflection::FindKnownExtensionByName( - const string& name) const { + const std::string& name) const { if (!schema_.HasExtensionSet()) return NULL; const FieldDescriptor* result = descriptor_pool_->FindExtensionByName(name); @@ -1984,7 +1986,7 @@ inline bool GeneratedMessageReflection::HasBit( // field must be a scalar. // Scalar primitive (numeric or string/bytes) fields are present if - // their value is non-zero (numeric) or non-empty (string/bytes). N.B.: + // their value is non-zero (numeric) or non-empty (string/bytes). N.B.: // we must use this definition here, rather than the "scalar fields // always present" in the proto3 docs, because MergeFrom() semantics // require presence as "present on wire", and reflection-based merge @@ -2103,7 +2105,7 @@ inline void GeneratedMessageReflection::ClearOneof( switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: { - const string* default_ptr = + const std::string* default_ptr = &DefaultRaw(field).Get(); MutableField(message, field)-> Destroy(default_ptr, GetArena(message)); diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h index d1544784c0..17a41bf256 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h @@ -72,13 +72,6 @@ class MapValueRef; } // namespace protobuf } // namespace google -namespace google { -namespace protobuf { -namespace flat { -class MetadataBuilder; -} // namespace flat -} // namespace protobuf -} // namespace google namespace google { namespace protobuf { @@ -287,8 +280,8 @@ struct MigrationSchema { // // It is required that the user represents fields of each type in a standard // way, so that GeneratedMessageReflection can cast the void* pointer to -// the appropriate type. For primitive fields and string fields, each field -// should be represented using the obvious C++ primitive type. Enums and +// the appropriate type. For primitive fields and string fields, each +// field should be represented using the obvious C++ primitive type. Enums and // Messages are different: // - Singular Message fields are stored as a pointer to a Message. These // should start out NULL, except for in the default instance where they @@ -362,10 +355,10 @@ class GeneratedMessageReflection final : public Reflection { bool GetBool(const Message& message, const FieldDescriptor* field) const override; std::string GetString(const Message& message, - const FieldDescriptor* field) const override; + const FieldDescriptor* field) const override; const std::string& GetStringReference(const Message& message, - const FieldDescriptor* field, - std::string* scratch) const override; + const FieldDescriptor* field, + std::string* scratch) const override; const EnumValueDescriptor* GetEnum( const Message& message, const FieldDescriptor* field) const override; int GetEnumValue(const Message& message, @@ -435,12 +428,12 @@ class GeneratedMessageReflection final : public Reflection { int index) const override; bool GetRepeatedBool(const Message& message, const FieldDescriptor* field, int index) const override; - std::string GetRepeatedString(const Message& message, const FieldDescriptor* field, - int index) const override; - const std::string& GetRepeatedStringReference(const Message& message, - const FieldDescriptor* field, - int index, - std::string* scratch) const override; + std::string GetRepeatedString(const Message& message, + const FieldDescriptor* field, + int index) const override; + const std::string& GetRepeatedStringReference( + const Message& message, const FieldDescriptor* field, int index, + std::string* scratch) const override; const EnumValueDescriptor* GetRepeatedEnum(const Message& message, const FieldDescriptor* field, int index) const override; @@ -538,7 +531,6 @@ class GeneratedMessageReflection final : public Reflection { const Descriptor* message_type) const override; private: - friend class google::protobuf::flat::MetadataBuilder; friend class ReflectionAccessor; friend class upb::google_opensource::GMR_Handlers; diff --git a/src/google/protobuf/generated_message_reflection_unittest.cc b/src/google/protobuf/generated_message_reflection_unittest.cc index c74e4f5ee5..82f5dc120f 100644 --- a/src/google/protobuf/generated_message_reflection_unittest.cc +++ b/src/google/protobuf/generated_message_reflection_unittest.cc @@ -61,7 +61,7 @@ namespace protobuf { namespace { // Shorthand to get a FieldDescriptor for a field of unittest::TestAllTypes. -const FieldDescriptor* F(const string& name) { +const FieldDescriptor* F(const std::string& name) { const FieldDescriptor* result = unittest::TestAllTypes::descriptor()->FindFieldByName(name); GOOGLE_CHECK(result != NULL); @@ -107,24 +107,26 @@ TEST(GeneratedMessageReflectionTest, Accessors) { } TEST(GeneratedMessageReflectionTest, GetStringReference) { - // Test that GetStringReference() returns the underlying string when it is - // a normal string field. + // Test that GetStringReference() returns the underlying string when it + // is a normal string field. unittest::TestAllTypes message; message.set_optional_string("foo"); message.add_repeated_string("foo"); const Reflection* reflection = message.GetReflection(); - string scratch; + std::string scratch; - EXPECT_EQ(&message.optional_string(), + EXPECT_EQ( + &message.optional_string(), &reflection->GetStringReference(message, F("optional_string"), &scratch)) - << "For simple string fields, GetStringReference() should return a " - "reference to the underlying string."; + << "For simple string fields, GetStringReference() should return a " + "reference to the underlying string."; EXPECT_EQ(&message.repeated_string(0), - &reflection->GetRepeatedStringReference(message, F("repeated_string"), - 0, &scratch)) - << "For simple string fields, GetRepeatedStringReference() should return " - "a reference to the underlying string."; + &reflection->GetRepeatedStringReference( + message, F("repeated_string"), 0, &scratch)) + << "For simple string fields, GetRepeatedStringReference() should " + "return " + "a reference to the underlying string."; } diff --git a/src/google/protobuf/generated_message_table_driven.cc b/src/google/protobuf/generated_message_table_driven.cc index b56f6b9f8e..dc2e69315e 100644 --- a/src/google/protobuf/generated_message_table_driven.cc +++ b/src/google/protobuf/generated_message_table_driven.cc @@ -39,7 +39,6 @@ #include #include #include -#include namespace google { namespace protobuf { diff --git a/src/google/protobuf/generated_message_table_driven.h b/src/google/protobuf/generated_message_table_driven.h index d06a260504..857545e747 100644 --- a/src/google/protobuf/generated_message_table_driven.h +++ b/src/google/protobuf/generated_message_table_driven.h @@ -36,7 +36,6 @@ #include #include #include -#include // We require C++11 and Clang to use constexpr for variables, as GCC 4.8 // requires constexpr to be consistent between declarations of variables diff --git a/src/google/protobuf/generated_message_table_driven_lite.cc b/src/google/protobuf/generated_message_table_driven_lite.cc index 892a1e6c1a..05d4f295c5 100644 --- a/src/google/protobuf/generated_message_table_driven_lite.cc +++ b/src/google/protobuf/generated_message_table_driven_lite.cc @@ -36,7 +36,6 @@ #include #include #include -#include namespace google { namespace protobuf { @@ -44,7 +43,7 @@ namespace internal { namespace { -string* MutableUnknownFields(MessageLite* msg, int64 arena_offset) { +std::string* MutableUnknownFields(MessageLite* msg, int64 arena_offset) { return Raw(msg, arena_offset) ->mutable_unknown_fields(); } diff --git a/src/google/protobuf/generated_message_table_driven_lite.h b/src/google/protobuf/generated_message_table_driven_lite.h index ea3d439b65..c8e24c4255 100644 --- a/src/google/protobuf/generated_message_table_driven_lite.h +++ b/src/google/protobuf/generated_message_table_driven_lite.h @@ -40,7 +40,6 @@ #include #include #include -#include #include @@ -253,7 +252,7 @@ static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg, break; } GOOGLE_DCHECK(s != nullptr); - ::std::string* value = s->MutableNoArena(NULL); + std::string* value = s->MutableNoArena(NULL); if (PROTOBUF_PREDICT_FALSE(!WireFormatLite::ReadString(input, value))) { return false; } @@ -265,8 +264,8 @@ static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg, case Cardinality_SINGULAR: { ArenaStringPtr* field = MutableField( msg, has_bits, has_bit_index, offset); - std::string* value = - field->Mutable(static_cast(default_ptr), arena); + std::string* value = field->Mutable( + static_cast(default_ptr), arena); if (PROTOBUF_PREDICT_FALSE( !WireFormatLite::ReadString(input, value))) { return false; @@ -283,8 +282,8 @@ static inline bool HandleString(io::CodedInputStream* input, MessageLite* msg, } break; case Cardinality_ONEOF: { ArenaStringPtr* field = Raw(msg, offset); - std::string* value = - field->Mutable(static_cast(default_ptr), arena); + std::string* value = field->Mutable( + static_cast(default_ptr), arena); if (PROTOBUF_PREDICT_FALSE( !WireFormatLite::ReadString(input, value))) { return false; @@ -320,7 +319,7 @@ inline bool HandleEnum(const ParseTable& table, io::CodedInputStream* input, AuxillaryParseTableField::EnumValidator validator = table.aux[field_number].enums.validator; - if (validator(value)) { + if (validator == nullptr || validator(value)) { switch (cardinality) { case Cardinality_SINGULAR: SetField(msg, presence, presence_index, offset, value); @@ -836,7 +835,7 @@ bool MergePartialFromCodedStreamInlined(MessageLite* msg, return false; } - if (validator(value)) { + if (validator == nullptr || validator(value)) { values->Add(value); } else { // TODO(ckennelly): Consider caching here. diff --git a/src/google/protobuf/generated_message_util.cc b/src/google/protobuf/generated_message_util.cc index 028c8ccdb3..fe91bcb070 100644 --- a/src/google/protobuf/generated_message_util.cc +++ b/src/google/protobuf/generated_message_util.cc @@ -50,7 +50,6 @@ #include #include #include -#include #include @@ -62,9 +61,11 @@ namespace internal { void DestroyMessage(const void* message) { static_cast(message)->~MessageLite(); } -void DestroyString(const void* s) { static_cast(s)->~string(); } +void DestroyString(const void* s) { + static_cast(s)->~string(); +} -ExplicitlyConstructed<::std::string> fixed_address_empty_string; +ExplicitlyConstructed fixed_address_empty_string; static bool InitProtobufDefaultsImpl() { @@ -78,7 +79,7 @@ void InitProtobufDefaults() { (void)is_inited; } -size_t StringSpaceUsedExcludingSelfLong(const string& str) { +size_t StringSpaceUsedExcludingSelfLong(const std::string& str) { const void* start = &str; const void* end = &str + 1; if (start <= str.data() && str.data() < end) { @@ -225,7 +226,7 @@ struct PrimitiveTypeHelper template <> struct PrimitiveTypeHelper { - typedef string Type; + typedef std::string Type; static void Serialize(const void* ptr, io::CodedOutputStream* output) { const Type& value = *static_cast(ptr); output->WriteVarint32(value.size()); @@ -423,7 +424,7 @@ struct SingularFieldHelper { template static void Serialize(const void* field, const FieldMetadata& md, O* output) { WriteTagTo(md.tag, output); - SerializeTo(&Get<::std::string>(field), output); + SerializeTo(&Get(field), output); } }; @@ -556,7 +557,7 @@ struct OneOfFieldHelper { template static void Serialize(const void* field, const FieldMetadata& md, O* output) { SingularFieldHelper::Serialize( - Get(field), md, output); + Get(field), md, output); } }; @@ -602,7 +603,7 @@ bool IsNull(const void* ptr) { template <> bool IsNull(const void* ptr) { - return static_cast(ptr)->empty(); + return static_cast(ptr)->empty(); } #define SERIALIZERS_FOR_TYPE(type) \ diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h index 8003d17d58..d0c0a8ab7b 100644 --- a/src/google/protobuf/generated_message_util.h +++ b/src/google/protobuf/generated_message_util.h @@ -45,8 +45,6 @@ #include #include -#include -#include #include #include #include @@ -54,6 +52,7 @@ #include #include #include +#include #include @@ -70,11 +69,20 @@ namespace io { class CodedInputStream; } namespace internal { +template +inline To DownCast(From* f) { + return PROTOBUF_NAMESPACE_ID::internal::down_cast(f); +} +template +inline To DownCast(From& f) { + return PROTOBUF_NAMESPACE_ID::internal::down_cast(f); +} + PROTOBUF_EXPORT void InitProtobufDefaults(); // This used by proto1 -PROTOBUF_EXPORT inline const ::std::string& GetEmptyString() { +PROTOBUF_EXPORT inline const std::string& GetEmptyString() { InitProtobufDefaults(); return GetEmptyStringAlreadyInited(); } @@ -213,12 +221,11 @@ PROTOBUF_EXPORT void DestroyString(const void* s); inline void OnShutdownDestroyMessage(const void* ptr) { OnShutdownRun(DestroyMessage, ptr); } -// Destroy the string (call string destructor) -inline void OnShutdownDestroyString(const ::std::string* ptr) { +// Destroy the string (call std::string destructor) +inline void OnShutdownDestroyString(const std::string* ptr) { OnShutdownRun(DestroyString, ptr); } - } // namespace internal } // namespace protobuf } // namespace google diff --git a/src/google/protobuf/has_bits.h b/src/google/protobuf/has_bits.h index d15b3f8d91..ff0e176c3f 100644 --- a/src/google/protobuf/has_bits.h +++ b/src/google/protobuf/has_bits.h @@ -53,11 +53,11 @@ class HasBits { memset(has_bits_, 0, sizeof(has_bits_)); } - ::google::protobuf::uint32& operator[](int index) PROTOBUF_ALWAYS_INLINE { + uint32& operator[](int index) PROTOBUF_ALWAYS_INLINE { return has_bits_[index]; } - const ::google::protobuf::uint32& operator[](int index) const PROTOBUF_ALWAYS_INLINE { + const uint32& operator[](int index) const PROTOBUF_ALWAYS_INLINE { return has_bits_[index]; } @@ -72,7 +72,7 @@ class HasBits { bool empty() const; private: - ::google::protobuf::uint32 has_bits_[doublewords]; + uint32 has_bits_[doublewords]; }; template <> diff --git a/src/google/protobuf/inlined_string_field.h b/src/google/protobuf/inlined_string_field.h index 72280110aa..781059dae7 100644 --- a/src/google/protobuf/inlined_string_field.h +++ b/src/google/protobuf/inlined_string_field.h @@ -50,9 +50,9 @@ class Arena; namespace internal { -// InlinedStringField wraps a ::std::string instance and exposes an API similar to -// ArenaStringPtr's wrapping of a ::std::string* instance. As ::std::string is never -// allocated on the Arena, we expose only the *NoArena methods of +// InlinedStringField wraps a std::string instance and exposes an API similar to +// ArenaStringPtr's wrapping of a std::string* instance. As std::string is +// never allocated on the Arena, we expose only the *NoArena methods of // ArenaStringPtr. // // default_value parameters are taken for consistency with ArenaStringPtr, but @@ -61,138 +61,132 @@ namespace internal { class PROTOBUF_EXPORT InlinedStringField { public: InlinedStringField() PROTOBUF_ALWAYS_INLINE; - explicit InlinedStringField(const ::std::string& default_value); + explicit InlinedStringField(const std::string& default_value); - void AssignWithDefault(const ::std::string* default_value, + void AssignWithDefault(const std::string* default_value, const InlinedStringField& from) PROTOBUF_ALWAYS_INLINE; - void ClearToEmpty(const ::std::string* default_value, + void ClearToEmpty(const std::string* default_value, Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { ClearToEmptyNoArena(default_value); } void ClearNonDefaultToEmpty() PROTOBUF_ALWAYS_INLINE { ClearNonDefaultToEmptyNoArena(); } - void ClearToEmptyNoArena(const ::std::string* /*default_value*/) + void ClearToEmptyNoArena(const std::string* /*default_value*/) PROTOBUF_ALWAYS_INLINE { ClearNonDefaultToEmptyNoArena(); } void ClearNonDefaultToEmptyNoArena() PROTOBUF_ALWAYS_INLINE; - void ClearToDefault(const ::std::string* default_value, + void ClearToDefault(const std::string* default_value, Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { ClearToDefaultNoArena(default_value); } - void ClearToDefaultNoArena(const ::std::string* default_value) + void ClearToDefaultNoArena(const std::string* default_value) PROTOBUF_ALWAYS_INLINE; - void Destroy(const ::std::string* default_value, + void Destroy(const std::string* default_value, Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { DestroyNoArena(default_value); } - void DestroyNoArena(const ::std::string* default_value) PROTOBUF_ALWAYS_INLINE; + void DestroyNoArena(const std::string* default_value) PROTOBUF_ALWAYS_INLINE; - const ::std::string& Get() const PROTOBUF_ALWAYS_INLINE { return GetNoArena(); } - const ::std::string& GetNoArena() const PROTOBUF_ALWAYS_INLINE; + const std::string& Get() const PROTOBUF_ALWAYS_INLINE { return GetNoArena(); } + const std::string& GetNoArena() const PROTOBUF_ALWAYS_INLINE; - ::std::string* Mutable(const ::std::string* default_value, - Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { + std::string* Mutable(const std::string* default_value, + Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { return MutableNoArena(default_value); } - ::std::string* MutableNoArena(const ::std::string* default_value) + std::string* MutableNoArena(const std::string* default_value) PROTOBUF_ALWAYS_INLINE; - ::std::string* Release(const ::std::string* default_value, Arena* /*arena*/) { + std::string* Release(const std::string* default_value, Arena* /*arena*/) { return ReleaseNoArena(default_value); } - ::std::string* ReleaseNonDefault(const ::std::string* default_value, Arena* /*arena*/) { + std::string* ReleaseNonDefault(const std::string* default_value, + Arena* /*arena*/) { return ReleaseNonDefaultNoArena(default_value); } - ::std::string* ReleaseNoArena(const ::std::string* default_value) { + std::string* ReleaseNoArena(const std::string* default_value) { return ReleaseNonDefaultNoArena(default_value); } - ::std::string* ReleaseNonDefaultNoArena(const ::std::string* default_value); + std::string* ReleaseNonDefaultNoArena(const std::string* default_value); - void Set(const ::std::string* default_value, StringPiece value, + void Set(const std::string* default_value, StringPiece value, Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { SetNoArena(default_value, value); } - void SetLite(const ::std::string* default_value, StringPiece value, + void SetLite(const std::string* default_value, StringPiece value, Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { SetNoArena(default_value, value); } - void SetNoArena(const ::std::string* default_value, + void SetNoArena(const std::string* default_value, StringPiece value) PROTOBUF_ALWAYS_INLINE; - void Set(const ::std::string* default_value, const ::std::string& value, + void Set(const std::string* default_value, const std::string& value, Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { SetNoArena(default_value, value); } - void SetLite(const ::std::string* default_value, const ::std::string& value, + void SetLite(const std::string* default_value, const std::string& value, Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { SetNoArena(default_value, value); } - void SetNoArena(const ::std::string* default_value, - const ::std::string& value) PROTOBUF_ALWAYS_INLINE; + void SetNoArena(const std::string* default_value, + const std::string& value) PROTOBUF_ALWAYS_INLINE; -#if LANG_CXX11 - void SetNoArena(const ::std::string* default_value, - ::std::string&& value) PROTOBUF_ALWAYS_INLINE; -#endif - void SetAllocated(const ::std::string* default_value, - ::std::string* value, + void SetNoArena(const std::string* default_value, + std::string&& value) PROTOBUF_ALWAYS_INLINE; + void SetAllocated(const std::string* default_value, std::string* value, Arena* /*arena*/) { SetAllocatedNoArena(default_value, value); } - void SetAllocatedNoArena(const ::std::string* default_value, - ::std::string* value); + void SetAllocatedNoArena(const std::string* default_value, + std::string* value); void Swap(InlinedStringField* from) PROTOBUF_ALWAYS_INLINE; - ::std::string* UnsafeMutablePointer(); - void UnsafeSetDefault(const ::std::string* default_value); - ::std::string* UnsafeArenaRelease(const ::std::string* default_value, Arena* arena); - void UnsafeArenaSetAllocated( - const ::std::string* default_value, ::std::string* value, Arena* arena); - - bool IsDefault(const ::std::string* /*default_value*/) { - return false; - } + std::string* UnsafeMutablePointer(); + void UnsafeSetDefault(const std::string* default_value); + std::string* UnsafeArenaRelease(const std::string* default_value, + Arena* arena); + void UnsafeArenaSetAllocated(const std::string* default_value, + std::string* value, Arena* arena); + + bool IsDefault(const std::string* /*default_value*/) { return false; } + private: - ::std::string value_; + std::string value_; }; inline InlinedStringField::InlinedStringField() {} -inline InlinedStringField::InlinedStringField(const ::std::string& default_value) : - value_(default_value) {} +inline InlinedStringField::InlinedStringField(const std::string& default_value) + : value_(default_value) {} inline void InlinedStringField::AssignWithDefault( - const ::std::string* /*default_value*/, const InlinedStringField& from) { + const std::string* /*default_value*/, const InlinedStringField& from) { value_ = from.value_; } -inline const ::std::string& InlinedStringField::GetNoArena() const { +inline const std::string& InlinedStringField::GetNoArena() const { return value_; } -inline ::std::string* InlinedStringField::MutableNoArena(const ::std::string*) { +inline std::string* InlinedStringField::MutableNoArena(const std::string*) { return &value_; } inline void InlinedStringField::SetAllocatedNoArena( - const ::std::string* default_value, ::std::string* value) { + const std::string* default_value, std::string* value) { if (value == NULL) { value_.assign(*default_value); } else { -#if LANG_CXX11 value_.assign(std::move(*value)); -#else - value_.swap(*value); -#endif delete value; } } -inline void InlinedStringField::DestroyNoArena(const ::std::string*) { +inline void InlinedStringField::DestroyNoArena(const std::string*) { // This is invoked from the generated message's ArenaDtor, which is used to // clean up objects not allocated on the Arena. this->~InlinedStringField(); @@ -203,54 +197,52 @@ inline void InlinedStringField::ClearNonDefaultToEmptyNoArena() { } inline void InlinedStringField::ClearToDefaultNoArena( - const ::std::string* default_value) { + const std::string* default_value) { value_.assign(*default_value); } -inline ::std::string* InlinedStringField::ReleaseNonDefaultNoArena( - const ::std::string* default_value) { - ::std::string* released = new ::std::string(*default_value); +inline std::string* InlinedStringField::ReleaseNonDefaultNoArena( + const std::string* default_value) { + std::string* released = new std::string(*default_value); value_.swap(*released); return released; } -inline void InlinedStringField::SetNoArena(const ::std::string* /*default_value*/, +inline void InlinedStringField::SetNoArena(const std::string* /*default_value*/, StringPiece value) { value_.assign(value.data(), value.length()); } -inline void InlinedStringField::SetNoArena( - const ::std::string* /*default_value*/, const ::std::string& value) { +inline void InlinedStringField::SetNoArena(const std::string* /*default_value*/, + const std::string& value) { value_.assign(value); } -#if LANG_CXX11 -inline void InlinedStringField::SetNoArena( - const ::std::string* /*default_value*/, ::std::string&& value) { +inline void InlinedStringField::SetNoArena(const std::string* /*default_value*/, + std::string&& value) { value_.assign(std::move(value)); } -#endif inline void InlinedStringField::Swap(InlinedStringField* from) { value_.swap(from->value_); } -inline ::std::string* InlinedStringField::UnsafeMutablePointer() { +inline std::string* InlinedStringField::UnsafeMutablePointer() { return &value_; } inline void InlinedStringField::UnsafeSetDefault( - const ::std::string* default_value) { + const std::string* default_value) { value_.assign(*default_value); } -inline ::std::string* InlinedStringField::UnsafeArenaRelease( - const ::std::string* default_value, Arena* /*arena*/) { +inline std::string* InlinedStringField::UnsafeArenaRelease( + const std::string* default_value, Arena* /*arena*/) { return ReleaseNoArena(default_value); } inline void InlinedStringField::UnsafeArenaSetAllocated( - const ::std::string* default_value, ::std::string* value, Arena* /*arena*/) { + const std::string* default_value, std::string* value, Arena* /*arena*/) { if (value == NULL) { value_.assign(*default_value); } else { diff --git a/src/google/protobuf/io/coded_stream.cc b/src/google/protobuf/io/coded_stream.cc index 547c5c6459..ff08709ac2 100644 --- a/src/google/protobuf/io/coded_stream.cc +++ b/src/google/protobuf/io/coded_stream.cc @@ -239,12 +239,12 @@ bool CodedInputStream::ReadRaw(void* buffer, int size) { return InternalReadRawInline(buffer, size); } -bool CodedInputStream::ReadString(string* buffer, int size) { +bool CodedInputStream::ReadString(std::string* buffer, int size) { if (size < 0) return false; // security: size is often user-supplied return InternalReadStringInline(buffer, size); } -bool CodedInputStream::ReadStringFallback(string* buffer, int size) { +bool CodedInputStream::ReadStringFallback(std::string* buffer, int size) { if (!buffer->empty()) { buffer->clear(); } @@ -776,7 +776,7 @@ bool CodedOutputStream::Refresh() { } } -uint8* CodedOutputStream::WriteStringWithSizeToArray(const string& str, +uint8* CodedOutputStream::WriteStringWithSizeToArray(const std::string& str, uint8* target) { GOOGLE_DCHECK_LE(str.size(), kuint32max); target = WriteVarint32ToArray(str.size(), target); diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h index 740571bcce..891f6dd28c 100644 --- a/src/google/protobuf/io/coded_stream.h +++ b/src/google/protobuf/io/coded_stream.h @@ -748,7 +748,8 @@ class PROTOBUF_EXPORT CodedOutputStream { // Like WriteString() but writing directly to the target array. static uint8* WriteStringToArray(const std::string& str, uint8* target); // Write the varint-encoded size of str followed by str. - static uint8* WriteStringWithSizeToArray(const std::string& str, uint8* target); + static uint8* WriteStringWithSizeToArray(const std::string& str, + uint8* target); // Instructs the CodedOutputStream to allow the underlying @@ -1289,8 +1290,8 @@ inline void CodedOutputStream::WriteRawMaybeAliased( } } -inline uint8* CodedOutputStream::WriteStringToArray( - const std::string& str, uint8* target) { +inline uint8* CodedOutputStream::WriteStringToArray(const std::string& str, + uint8* target) { return WriteRawToArray(str.data(), static_cast(str.size()), target); } diff --git a/src/google/protobuf/io/coded_stream_unittest.cc b/src/google/protobuf/io/coded_stream_unittest.cc index 52cc7c33b2..787b25cd00 100644 --- a/src/google/protobuf/io/coded_stream_unittest.cc +++ b/src/google/protobuf/io/coded_stream_unittest.cc @@ -135,7 +135,8 @@ class CodedStreamTest : public testing::Test { // for further information. static void SetupTotalBytesLimitWarningTest( int total_bytes_limit, int warning_threshold, - std::vector* out_errors, std::vector* out_warnings); + std::vector* out_errors, + std::vector* out_warnings); // Buffer used during most of the tests. This assumes tests run sequentially. static const int kBufferSize = 1024 * 64; @@ -705,7 +706,7 @@ TEST_1D(CodedStreamTest, ReadString, kBlockSizes) { { CodedInputStream coded_input(&input); - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, strlen(kRawBytes))); EXPECT_EQ(kRawBytes, str); } @@ -720,7 +721,7 @@ TEST_1D(CodedStreamTest, ReadStringImpossiblyLarge, kBlockSizes) { { CodedInputStream coded_input(&input); - string str; + std::string str; // Try to read a gigabyte. EXPECT_FALSE(coded_input.ReadString(&str, 1 << 30)); } @@ -731,14 +732,14 @@ TEST_F(CodedStreamTest, ReadStringImpossiblyLargeFromStringOnStack) { // crashes while the above did not. uint8 buffer[8]; CodedInputStream coded_input(buffer, 8); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, 1 << 30)); } TEST_F(CodedStreamTest, ReadStringImpossiblyLargeFromStringOnHeap) { std::unique_ptr buffer(new uint8[8]); CodedInputStream coded_input(buffer.get(), 8); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, 1 << 30)); } @@ -751,7 +752,7 @@ TEST_1D(CodedStreamTest, ReadStringReservesMemoryOnTotalLimit, kBlockSizes) { coded_input.SetTotalBytesLimit(sizeof(kRawBytes), sizeof(kRawBytes)); EXPECT_EQ(sizeof(kRawBytes), coded_input.BytesUntilTotalBytesLimit()); - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, strlen(kRawBytes))); EXPECT_EQ(sizeof(kRawBytes) - strlen(kRawBytes), coded_input.BytesUntilTotalBytesLimit()); @@ -771,7 +772,7 @@ TEST_1D(CodedStreamTest, ReadStringReservesMemoryOnPushedLimit, kBlockSizes) { CodedInputStream coded_input(&input); coded_input.PushLimit(sizeof(buffer_)); - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, strlen(kRawBytes))); EXPECT_EQ(kRawBytes, str); // TODO(liujisi): Replace with a more meaningful test (see cl/60966023). @@ -791,7 +792,7 @@ TEST_F(CodedStreamTest, ReadStringNoReservationIfLimitsNotSet) { { CodedInputStream coded_input(&input); - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, strlen(kRawBytes))); EXPECT_EQ(kRawBytes, str); // Note: this check depends on string class implementation. It @@ -816,12 +817,12 @@ TEST_F(CodedStreamTest, ReadStringNoReservationSizeIsNegative) { CodedInputStream coded_input(&input); coded_input.PushLimit(sizeof(buffer_)); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, -1)); // Note: this check depends on string class implementation. It // expects that string will always allocate the same amount of // memory for an empty string. - EXPECT_EQ(string().capacity(), str.capacity()); + EXPECT_EQ(std::string().capacity(), str.capacity()); } } @@ -836,7 +837,7 @@ TEST_F(CodedStreamTest, ReadStringNoReservationSizeIsLarge) { CodedInputStream coded_input(&input); coded_input.PushLimit(sizeof(buffer_)); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, 1 << 30)); EXPECT_GT(1 << 30, str.capacity()); } @@ -853,7 +854,7 @@ TEST_F(CodedStreamTest, ReadStringNoReservationSizeIsOverTheLimit) { CodedInputStream coded_input(&input); coded_input.PushLimit(16); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, strlen(kRawBytes))); // Note: this check depends on string class implementation. It // expects that string will allocate less than strlen(kRawBytes) @@ -873,7 +874,7 @@ TEST_F(CodedStreamTest, ReadStringNoReservationSizeIsOverTheTotalBytesLimit) { CodedInputStream coded_input(&input); coded_input.SetTotalBytesLimit(16, 16); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, strlen(kRawBytes))); // Note: this check depends on string class implementation. It // expects that string will allocate less than strlen(kRawBytes) @@ -895,7 +896,7 @@ TEST_F(CodedStreamTest, coded_input.PushLimit(sizeof(buffer_)); coded_input.SetTotalBytesLimit(16, 16); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, strlen(kRawBytes))); // Note: this check depends on string class implementation. It // expects that string will allocate less than strlen(kRawBytes) @@ -918,7 +919,7 @@ TEST_F(CodedStreamTest, coded_input.SetTotalBytesLimit(sizeof(buffer_), sizeof(buffer_)); EXPECT_EQ(sizeof(buffer_), coded_input.BytesUntilTotalBytesLimit()); - string str; + std::string str; EXPECT_FALSE(coded_input.ReadString(&str, strlen(kRawBytes))); // Note: this check depends on string class implementation. It // expects that string will allocate less than strlen(kRawBytes) @@ -941,7 +942,7 @@ TEST_1D(CodedStreamTest, SkipInput, kBlockSizes) { { CodedInputStream coded_input(&input); - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, strlen(""))); EXPECT_EQ("", str); EXPECT_TRUE(coded_input.Skip(strlen(""))); @@ -1225,11 +1226,11 @@ TEST_F(CodedStreamTest, TotalBytesLimit) { coded_input.SetTotalBytesLimit(16, -1); EXPECT_EQ(16, coded_input.BytesUntilTotalBytesLimit()); - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, 16)); EXPECT_EQ(0, coded_input.BytesUntilTotalBytesLimit()); - std::vector errors; + std::vector errors; { ScopedMemoryLog error_log; @@ -1258,7 +1259,7 @@ TEST_F(CodedStreamTest, TotalBytesLimitNotValidMessageEnd) { CodedInputStream::Limit limit = coded_input.PushLimit(16); // Read 16 bytes. - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, 16)); // Read a tag. Should fail, but report being a valid endpoint since it's @@ -1281,14 +1282,15 @@ TEST_F(CodedStreamTest, TotalBytesLimitNotValidMessageEnd) { // vectors. void CodedStreamTest::SetupTotalBytesLimitWarningTest( int total_bytes_limit, int warning_threshold, - std::vector* out_errors, std::vector* out_warnings) { + std::vector* out_errors, + std::vector* out_warnings) { ArrayInputStream raw_input(buffer_, sizeof(buffer_), 128); ScopedMemoryLog scoped_log; { CodedInputStream input(&raw_input); input.SetTotalBytesLimit(total_bytes_limit, warning_threshold); - string str; + std::string str; EXPECT_TRUE(input.ReadString(&str, 2048)); } @@ -1381,12 +1383,12 @@ TEST_F(CodedStreamTest, InputOver2G) { // input.BackUp() with the correct number of bytes on destruction. ReallyBigInputStream input; - std::vector errors; + std::vector errors; { ScopedMemoryLog error_log; CodedInputStream coded_input(&input); - string str; + std::string str; EXPECT_TRUE(coded_input.ReadString(&str, 512)); EXPECT_TRUE(coded_input.ReadString(&str, 1024)); errors = error_log.GetMessages(ERROR); diff --git a/src/google/protobuf/io/printer.cc b/src/google/protobuf/io/printer.cc index e988db80c9..736f06352b 100644 --- a/src/google/protobuf/io/printer.cc +++ b/src/google/protobuf/io/printer.cc @@ -73,7 +73,7 @@ Printer::~Printer() { bool Printer::GetSubstitutionRange(const char* varname, std::pair* range) { - std::map >::const_iterator iter = + std::map >::const_iterator iter = substitutions_.find(varname); if (iter == substitutions_.end()) { GOOGLE_LOG(DFATAL) << " Undefined variable in annotation: " << varname; @@ -89,7 +89,8 @@ bool Printer::GetSubstitutionRange(const char* varname, } void Printer::Annotate(const char* begin_varname, const char* end_varname, - const string& file_path, const std::vector& path) { + const std::string& file_path, + const std::vector& path) { if (annotation_collector_ == NULL) { // Can't generate signatures with this Printer. return; @@ -108,7 +109,7 @@ void Printer::Annotate(const char* begin_varname, const char* end_varname, } } -void Printer::Print(const std::map& variables, +void Printer::Print(const std::map& variables, const char* text) { int size = strlen(text); int pos = 0; // The number of bytes we've written so far. @@ -142,13 +143,14 @@ void Printer::Print(const std::map& variables, } int endpos = end - text; - string varname(text + pos, endpos - pos); + std::string varname(text + pos, endpos - pos); if (varname.empty()) { // Two delimiters in a row reduce to a literal delimiter character. WriteRaw(&variable_delimiter_, 1); } else { // Replace with the variable's value. - std::map::const_iterator iter = variables.find(varname); + std::map::const_iterator iter = + variables.find(varname); if (iter == variables.end()) { GOOGLE_LOG(DFATAL) << " Undefined variable: " << varname; } else { @@ -156,7 +158,7 @@ void Printer::Print(const std::map& variables, line_start_variables_.push_back(varname); } WriteRaw(iter->second.data(), iter->second.size()); - std::pair >::iterator, + std::pair >::iterator, bool> inserted = substitutions_.insert(std::make_pair( varname, @@ -193,7 +195,7 @@ void Printer::Outdent() { indent_.resize(indent_.size() - 2); } -void Printer::PrintRaw(const string& data) { +void Printer::PrintRaw(const std::string& data) { WriteRaw(data.data(), data.size()); } @@ -213,7 +215,7 @@ void Printer::WriteRaw(const char* data, int size) { if (failed_) return; // Fix up empty variables (e.g., "{") that should be annotated as // coming after the indent. - for (std::vector::iterator i = line_start_variables_.begin(); + for (std::vector::iterator i = line_start_variables_.begin(); i != line_start_variables_.end(); ++i) { substitutions_[*i].first += indent_.size(); substitutions_[*i].second += indent_.size(); @@ -273,8 +275,8 @@ void Printer::IndentIfAtStart() { } } -void Printer::FormatInternal(const std::vector& args, - const std::map& vars, +void Printer::FormatInternal(const std::vector& args, + const std::map& vars, const char* format) { auto save = format; int arg_index = 0; @@ -304,9 +306,9 @@ void Printer::FormatInternal(const std::vector& args, } const char* Printer::WriteVariable( - const std::vector& args, const std::map& vars, - const char* format, int* arg_index, - std::vector* annotations) { + const std::vector& args, + const std::map& vars, const char* format, + int* arg_index, std::vector* annotations) { auto start = format; auto end = strchr(format, '$'); if (!end) { @@ -353,9 +355,9 @@ const char* Printer::WriteVariable( } auto end_var = end; while (start_var < end_var && *(end_var - 1) == ' ') end_var--; - string var_name{start_var, - static_cast(end_var - start_var)}; - string sub; + std::string var_name{ + start_var, static_cast(end_var - start_var)}; + std::string sub; if (std::isdigit(var_name[0])) { GOOGLE_CHECK_EQ(var_name.size(), 1); // No need for multi-digits int idx = var_name[0] - '1'; // Start counting at 1 diff --git a/src/google/protobuf/io/printer.h b/src/google/protobuf/io/printer.h index ce693e54d6..a08ca655d4 100644 --- a/src/google/protobuf/io/printer.h +++ b/src/google/protobuf/io/printer.h @@ -242,7 +242,8 @@ class PROTOBUF_EXPORT Printer { // substituted are identified by their names surrounded by delimiter // characters (as given to the constructor). The variable bindings are // defined by the given map. - void Print(const std::map& variables, const char* text); + void Print(const std::map& variables, + const char* text); // Like the first Print(), except the substitutions are given as parameters. template @@ -278,7 +279,8 @@ class PROTOBUF_EXPORT Printer { // and variables directly supplied by arguments (eq "$1$" meaning first // argument which is the zero index element of args). void FormatInternal(const std::vector& args, - const std::map& vars, const char* format); + const std::map& vars, + const char* format); // True if any write to the underlying stream failed. (We don't just // crash in this case because this is an I/O failure, not a programming @@ -296,7 +298,8 @@ class PROTOBUF_EXPORT Printer { const std::string& file_path, const std::vector& path); // Base case - void PrintInternal(std::map* vars, const char* text) { + void PrintInternal(std::map* vars, + const char* text) { Print(*vars, text); } @@ -325,8 +328,9 @@ class PROTOBUF_EXPORT Printer { inline void IndentIfAtStart(); const char* WriteVariable( - const std::vector& args, const std::map& vars, - const char* format, int* arg_index, + const std::vector& args, + const std::map& vars, const char* format, + int* arg_index, std::vector* annotations); const char variable_delimiter_; diff --git a/src/google/protobuf/io/printer_unittest.cc b/src/google/protobuf/io/printer_unittest.cc index fe46cee101..50a683ec3c 100644 --- a/src/google/protobuf/io/printer_unittest.cc +++ b/src/google/protobuf/io/printer_unittest.cc @@ -91,7 +91,7 @@ TEST(Printer, WriteRaw) { ArrayOutputStream output(buffer, sizeof(buffer), block_size); { - string string_obj = "From an object\n"; + std::string string_obj = "From an object\n"; Printer printer(&output, '$'); printer.WriteRaw("Hello World!", 12); printer.PrintRaw(" This is the same line.\n"); @@ -120,7 +120,7 @@ TEST(Printer, VariableSubstitution) { { Printer printer(&output, '$'); - std::map vars; + std::map vars; vars["foo"] = "World"; vars["bar"] = "$foo$"; @@ -173,20 +173,20 @@ TEST(Printer, InlineVariableSubstitution) { // annotations. class MockDescriptorFile { public: - explicit MockDescriptorFile(const string& file) : file_(file) {} + explicit MockDescriptorFile(const std::string& file) : file_(file) {} // The mock filename for this file. - const string& name() const { return file_; } + const std::string& name() const { return file_; } private: - string file_; + std::string file_; }; // MockDescriptor defines only those members that Printer uses to write out // annotations. class MockDescriptor { public: - MockDescriptor(const string& file, const std::vector& path) + MockDescriptor(const std::string& file, const std::vector& path) : file_(file), path_(path) {} // The mock file in which this descriptor was defined. @@ -210,7 +210,7 @@ TEST(Printer, AnnotateMap) { AnnotationProtoCollector info_collector(&info); { Printer printer(&output, '$', &info_collector); - std::map vars; + std::map vars; vars["foo"] = "3"; vars["bar"] = "5"; printer.Print(vars, "012$foo$4$bar$\n"); @@ -444,7 +444,7 @@ TEST(Printer, Indenting) { { Printer printer(&output, '$'); - std::map vars; + std::map vars; vars["newline"] = "\n"; @@ -594,12 +594,13 @@ TEST(Printer, WriteFailureExact) { } TEST(Printer, FormatInternal) { - std::vector args{"arg1", "arg2"}; - std::map vars{{"foo", "bar"}, {"baz", "bla"}, {"empty", ""}}; + std::vector args{"arg1", "arg2"}; + std::map vars{ + {"foo", "bar"}, {"baz", "bla"}, {"empty", ""}}; // Substitution tests { // Direct arg substitution - string s; + std::string s; { StringOutputStream output(&s); Printer printer(&output, '$'); @@ -609,7 +610,7 @@ TEST(Printer, FormatInternal) { } { // Variable substitution including spaces left - string s; + std::string s; { StringOutputStream output(&s); Printer printer(&output, '$'); @@ -619,7 +620,7 @@ TEST(Printer, FormatInternal) { } { // Variable substitution including spaces right - string s; + std::string s; { StringOutputStream output(&s); Printer printer(&output, '$'); @@ -629,7 +630,7 @@ TEST(Printer, FormatInternal) { } { // Mixed variable substitution - string s; + std::string s; { StringOutputStream output(&s); Printer printer(&output, '$'); @@ -641,7 +642,7 @@ TEST(Printer, FormatInternal) { // Indentation tests { // Empty lines shouldn't indent. - string s; + std::string s; { StringOutputStream output(&s); Printer printer(&output, '$'); @@ -653,7 +654,7 @@ TEST(Printer, FormatInternal) { } { // Annotations should respect indentation. - string s; + std::string s; GeneratedCodeInfo info; { StringOutputStream output(&s); @@ -663,7 +664,8 @@ TEST(Printer, FormatInternal) { GeneratedCodeInfo::Annotation annotation; annotation.set_source_file("file.proto"); annotation.add_path(33); - std::vector args{annotation.SerializeAsString(), "arg1", "arg2"}; + std::vector args{annotation.SerializeAsString(), "arg1", + "arg2"}; printer.FormatInternal(args, vars, "$empty $\n\n${1$$2$$}$ $3$\n$baz$"); printer.Outdent(); } @@ -680,42 +682,42 @@ TEST(Printer, FormatInternal) { // Death tests in case of illegal format strings. { // Unused arguments - string s; + std::string s; StringOutputStream output(&s); Printer printer(&output, '$'); EXPECT_DEATH(printer.FormatInternal(args, vars, "$empty $$1$"), "Unused"); } { // Wrong order arguments - string s; + std::string s; StringOutputStream output(&s); Printer printer(&output, '$'); EXPECT_DEATH(printer.FormatInternal(args, vars, "$2$ $1$"), "order"); } { // Zero is illegal argument - string s; + std::string s; StringOutputStream output(&s); Printer printer(&output, '$'); EXPECT_DEATH(printer.FormatInternal(args, vars, "$0$"), "failed"); } { // Argument out of bounds - string s; + std::string s; StringOutputStream output(&s); Printer printer(&output, '$'); EXPECT_DEATH(printer.FormatInternal(args, vars, "$1$ $2$ $3$"), "bounds"); } { // Unknown variable - string s; + std::string s; StringOutputStream output(&s); Printer printer(&output, '$'); EXPECT_DEATH(printer.FormatInternal(args, vars, "$huh$ $1$$2$"), "Unknown"); } { // Illegal variable - string s; + std::string s; StringOutputStream output(&s); Printer printer(&output, '$'); EXPECT_DEATH(printer.FormatInternal({}, vars, "$ $"), "Empty"); diff --git a/src/google/protobuf/io/strtod.cc b/src/google/protobuf/io/strtod.cc index a90bb9a31e..7b17b57ba8 100644 --- a/src/google/protobuf/io/strtod.cc +++ b/src/google/protobuf/io/strtod.cc @@ -52,7 +52,7 @@ namespace { // Returns a string identical to *input except that the character pointed to // by radix_pos (which should be '.') is replaced with the locale-specific // radix character. -string LocalizeRadix(const char* input, const char* radix_pos) { +std::string LocalizeRadix(const char* input, const char* radix_pos) { // Determine the locale-specific radix character by calling sprintf() to // print the number 1.5, then stripping off the digits. As far as I can // tell, this is the only portable, thread-safe way to get the C library @@ -65,7 +65,7 @@ string LocalizeRadix(const char* input, const char* radix_pos) { GOOGLE_CHECK_LE(size, 6); // Now replace the '.' in the input with it. - string result; + std::string result; result.reserve(strlen(input) + size - 3); result.append(input, radix_pos); result.append(temp + 1, size - 2); @@ -90,7 +90,7 @@ double NoLocaleStrtod(const char* text, char** original_endptr) { // Parsing halted on a '.'. Perhaps we're in a different locale? Let's // try to replace the '.' with a locale-specific radix character and // try again. - string localized = LocalizeRadix(text, temp_endptr); + std::string localized = LocalizeRadix(text, temp_endptr); const char* localized_cstr = localized.c_str(); char* localized_endptr; result = strtod(localized_cstr, &localized_endptr); diff --git a/src/google/protobuf/io/tokenizer.cc b/src/google/protobuf/io/tokenizer.cc index 916d1606b7..8abcbd0547 100644 --- a/src/google/protobuf/io/tokenizer.cc +++ b/src/google/protobuf/io/tokenizer.cc @@ -271,7 +271,7 @@ void Tokenizer::Refresh() { current_char_ = buffer_[0]; } -inline void Tokenizer::RecordTo(string* target) { +inline void Tokenizer::RecordTo(std::string* target) { record_target_ = target; record_start_ = buffer_pos_; } @@ -474,7 +474,7 @@ Tokenizer::TokenType Tokenizer::ConsumeNumber(bool started_with_zero, return is_float ? TYPE_FLOAT : TYPE_INTEGER; } -void Tokenizer::ConsumeLineComment(string* content) { +void Tokenizer::ConsumeLineComment(std::string* content) { if (content != NULL) RecordTo(content); while (current_char_ != '\0' && current_char_ != '\n') { @@ -485,7 +485,7 @@ void Tokenizer::ConsumeLineComment(string* content) { if (content != NULL) StopRecording(); } -void Tokenizer::ConsumeBlockComment(string* content) { +void Tokenizer::ConsumeBlockComment(std::string* content) { int start_line = line_; int start_column = column_ - 2; @@ -664,9 +664,9 @@ namespace { // next_leading_comments. class CommentCollector { public: - CommentCollector(string* prev_trailing_comments, - std::vector* detached_comments, - string* next_leading_comments) + CommentCollector(std::string* prev_trailing_comments, + std::vector* detached_comments, + std::string* next_leading_comments) : prev_trailing_comments_(prev_trailing_comments), detached_comments_(detached_comments), next_leading_comments_(next_leading_comments), @@ -687,7 +687,7 @@ class CommentCollector { // About to read a line comment. Get the comment buffer pointer in order to // read into it. - string* GetBufferForLineComment() { + std::string* GetBufferForLineComment() { // We want to combine with previous line comments, but not block comments. if (has_comment_ && !is_line_comment_) { Flush(); @@ -699,7 +699,7 @@ class CommentCollector { // About to read a block comment. Get the comment buffer pointer in order to // read into it. - string* GetBufferForBlockComment() { + std::string* GetBufferForBlockComment() { if (has_comment_) { Flush(); } @@ -736,11 +736,11 @@ class CommentCollector { } private: - string* prev_trailing_comments_; - std::vector* detached_comments_; - string* next_leading_comments_; + std::string* prev_trailing_comments_; + std::vector* detached_comments_; + std::string* next_leading_comments_; - string comment_buffer_; + std::string comment_buffer_; // True if any comments were read into comment_buffer_. This can be true even // if comment_buffer_ is empty, namely if the comment was "/**/". @@ -756,9 +756,9 @@ class CommentCollector { } // namespace -bool Tokenizer::NextWithComments(string* prev_trailing_comments, - std::vector* detached_comments, - string* next_leading_comments) { +bool Tokenizer::NextWithComments(std::string* prev_trailing_comments, + std::vector* detached_comments, + std::string* next_leading_comments) { CommentCollector collector(prev_trailing_comments, detached_comments, next_leading_comments); @@ -858,7 +858,7 @@ bool Tokenizer::NextWithComments(string* prev_trailing_comments, // are given is text that the tokenizer actually parsed as a token // of the given type. -bool Tokenizer::ParseInteger(const string& text, uint64 max_value, +bool Tokenizer::ParseInteger(const std::string& text, uint64 max_value, uint64* output) { // Sadly, we can't just use strtoul() since it is only 32-bit and strtoull() // is non-standard. I hate the C standard library. :( @@ -897,7 +897,7 @@ bool Tokenizer::ParseInteger(const string& text, uint64 max_value, return true; } -double Tokenizer::ParseFloat(const string& text) { +double Tokenizer::ParseFloat(const std::string& text) { const char* start = text.c_str(); char* end; double result = NoLocaleStrtod(start, &end); @@ -924,7 +924,7 @@ double Tokenizer::ParseFloat(const string& text) { // Helper to append a Unicode code point to a string as UTF8, without bringing // in any external dependencies. -static void AppendUTF8(uint32 code_point, string* output) { +static void AppendUTF8(uint32 code_point, std::string* output) { uint32 tmp = 0; int len = 0; if (code_point <= 0x7f) { @@ -1036,7 +1036,8 @@ static const char* FetchUnicodePoint(const char* ptr, uint32* code_point) { // The text string must begin and end with single or double quote // characters. -void Tokenizer::ParseStringAppend(const string& text, string* output) { +void Tokenizer::ParseStringAppend(const std::string& text, + std::string* output) { // Reminder: text[0] is always a quote character. (If text is // empty, it's invalid, so we'll just return). const size_t text_size = text.size(); @@ -1114,8 +1115,8 @@ void Tokenizer::ParseStringAppend(const string& text, string* output) { } } -template -static bool AllInClass(const string& s) { +template +static bool AllInClass(const std::string& s) { for (int i = 0; i < s.size(); ++i) { if (!CharacterClass::InClass(s[i])) return false; @@ -1123,7 +1124,7 @@ static bool AllInClass(const string& s) { return true; } -bool Tokenizer::IsIdentifier(const string& text) { +bool Tokenizer::IsIdentifier(const std::string& text) { // Mirrors IDENTIFIER definition in Tokenizer::Next() above. if (text.size() == 0) return false; diff --git a/src/google/protobuf/io/tokenizer.h b/src/google/protobuf/io/tokenizer.h index f6c3d273fe..481681407a 100644 --- a/src/google/protobuf/io/tokenizer.h +++ b/src/google/protobuf/io/tokenizer.h @@ -78,7 +78,7 @@ class PROTOBUF_EXPORT ErrorCollector { // column numbers. The numbers are zero-based, so you may want to add // 1 to each before printing them. virtual void AddWarning(int line, ColumnNumber column, - const std::string& message) { } + const std::string& message) {} private: GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector); @@ -126,7 +126,7 @@ class PROTOBUF_EXPORT Tokenizer { // Structure representing a token read from the token stream. struct Token { TokenType type; - std::string text; // The exact text of the token as it appeared in + std::string text; // The exact text of the token as it appeared in // the input. e.g. tokens of TYPE_STRING will still // be escaped and in quotes. @@ -401,7 +401,8 @@ inline const Tokenizer::Token& Tokenizer::previous() { return previous_; } -inline void Tokenizer::ParseString(const std::string& text, std::string* output) { +inline void Tokenizer::ParseString(const std::string& text, + std::string* output) { output->clear(); ParseStringAppend(text, output); } diff --git a/src/google/protobuf/io/tokenizer_unittest.cc b/src/google/protobuf/io/tokenizer_unittest.cc index e55288e2ff..3dbee8633f 100644 --- a/src/google/protobuf/io/tokenizer_unittest.cc +++ b/src/google/protobuf/io/tokenizer_unittest.cc @@ -159,10 +159,10 @@ class TestErrorCollector : public ErrorCollector { TestErrorCollector() {} ~TestErrorCollector() {} - string text_; + std::string text_; // implements ErrorCollector --------------------------------------- - void AddError(int line, int column, const string& message) { + void AddError(int line, int column, const std::string& message) { strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", line, column, message); } @@ -179,7 +179,7 @@ const int kBlockSizes[] = {1, 2, 3, 5, 7, 13, 32, 1024}; class TokenizerTest : public testing::Test { protected: // For easy testing. - uint64 ParseInteger(const string& text) { + uint64 ParseInteger(const std::string& text) { uint64 result; EXPECT_TRUE(Tokenizer::ParseInteger(text, kuint64max, &result)); return result; @@ -195,7 +195,7 @@ class TokenizerTest : public testing::Test { // In each test case, the entire input text should parse as a single token // of the given type. struct SimpleTokenCase { - string input; + std::string input; Tokenizer::TokenType type; }; @@ -326,7 +326,7 @@ TEST_1D(TokenizerTest, FloatSuffix, kBlockSizes) { // In each case, the input is parsed to produce a list of tokens. The // last token in "output" must have type TYPE_END. struct MultiTokenCase { - string input; + std::string input; Tokenizer::Token output[10]; // The compiler wants a constant array // size for initialization to work. There // is no reason this can't be increased if @@ -513,7 +513,7 @@ TEST_1D(TokenizerTest, ShCommentStyle, kBlockSizes) { // In each case, the input is expected to have two tokens named "prev" and // "next" with comments in between. struct DocCommentCase { - string input; + std::string input; const char* prev_trailing_comments; const char* detached_comments[10]; @@ -692,9 +692,9 @@ TEST_2D(TokenizerTest, DocComments, kDocCommentCases, kBlockSizes) { EXPECT_EQ("prev", tokenizer.current().text); EXPECT_EQ("prev", tokenizer2.current().text); - string prev_trailing_comments; - std::vector detached_comments; - string next_leading_comments; + std::string prev_trailing_comments; + std::vector detached_comments; + std::string next_leading_comments; tokenizer.NextWithComments(&prev_trailing_comments, &detached_comments, &next_leading_comments); tokenizer2.NextWithComments(NULL, NULL, NULL); @@ -797,7 +797,7 @@ TEST_F(TokenizerTest, ParseFloat) { } TEST_F(TokenizerTest, ParseString) { - string output; + std::string output; Tokenizer::ParseString("'hello'", &output); EXPECT_EQ("hello", output); Tokenizer::ParseString("\"blah\\nblah2\"", &output); @@ -840,7 +840,7 @@ TEST_F(TokenizerTest, ParseString) { TEST_F(TokenizerTest, ParseStringAppend) { // Check that ParseString and ParseStringAppend differ. - string output("stuff+"); + std::string output("stuff+"); Tokenizer::ParseStringAppend("'hello'", &output); EXPECT_EQ("stuff+hello", output); Tokenizer::ParseString("'hello'", &output); @@ -852,7 +852,7 @@ TEST_F(TokenizerTest, ParseStringAppend) { // Each case parses some input text, ignoring the tokens produced, and // checks that the error output matches what is expected. struct ErrorCase { - string input; + std::string input; bool recoverable; // True if the tokenizer should be able to recover and // parse more tokens after seeing this error. Cases // for which this is true must end with "foo" as @@ -865,86 +865,70 @@ inline std::ostream& operator<<(std::ostream& out, const ErrorCase& test_case) { } ErrorCase kErrorCases[] = { - // String errors. - { "'\\l' foo", true, - "0:2: Invalid escape sequence in string literal.\n" }, - { "'\\X' foo", true, - "0:2: Invalid escape sequence in string literal.\n" }, - { "'\\x' foo", true, - "0:3: Expected hex digits for escape sequence.\n" }, - { "'foo", false, - "0:4: Unexpected end of string.\n" }, - { "'bar\nfoo", true, - "0:4: String literals cannot cross line boundaries.\n" }, - { "'\\u01' foo", true, - "0:5: Expected four hex digits for \\u escape sequence.\n" }, - { "'\\u01' foo", true, - "0:5: Expected four hex digits for \\u escape sequence.\n" }, - { "'\\uXYZ' foo", true, - "0:3: Expected four hex digits for \\u escape sequence.\n" }, - - // Integer errors. - { "123foo", true, - "0:3: Need space between number and identifier.\n" }, - - // Hex/octal errors. - { "0x foo", true, - "0:2: \"0x\" must be followed by hex digits.\n" }, - { "0541823 foo", true, - "0:4: Numbers starting with leading zero must be in octal.\n" }, - { "0x123z foo", true, - "0:5: Need space between number and identifier.\n" }, - { "0x123.4 foo", true, - "0:5: Hex and octal numbers must be integers.\n" }, - { "0123.4 foo", true, - "0:4: Hex and octal numbers must be integers.\n" }, - - // Float errors. - { "1e foo", true, - "0:2: \"e\" must be followed by exponent.\n" }, - { "1e- foo", true, - "0:3: \"e\" must be followed by exponent.\n" }, - { "1.2.3 foo", true, - "0:3: Already saw decimal point or exponent; can't have another one.\n" }, - { "1e2.3 foo", true, - "0:3: Already saw decimal point or exponent; can't have another one.\n" }, - { "a.1 foo", true, - "0:1: Need space between identifier and decimal point.\n" }, - // allow_f_after_float not enabled, so this should be an error. - { "1.0f foo", true, - "0:3: Need space between number and identifier.\n" }, - - // Block comment errors. - { "/*", false, - "0:2: End-of-file inside block comment.\n" - "0:0: Comment started here.\n"}, - { "/*/*/ foo", true, - "0:3: \"/*\" inside block comment. Block comments cannot be nested.\n"}, - - // Control characters. Multiple consecutive control characters should only - // produce one error. - { "\b foo", true, - "0:0: Invalid control characters encountered in text.\n" }, - { "\b\b foo", true, - "0:0: Invalid control characters encountered in text.\n" }, - - // Check that control characters at end of input don't result in an - // infinite loop. - { "\b", false, - "0:0: Invalid control characters encountered in text.\n" }, - - // Check recovery from '\0'. We have to explicitly specify the length of - // these strings because otherwise the string constructor will just call - // strlen() which will see the first '\0' and think that is the end of the - // string. - { string("\0foo", 4), true, - "0:0: Invalid control characters encountered in text.\n" }, - { string("\0\0foo", 5), true, - "0:0: Invalid control characters encountered in text.\n" }, - - // Check error from high order bits set - { "\300foo", true, - "0:0: Interpreting non ascii codepoint 192.\n" }, + // String errors. + {"'\\l' foo", true, "0:2: Invalid escape sequence in string literal.\n"}, + {"'\\X' foo", true, "0:2: Invalid escape sequence in string literal.\n"}, + {"'\\x' foo", true, "0:3: Expected hex digits for escape sequence.\n"}, + {"'foo", false, "0:4: Unexpected end of string.\n"}, + {"'bar\nfoo", true, "0:4: String literals cannot cross line boundaries.\n"}, + {"'\\u01' foo", true, + "0:5: Expected four hex digits for \\u escape sequence.\n"}, + {"'\\u01' foo", true, + "0:5: Expected four hex digits for \\u escape sequence.\n"}, + {"'\\uXYZ' foo", true, + "0:3: Expected four hex digits for \\u escape sequence.\n"}, + + // Integer errors. + {"123foo", true, "0:3: Need space between number and identifier.\n"}, + + // Hex/octal errors. + {"0x foo", true, "0:2: \"0x\" must be followed by hex digits.\n"}, + {"0541823 foo", true, + "0:4: Numbers starting with leading zero must be in octal.\n"}, + {"0x123z foo", true, "0:5: Need space between number and identifier.\n"}, + {"0x123.4 foo", true, "0:5: Hex and octal numbers must be integers.\n"}, + {"0123.4 foo", true, "0:4: Hex and octal numbers must be integers.\n"}, + + // Float errors. + {"1e foo", true, "0:2: \"e\" must be followed by exponent.\n"}, + {"1e- foo", true, "0:3: \"e\" must be followed by exponent.\n"}, + {"1.2.3 foo", true, + "0:3: Already saw decimal point or exponent; can't have another one.\n"}, + {"1e2.3 foo", true, + "0:3: Already saw decimal point or exponent; can't have another one.\n"}, + {"a.1 foo", true, + "0:1: Need space between identifier and decimal point.\n"}, + // allow_f_after_float not enabled, so this should be an error. + {"1.0f foo", true, "0:3: Need space between number and identifier.\n"}, + + // Block comment errors. + {"/*", false, + "0:2: End-of-file inside block comment.\n" + "0:0: Comment started here.\n"}, + {"/*/*/ foo", true, + "0:3: \"/*\" inside block comment. Block comments cannot be nested.\n"}, + + // Control characters. Multiple consecutive control characters should only + // produce one error. + {"\b foo", true, "0:0: Invalid control characters encountered in text.\n"}, + {"\b\b foo", true, + "0:0: Invalid control characters encountered in text.\n"}, + + // Check that control characters at end of input don't result in an + // infinite loop. + {"\b", false, "0:0: Invalid control characters encountered in text.\n"}, + + // Check recovery from '\0'. We have to explicitly specify the length of + // these strings because otherwise the string constructor will just call + // strlen() which will see the first '\0' and think that is the end of the + // string. + {std::string("\0foo", 4), true, + "0:0: Invalid control characters encountered in text.\n"}, + {std::string("\0\0foo", 5), true, + "0:0: Invalid control characters encountered in text.\n"}, + + // Check error from high order bits set + {"\300foo", true, "0:0: Interpreting non ascii codepoint 192.\n"}, }; TEST_2D(TokenizerTest, Errors, kErrorCases, kBlockSizes) { @@ -973,7 +957,7 @@ TEST_2D(TokenizerTest, Errors, kErrorCases, kBlockSizes) { // ------------------------------------------------------------------- TEST_1D(TokenizerTest, BackUpOnDestruction, kBlockSizes) { - string text = "foo bar"; + std::string text = "foo bar"; TestInputStream input(text.data(), text.size(), kBlockSizes_case); // Create a tokenizer, read one token, then destroy it. diff --git a/src/google/protobuf/io/zero_copy_stream_impl.cc b/src/google/protobuf/io/zero_copy_stream_impl.cc index ea18ae64d7..72328da9e6 100644 --- a/src/google/protobuf/io/zero_copy_stream_impl.cc +++ b/src/google/protobuf/io/zero_copy_stream_impl.cc @@ -401,63 +401,6 @@ int64 ConcatenatingInputStream::ByteCount() const { } -// =================================================================== - -LimitingInputStream::LimitingInputStream(ZeroCopyInputStream* input, - int64 limit) - : input_(input), limit_(limit) { - prior_bytes_read_ = input_->ByteCount(); -} - -LimitingInputStream::~LimitingInputStream() { - // If we overshot the limit, back up. - if (limit_ < 0) input_->BackUp(-limit_); -} - -bool LimitingInputStream::Next(const void** data, int* size) { - if (limit_ <= 0) return false; - if (!input_->Next(data, size)) return false; - - limit_ -= *size; - if (limit_ < 0) { - // We overshot the limit. Reduce *size to hide the rest of the buffer. - *size += limit_; - } - return true; -} - -void LimitingInputStream::BackUp(int count) { - if (limit_ < 0) { - input_->BackUp(count - limit_); - limit_ = count; - } else { - input_->BackUp(count); - limit_ += count; - } -} - -bool LimitingInputStream::Skip(int count) { - if (count > limit_) { - if (limit_ < 0) return false; - input_->Skip(limit_); - limit_ = 0; - return false; - } else { - if (!input_->Skip(count)) return false; - limit_ -= count; - return true; - } -} - -int64 LimitingInputStream::ByteCount() const { - if (limit_ < 0) { - return input_->ByteCount() + limit_ - prior_bytes_read_; - } else { - return input_->ByteCount() - prior_bytes_read_; - } -} - - // =================================================================== } // namespace io diff --git a/src/google/protobuf/io/zero_copy_stream_impl.h b/src/google/protobuf/io/zero_copy_stream_impl.h index ea8681b69d..f2d26886f7 100644 --- a/src/google/protobuf/io/zero_copy_stream_impl.h +++ b/src/google/protobuf/io/zero_copy_stream_impl.h @@ -327,30 +327,6 @@ class PROTOBUF_EXPORT ConcatenatingInputStream : public ZeroCopyInputStream { // =================================================================== -// A ZeroCopyInputStream which wraps some other stream and limits it to -// a particular byte count. -class PROTOBUF_EXPORT LimitingInputStream : public ZeroCopyInputStream { - public: - LimitingInputStream(ZeroCopyInputStream* input, int64 limit); - ~LimitingInputStream() override; - - // implements ZeroCopyInputStream ---------------------------------- - bool Next(const void** data, int* size) override; - void BackUp(int count) override; - bool Skip(int count) override; - int64 ByteCount() const override; - - - private: - ZeroCopyInputStream* input_; - int64 limit_; // Decreases as we go, becomes negative if we overshoot. - int64 prior_bytes_read_; // Bytes read on underlying stream at construction - - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LimitingInputStream); -}; - -// =================================================================== - } // namespace io } // namespace protobuf } // namespace google diff --git a/src/google/protobuf/io/zero_copy_stream_impl_lite.cc b/src/google/protobuf/io/zero_copy_stream_impl_lite.cc index 7d7b689b13..f5f340f6b9 100644 --- a/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +++ b/src/google/protobuf/io/zero_copy_stream_impl_lite.cc @@ -143,9 +143,7 @@ int64 ArrayOutputStream::ByteCount() const { // =================================================================== -StringOutputStream::StringOutputStream(string* target) - : target_(target) { -} +StringOutputStream::StringOutputStream(std::string* target) : target_(target) {} bool StringOutputStream::Next(void** data, int* size) { GOOGLE_CHECK(target_ != NULL); @@ -190,9 +188,7 @@ int64 StringOutputStream::ByteCount() const { return target_->size(); } -void StringOutputStream::SetString(string* target) { - target_ = target; -} +void StringOutputStream::SetString(std::string* target) { target_ = target; } // =================================================================== @@ -201,7 +197,7 @@ int CopyingInputStream::Skip(int count) { int skipped = 0; while (skipped < count) { int bytes = Read(junk, std::min(count - skipped, - ::google::protobuf::implicit_cast(sizeof(junk)))); + implicit_cast(sizeof(junk)))); if (bytes <= 0) { // EOF or read error. return skipped; @@ -394,6 +390,63 @@ void CopyingOutputStreamAdaptor::FreeBuffer() { buffer_.reset(); } +// =================================================================== + +LimitingInputStream::LimitingInputStream(ZeroCopyInputStream* input, + int64 limit) + : input_(input), limit_(limit) { + prior_bytes_read_ = input_->ByteCount(); +} + +LimitingInputStream::~LimitingInputStream() { + // If we overshot the limit, back up. + if (limit_ < 0) input_->BackUp(-limit_); +} + +bool LimitingInputStream::Next(const void** data, int* size) { + if (limit_ <= 0) return false; + if (!input_->Next(data, size)) return false; + + limit_ -= *size; + if (limit_ < 0) { + // We overshot the limit. Reduce *size to hide the rest of the buffer. + *size += limit_; + } + return true; +} + +void LimitingInputStream::BackUp(int count) { + if (limit_ < 0) { + input_->BackUp(count - limit_); + limit_ = count; + } else { + input_->BackUp(count); + limit_ += count; + } +} + +bool LimitingInputStream::Skip(int count) { + if (count > limit_) { + if (limit_ < 0) return false; + input_->Skip(limit_); + limit_ = 0; + return false; + } else { + if (!input_->Skip(count)) return false; + limit_ -= count; + return true; + } +} + +int64 LimitingInputStream::ByteCount() const { + if (limit_ < 0) { + return input_->ByteCount() + limit_ - prior_bytes_read_; + } else { + return input_->ByteCount() - prior_bytes_read_; + } +} + + // =================================================================== } // namespace io diff --git a/src/google/protobuf/io/zero_copy_stream_impl_lite.h b/src/google/protobuf/io/zero_copy_stream_impl_lite.h index 07d188499e..6c14abcfcc 100644 --- a/src/google/protobuf/io/zero_copy_stream_impl_lite.h +++ b/src/google/protobuf/io/zero_copy_stream_impl_lite.h @@ -341,6 +341,31 @@ class PROTOBUF_EXPORT CopyingOutputStreamAdaptor : public ZeroCopyOutputStream { GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingOutputStreamAdaptor); }; +// =================================================================== + +// A ZeroCopyInputStream which wraps some other stream and limits it to +// a particular byte count. +class PROTOBUF_EXPORT LimitingInputStream : public ZeroCopyInputStream { + public: + LimitingInputStream(ZeroCopyInputStream* input, int64 limit); + ~LimitingInputStream() override; + + // implements ZeroCopyInputStream ---------------------------------- + bool Next(const void** data, int* size) override; + void BackUp(int count) override; + bool Skip(int count) override; + int64 ByteCount() const override; + + + private: + ZeroCopyInputStream* input_; + int64 limit_; // Decreases as we go, becomes negative if we overshoot. + int64 prior_bytes_read_; // Bytes read on underlying stream at construction + + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(LimitingInputStream); +}; + + // =================================================================== // mutable_string_data() and as_string_data() are workarounds to improve @@ -359,13 +384,9 @@ class PROTOBUF_EXPORT CopyingOutputStreamAdaptor : public ZeroCopyOutputStream { // return value is valid until the next time the string is resized. We // trust the caller to treat the return value as an array of length s->size(). inline char* mutable_string_data(std::string* s) { -#ifdef LANG_CXX11 // This should be simpler & faster than string_as_array() because the latter // is guaranteed to return NULL when *s is empty, so it has to check for that. return &(*s)[0]; -#else - return string_as_array(s); -#endif } // as_string_data(s) is equivalent to @@ -374,11 +395,7 @@ inline char* mutable_string_data(std::string* s) { // code can avoid that check. inline std::pair as_string_data(std::string* s) { char *p = mutable_string_data(s); -#ifdef LANG_CXX11 return std::make_pair(p, true); -#else - return std::make_pair(p, p != NULL); -#endif } } // namespace io diff --git a/src/google/protobuf/io/zero_copy_stream_unittest.cc b/src/google/protobuf/io/zero_copy_stream_unittest.cc index 4813206430..8530d73343 100644 --- a/src/google/protobuf/io/zero_copy_stream_unittest.cc +++ b/src/google/protobuf/io/zero_copy_stream_unittest.cc @@ -106,10 +106,10 @@ class IoTest : public testing::Test { // Helper to read a fixed-length array of data from an input stream. int ReadFromInput(ZeroCopyInputStream* input, void* data, int size); // Write a string to the output stream. - void WriteString(ZeroCopyOutputStream* output, const string& str); + void WriteString(ZeroCopyOutputStream* output, const std::string& str); // Read a number of bytes equal to the size of the given string and checks // that it matches the string. - void ReadString(ZeroCopyInputStream* input, const string& str); + void ReadString(ZeroCopyInputStream* input, const std::string& str); // Writes some text to the output stream in a particular order. Returns // the number of bytes written, incase the caller needs that to set up an // input stream. @@ -125,8 +125,9 @@ class IoTest : public testing::Test { void ReadStuffLarge(ZeroCopyInputStream* input); #if HAVE_ZLIB - string Compress(const string& data, const GzipOutputStream::Options& options); - string Uncompress(const string& data); + std::string Compress(const std::string& data, + const GzipOutputStream::Options& options); + std::string Uncompress(const std::string& data); #endif static const int kBlockSizes[]; @@ -199,11 +200,11 @@ int IoTest::ReadFromInput(ZeroCopyInputStream* input, void* data, int size) { } } -void IoTest::WriteString(ZeroCopyOutputStream* output, const string& str) { +void IoTest::WriteString(ZeroCopyOutputStream* output, const std::string& str) { EXPECT_TRUE(WriteToOutput(output, str.c_str(), str.size())); } -void IoTest::ReadString(ZeroCopyInputStream* input, const string& str) { +void IoTest::ReadString(ZeroCopyInputStream* input, const std::string& str) { std::unique_ptr buffer(new char[str.size() + 1]); buffer[str.size()] = '\0'; EXPECT_EQ(ReadFromInput(input, buffer.get(), str.size()), str.size()); @@ -246,8 +247,8 @@ int IoTest::WriteStuffLarge(ZeroCopyOutputStream* output) { WriteString(output, "Hello world!\n"); WriteString(output, "Some te"); WriteString(output, "xt. Blah blah."); - WriteString(output, string(100000, 'x')); // A very long string - WriteString(output, string(100000, 'y')); // A very long string + WriteString(output, std::string(100000, 'x')); // A very long string + WriteString(output, std::string(100000, 'y')); // A very long string WriteString(output, "01234567890123456789"); EXPECT_EQ(output->ByteCount(), 200055); @@ -263,7 +264,7 @@ void IoTest::ReadStuffLarge(ZeroCopyInputStream* input) { EXPECT_TRUE(input->Skip(5)); ReadString(input, "blah."); EXPECT_TRUE(input->Skip(100000 - 10)); - ReadString(input, string(10, 'x') + string(100000 - 20000, 'y')); + ReadString(input, std::string(10, 'x') + std::string(100000 - 20000, 'y')); EXPECT_TRUE(input->Skip(20000 - 10)); ReadString(input, "yyyyyyyyyy01234567890123456789"); @@ -539,9 +540,9 @@ TEST_F(IoTest, ZlibIoInputAutodetect) { delete [] buffer; } -string IoTest::Compress(const string& data, - const GzipOutputStream::Options& options) { - string result; +std::string IoTest::Compress(const std::string& data, + const GzipOutputStream::Options& options) { + std::string result; { StringOutputStream output(&result); GzipOutputStream gzout(&output, options); @@ -550,8 +551,8 @@ string IoTest::Compress(const string& data, return result; } -string IoTest::Uncompress(const string& data) { - string result; +std::string IoTest::Uncompress(const std::string& data) { + std::string result; { ArrayInputStream input(data.data(), data.size()); GzipInputStream gzin(&input); @@ -567,21 +568,21 @@ string IoTest::Uncompress(const string& data) { TEST_F(IoTest, CompressionOptions) { // Some ad-hoc testing of compression options. - string golden_filename = + std::string golden_filename = TestUtil::GetTestDataPath("net/proto2/internal/testdata/golden_message"); - string golden; + std::string golden; GOOGLE_CHECK_OK(File::GetContents(golden_filename, &golden, true)); GzipOutputStream::Options options; - string gzip_compressed = Compress(golden, options); + std::string gzip_compressed = Compress(golden, options); options.compression_level = 0; - string not_compressed = Compress(golden, options); + std::string not_compressed = Compress(golden, options); // Try zlib compression for fun. options = GzipOutputStream::Options(); options.format = GzipOutputStream::ZLIB; - string zlib_compressed = Compress(golden, options); + std::string zlib_compressed = Compress(golden, options); // Uncompressed should be bigger than the original since it should have some // sort of header. @@ -665,8 +666,8 @@ TEST_F(IoTest, TwoSessionWriteGzip) { } TEST_F(IoTest, GzipInputByteCountAfterClosed) { - string golden = "abcdefghijklmnopqrstuvwxyz"; - string compressed = Compress(golden, GzipOutputStream::Options()); + std::string golden = "abcdefghijklmnopqrstuvwxyz"; + std::string compressed = Compress(golden, GzipOutputStream::Options()); for (int i = 0; i < kBlockSizeCount; i++) { ArrayInputStream arr_input(compressed.data(), compressed.size(), @@ -682,11 +683,11 @@ TEST_F(IoTest, GzipInputByteCountAfterClosed) { } TEST_F(IoTest, GzipInputByteCountAfterClosedConcatenatedStreams) { - string golden1 = "abcdefghijklmnopqrstuvwxyz"; - string golden2 = "the quick brown fox jumps over the lazy dog"; + std::string golden1 = "abcdefghijklmnopqrstuvwxyz"; + std::string golden2 = "the quick brown fox jumps over the lazy dog"; const size_t total_size = golden1.size() + golden2.size(); - string compressed = Compress(golden1, GzipOutputStream::Options()) + - Compress(golden2, GzipOutputStream::Options()); + std::string compressed = Compress(golden1, GzipOutputStream::Options()) + + Compress(golden2, GzipOutputStream::Options()); for (int i = 0; i < kBlockSizeCount; i++) { ArrayInputStream arr_input(compressed.data(), compressed.size(), @@ -706,7 +707,7 @@ TEST_F(IoTest, GzipInputByteCountAfterClosedConcatenatedStreams) { // explicit block sizes. So, we'll only run one test and we'll use // ArrayInput to read back the results. TEST_F(IoTest, StringIo) { - string str; + std::string str; { StringOutputStream output(&str); WriteStuff(&output); @@ -720,7 +721,7 @@ TEST_F(IoTest, StringIo) { // To test files, we create a temporary file, write, read, truncate, repeat. TEST_F(IoTest, FileIo) { - string filename = TestTempDir() + "/zero_copy_stream_test_file"; + std::string filename = TestTempDir() + "/zero_copy_stream_test_file"; for (int i = 0; i < kBlockSizeCount; i++) { for (int j = 0; j < kBlockSizeCount; j++) { @@ -751,7 +752,7 @@ TEST_F(IoTest, FileIo) { #if HAVE_ZLIB TEST_F(IoTest, GzipFileIo) { - string filename = TestTempDir() + "/zero_copy_stream_test_file"; + std::string filename = TestTempDir() + "/zero_copy_stream_test_file"; for (int i = 0; i < kBlockSizeCount; i++) { for (int j = 0; j < kBlockSizeCount; j++) { diff --git a/src/google/protobuf/lite_arena_unittest.cc b/src/google/protobuf/lite_arena_unittest.cc index df88d2cc93..d68c6c9bbe 100644 --- a/src/google/protobuf/lite_arena_unittest.cc +++ b/src/google/protobuf/lite_arena_unittest.cc @@ -52,7 +52,7 @@ class LiteArenaTest : public testing::Test { }; TEST_F(LiteArenaTest, MapNoHeapAllocation) { - string data; + std::string data; data.reserve(128 * 1024); { @@ -76,7 +76,7 @@ TEST_F(LiteArenaTest, UnknownFieldMemLeak) { protobuf_unittest::ForeignMessageArenaLite* message = Arena::CreateMessage( arena_.get()); - string data = "\012\000"; + std::string data = "\012\000"; int original_capacity = data.capacity(); while (data.capacity() <= original_capacity) { data.append("a"); diff --git a/src/google/protobuf/lite_unittest.cc b/src/google/protobuf/lite_unittest.cc index 477b368430..008b323fe6 100644 --- a/src/google/protobuf/lite_unittest.cc +++ b/src/google/protobuf/lite_unittest.cc @@ -30,8 +30,8 @@ // Author: kenton@google.com (Kenton Varda) -#include #include +#include #include #include @@ -43,14 +43,8 @@ #include #include #include -#include #include -// When string == std::string inside Google, we can remove this typedef. -#include - -typedef std::string ProtoString; - namespace google { namespace protobuf { @@ -76,7 +70,7 @@ void SetAllTypesInEmptyMessageUnknownFields( protobuf_unittest::TestAllTypesLite message; TestUtilLite::ExpectClear(message); TestUtilLite::SetAllFields(&message); - ProtoString data = message.SerializeAsString(); + std::string data = message.SerializeAsString(); empty_message->ParseFromString(data); } @@ -88,12 +82,12 @@ void SetSomeTypesInEmptyMessageUnknownFields( message.set_optional_int64(102); message.set_optional_uint32(103); message.set_optional_uint64(104); - ProtoString data = message.SerializeAsString(); + std::string data = message.SerializeAsString(); empty_message->ParseFromString(data); } TEST(Lite, AllLite1) { - ProtoString data; + std::string data; { protobuf_unittest::TestAllTypesLite message, message2, message3; @@ -113,13 +107,13 @@ TEST(Lite, AllLite1) { } TEST(Lite, AllLite2) { - ProtoString data; + std::string data; { protobuf_unittest::TestAllExtensionsLite message, message2, message3; TestUtilLite::ExpectExtensionsClear(message); TestUtilLite::SetAllExtensions(&message); message2.CopyFrom(message); - ProtoString extensions_data = message.SerializeAsString(); + std::string extensions_data = message.SerializeAsString(); message3.ParseFromString(extensions_data); TestUtilLite::ExpectAllExtensionsSet(message); TestUtilLite::ExpectAllExtensionsSet(message2); @@ -132,7 +126,7 @@ TEST(Lite, AllLite2) { } TEST(Lite, AllLite3) { - ProtoString data, packed_data; + std::string data, packed_data; { protobuf_unittest::TestPackedTypesLite message, message2, message3; @@ -155,7 +149,7 @@ TEST(Lite, AllLite3) { TestUtilLite::ExpectPackedExtensionsClear(message); TestUtilLite::SetPackedExtensions(&message); message2.CopyFrom(message); - ProtoString packed_extensions_data = message.SerializeAsString(); + std::string packed_extensions_data = message.SerializeAsString(); EXPECT_EQ(packed_extensions_data, packed_data); message3.ParseFromString(packed_extensions_data); TestUtilLite::ExpectPackedExtensionsSet(message); @@ -169,7 +163,7 @@ TEST(Lite, AllLite3) { } TEST(Lite, AllLite5) { - ProtoString data; + std::string data; { // Test that if an optional or required message/group field appears multiple @@ -203,7 +197,7 @@ TEST(Lite, AllLite5) { #undef ASSIGN_REPEATED_GROUP - ProtoString buffer; + std::string buffer; generator.SerializeToString(&buffer); unittest::TestParsingMergeLite parsing_merge; parsing_merge.ParseFromString(buffer); @@ -226,7 +220,7 @@ TEST(Lite, AllLite5) { } TEST(Lite, AllLite6) { - ProtoString data; + std::string data; // Test unknown fields support for lite messages. { @@ -247,7 +241,7 @@ TEST(Lite, AllLite6) { } TEST(Lite, AllLite7) { - ProtoString data; + std::string data; { protobuf_unittest::TestAllExtensionsLite message, message2; @@ -267,7 +261,7 @@ TEST(Lite, AllLite7) { } TEST(Lite, AllLite8) { - ProtoString data; + std::string data; { protobuf_unittest::TestPackedTypesLite message, message2; @@ -287,7 +281,7 @@ TEST(Lite, AllLite8) { } TEST(Lite, AllLite9) { - ProtoString data; + std::string data; { protobuf_unittest::TestPackedExtensionsLite message, message2; @@ -307,7 +301,7 @@ TEST(Lite, AllLite9) { } TEST(Lite, AllLite10) { - ProtoString data; + std::string data; { // Test Unknown fields swap @@ -315,7 +309,7 @@ TEST(Lite, AllLite10) { SetAllTypesInEmptyMessageUnknownFields(&empty_message); SetSomeTypesInEmptyMessageUnknownFields(&empty_message2); data = empty_message.SerializeAsString(); - ProtoString data2 = empty_message2.SerializeAsString(); + std::string data2 = empty_message2.SerializeAsString(); empty_message.Swap(&empty_message2); EXPECT_EQ(data, empty_message2.SerializeAsString()); EXPECT_EQ(data2, empty_message.SerializeAsString()); @@ -323,7 +317,7 @@ TEST(Lite, AllLite10) { } TEST(Lite, AllLite11) { - ProtoString data; + std::string data; { // Test unknown fields swap with self @@ -336,7 +330,7 @@ TEST(Lite, AllLite11) { } TEST(Lite, AllLite12) { - ProtoString data; + std::string data; { // Test MergeFrom with unknown fields @@ -366,12 +360,12 @@ TEST(Lite, AllLite12) { } TEST(Lite, AllLite13) { - ProtoString data; + std::string data; { // Test unknown enum value protobuf_unittest::TestAllTypesLite message; - ProtoString buffer; + std::string buffer; { io::StringOutputStream output_stream(&buffer); io::CodedOutputStream coded_output(&output_stream); @@ -391,7 +385,7 @@ TEST(Lite, AllLite13) { } TEST(Lite, AllLite14) { - ProtoString data; + std::string data; { // Test Clear with unknown fields @@ -405,7 +399,7 @@ TEST(Lite, AllLite14) { // Tests for map lite ============================================= TEST(Lite, AllLite15) { - ProtoString data; + std::string data; { // Accessors @@ -420,7 +414,7 @@ TEST(Lite, AllLite15) { } TEST(Lite, AllLite16) { - ProtoString data; + std::string data; { // SetMapFieldsInitialized @@ -432,7 +426,7 @@ TEST(Lite, AllLite16) { } TEST(Lite, AllLite17) { - ProtoString data; + std::string data; { // Clear @@ -445,7 +439,7 @@ TEST(Lite, AllLite17) { } TEST(Lite, AllLite18) { - ProtoString data; + std::string data; { // ClearMessageMap @@ -458,7 +452,7 @@ TEST(Lite, AllLite18) { } TEST(Lite, AllLite19) { - ProtoString data; + std::string data; { // CopyFrom @@ -475,7 +469,7 @@ TEST(Lite, AllLite19) { } TEST(Lite, AllLite20) { - ProtoString data; + std::string data; { // CopyFromMessageMap @@ -493,7 +487,7 @@ TEST(Lite, AllLite20) { } TEST(Lite, AllLite21) { - ProtoString data; + std::string data; { // SwapWithEmpty @@ -510,7 +504,7 @@ TEST(Lite, AllLite21) { } TEST(Lite, AllLite22) { - ProtoString data; + std::string data; { // SwapWithSelf @@ -525,7 +519,7 @@ TEST(Lite, AllLite22) { } TEST(Lite, AllLite23) { - ProtoString data; + std::string data; { // SwapWithOther @@ -542,7 +536,7 @@ TEST(Lite, AllLite23) { } TEST(Lite, AllLite24) { - ProtoString data; + std::string data; { // CopyConstructor @@ -555,7 +549,7 @@ TEST(Lite, AllLite24) { } TEST(Lite, AllLite25) { - ProtoString data; + std::string data; { // CopyAssignmentOperator @@ -573,7 +567,7 @@ TEST(Lite, AllLite25) { } TEST(Lite, AllLite26) { - ProtoString data; + std::string data; { // NonEmptyMergeFrom @@ -595,7 +589,7 @@ TEST(Lite, AllLite26) { } TEST(Lite, AllLite27) { - ProtoString data; + std::string data; { // MergeFromMessageMap @@ -613,12 +607,12 @@ TEST(Lite, AllLite27) { } TEST(Lite, AllLite28) { - ProtoString data; + std::string data; { // Test the generated SerializeWithCachedSizesToArray() protobuf_unittest::TestMapLite message1, message2; - ProtoString data; + std::string data; MapLiteTestUtil::SetMapFields(&message1); int size = message1.ByteSize(); data.resize(size); @@ -631,14 +625,14 @@ TEST(Lite, AllLite28) { } TEST(Lite, AllLite29) { - ProtoString data; + std::string data; { // Test the generated SerializeWithCachedSizes() protobuf_unittest::TestMapLite message1, message2; MapLiteTestUtil::SetMapFields(&message1); int size = message1.ByteSize(); - ProtoString data; + std::string data; data.resize(size); { // Allow the output stream to buffer only one byte at a time. @@ -655,7 +649,7 @@ TEST(Lite, AllLite29) { TEST(Lite, AllLite32) { - ProtoString data; + std::string data; { // Proto2UnknownEnum @@ -664,7 +658,7 @@ TEST(Lite, AllLite32) { protobuf_unittest::E_PROTO2_MAP_ENUM_FOO_LITE; (*from.mutable_unknown_map_field())[0] = protobuf_unittest::E_PROTO2_MAP_ENUM_EXTRA_LITE; - ProtoString data; + std::string data; from.SerializeToString(&data); protobuf_unittest::TestEnumMapLite to; @@ -689,12 +683,12 @@ TEST(Lite, AllLite32) { } TEST(Lite, AllLite33) { - ProtoString data; + std::string data; { // StandardWireFormat protobuf_unittest::TestMapLite message; - ProtoString data = "\x0A\x04\x08\x01\x10\x01"; + std::string data = "\x0A\x04\x08\x01\x10\x01"; EXPECT_TRUE(message.ParseFromString(data)); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -703,14 +697,14 @@ TEST(Lite, AllLite33) { } TEST(Lite, AllLite34) { - ProtoString data; + std::string data; { // UnorderedWireFormat protobuf_unittest::TestMapLite message; // put value before key in wire format - ProtoString data = "\x0A\x04\x10\x01\x08\x02"; + std::string data = "\x0A\x04\x10\x01\x08\x02"; EXPECT_TRUE(message.ParseFromString(data)); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -721,14 +715,14 @@ TEST(Lite, AllLite34) { } TEST(Lite, AllLite35) { - ProtoString data; + std::string data; { // DuplicatedKeyWireFormat protobuf_unittest::TestMapLite message; // Two key fields in wire format - ProtoString data = "\x0A\x06\x08\x01\x08\x02\x10\x01"; + std::string data = "\x0A\x06\x08\x01\x08\x02\x10\x01"; EXPECT_TRUE(message.ParseFromString(data)); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -737,14 +731,14 @@ TEST(Lite, AllLite35) { } TEST(Lite, AllLite36) { - ProtoString data; + std::string data; { // DuplicatedValueWireFormat protobuf_unittest::TestMapLite message; // Two value fields in wire format - ProtoString data = "\x0A\x06\x08\x01\x10\x01\x10\x02"; + std::string data = "\x0A\x06\x08\x01\x10\x01\x10\x02"; EXPECT_TRUE(message.ParseFromString(data)); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -753,14 +747,14 @@ TEST(Lite, AllLite36) { } TEST(Lite, AllLite37) { - ProtoString data; + std::string data; { // MissedKeyWireFormat protobuf_unittest::TestMapLite message; // No key field in wire format - ProtoString data = "\x0A\x02\x10\x01"; + std::string data = "\x0A\x02\x10\x01"; EXPECT_TRUE(message.ParseFromString(data)); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -771,14 +765,14 @@ TEST(Lite, AllLite37) { } TEST(Lite, AllLite38) { - ProtoString data; + std::string data; { // MissedValueWireFormat protobuf_unittest::TestMapLite message; // No value field in wire format - ProtoString data = "\x0A\x02\x08\x01"; + std::string data = "\x0A\x02\x08\x01"; EXPECT_TRUE(message.ParseFromString(data)); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -789,14 +783,14 @@ TEST(Lite, AllLite38) { } TEST(Lite, AllLite39) { - ProtoString data; + std::string data; { // UnknownFieldWireFormat protobuf_unittest::TestMapLite message; // Unknown field in wire format - ProtoString data = "\x0A\x06\x08\x02\x10\x03\x18\x01"; + std::string data = "\x0A\x06\x08\x02\x10\x03\x18\x01"; EXPECT_TRUE(message.ParseFromString(data)); ASSERT_EQ(1, message.map_int32_int32().size()); @@ -805,21 +799,21 @@ TEST(Lite, AllLite39) { } TEST(Lite, AllLite40) { - ProtoString data; + std::string data; { // CorruptedWireFormat protobuf_unittest::TestMapLite message; // corrupted data in wire format - ProtoString data = "\x0A\x06\x08\x02\x11\x03"; + std::string data = "\x0A\x06\x08\x02\x11\x03"; EXPECT_FALSE(message.ParseFromString(data)); } } TEST(Lite, AllLite41) { - ProtoString data; + std::string data; { // IsInitialized @@ -838,7 +832,7 @@ TEST(Lite, AllLite41) { } TEST(Lite, AllLite42) { - ProtoString data; + std::string data; { // Check that adding more values to enum does not corrupt message @@ -847,7 +841,7 @@ TEST(Lite, AllLite42) { v2_message.set_int_field(800); // Set enum field to the value not understood by the old client. v2_message.set_enum_field(protobuf_unittest::V2_SECOND); - ProtoString v2_bytes = v2_message.SerializeAsString(); + std::string v2_bytes = v2_message.SerializeAsString(); protobuf_unittest::V1MessageLite v1_message; v1_message.ParseFromString(v2_bytes); @@ -858,7 +852,7 @@ TEST(Lite, AllLite42) { EXPECT_EQ(v1_message.enum_field(), protobuf_unittest::V1_FIRST); // However, when re-serialized, it should preserve enum value. - ProtoString v1_bytes = v1_message.SerializeAsString(); + std::string v1_bytes = v1_message.SerializeAsString(); protobuf_unittest::V2MessageLite same_v2_message; same_v2_message.ParseFromString(v1_bytes); @@ -874,7 +868,7 @@ TEST(Lite, AllLite43) { protobuf_unittest::TestOneofParsingLite message1; message1.set_oneof_int32(17); - ProtoString serialized; + std::string serialized; EXPECT_TRUE(message1.SerializeToString(&serialized)); // Submessage @@ -916,7 +910,7 @@ TEST(Lite, AllLite44) { { protobuf_unittest::TestOneofParsingLite original; original.set_oneof_int32(17); - ProtoString serialized; + std::string serialized; EXPECT_TRUE(original.SerializeToString(&serialized)); protobuf_unittest::TestOneofParsingLite parsed; for (int i = 0; i < 2; ++i) { @@ -932,7 +926,7 @@ TEST(Lite, AllLite44) { { protobuf_unittest::TestOneofParsingLite original; original.mutable_oneof_submessage()->set_optional_int32(5); - ProtoString serialized; + std::string serialized; EXPECT_TRUE(original.SerializeToString(&serialized)); protobuf_unittest::TestOneofParsingLite parsed; for (int i = 0; i < 2; ++i) { @@ -948,7 +942,7 @@ TEST(Lite, AllLite44) { { protobuf_unittest::TestOneofParsingLite original; original.set_oneof_string("string"); - ProtoString serialized; + std::string serialized; EXPECT_TRUE(original.SerializeToString(&serialized)); protobuf_unittest::TestOneofParsingLite parsed; for (int i = 0; i < 2; ++i) { @@ -964,7 +958,7 @@ TEST(Lite, AllLite44) { { protobuf_unittest::TestOneofParsingLite original; original.set_oneof_bytes("bytes"); - ProtoString serialized; + std::string serialized; EXPECT_TRUE(original.SerializeToString(&serialized)); protobuf_unittest::TestOneofParsingLite parsed; for (int i = 0; i < 2; ++i) { @@ -980,7 +974,7 @@ TEST(Lite, AllLite44) { { protobuf_unittest::TestOneofParsingLite original; original.set_oneof_enum(protobuf_unittest::V2_SECOND); - ProtoString serialized; + std::string serialized; EXPECT_TRUE(original.SerializeToString(&serialized)); protobuf_unittest::TestOneofParsingLite parsed; for (int i = 0; i < 2; ++i) { @@ -997,7 +991,7 @@ TEST(Lite, AllLite44) { TEST(Lite, AllLite45) { // Test unknown fields are not discarded upon parsing. - ProtoString data = "\20\1"; // varint 1 with field number 2 + std::string data = "\20\1"; // varint 1 with field number 2 protobuf_unittest::ForeignMessageLite a; EXPECT_TRUE(a.ParseFromString(data)); @@ -1005,7 +999,7 @@ TEST(Lite, AllLite45) { reinterpret_cast(data.data()), data.size()); EXPECT_TRUE(a.MergePartialFromCodedStream(&input_stream)); - ProtoString serialized = a.SerializeAsString(); + std::string serialized = a.SerializeAsString(); EXPECT_EQ(serialized.substr(0, 2), data); EXPECT_EQ(serialized.substr(2), data); } @@ -1020,7 +1014,7 @@ TEST(Lite, AllLite45) { TEST(Lite, AllLite46) { protobuf_unittest::PackedInt32 packed; packed.add_repeated_int32(42); - ProtoString serialized; + std::string serialized; ASSERT_TRUE(packed.SerializeToString(&serialized)); protobuf_unittest::NonPackedInt32 non_packed; @@ -1032,7 +1026,7 @@ TEST(Lite, AllLite46) { TEST(Lite, AllLite47) { protobuf_unittest::NonPackedFixed32 non_packed; non_packed.add_repeated_fixed32(42); - ProtoString serialized; + std::string serialized; ASSERT_TRUE(non_packed.SerializeToString(&serialized)); protobuf_unittest::PackedFixed32 packed; @@ -1045,9 +1039,9 @@ TEST(Lite, MapCrash) { // See b/113635730 Arena arena; auto msg = Arena::CreateMessage(&arena); - // Payload for the map with a enum varint that's longer > 10 - // bytes. This causes a parse fail and a subsequent delete. - // field 16 (map) tag = 128+2 = \202 \1 + // Payload for the map with a enum varint that's longer > + // 10 bytes. This causes a parse fail and a subsequent delete. field 16 + // (map) tag = 128+2 = \202 \1 // 13 long \15 // int32 key = 1 (\10 \1) // MapEnumLite value = too long varint (parse error) diff --git a/src/google/protobuf/map_entry.h b/src/google/protobuf/map_entry.h index fbc792f39a..666266dacc 100644 --- a/src/google/protobuf/map_entry.h +++ b/src/google/protobuf/map_entry.h @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include diff --git a/src/google/protobuf/map_entry_lite.h b/src/google/protobuf/map_entry_lite.h index 5ebc82a7b8..19f0b5fcb5 100644 --- a/src/google/protobuf/map_entry_lite.h +++ b/src/google/protobuf/map_entry_lite.h @@ -39,11 +39,11 @@ #include #include #include +#include #include #include #include #include -#include #include #ifdef SWIG @@ -191,7 +191,7 @@ class MapEntryImpl : public Base { std::string GetTypeName() const override { return ""; } void CheckTypeAndMergeFrom(const MessageLite& other) override { - MergeFromInternal(*::google::protobuf::down_cast(&other)); + MergeFromInternal(*::google::protobuf::internal::DownCast(&other)); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER @@ -203,9 +203,11 @@ class MapEntryImpl : public Base { if (tag == kKeyTag) { set_has_key(); ptr = KeyTypeHandler::Read(ptr, ctx, mutable_key()); + if (!::down_cast(this)->ValidateKey()) return nullptr; } else if (tag == kValueTag) { set_has_value(); ptr = ValueTypeHandler::Read(ptr, ctx, mutable_value()); + if (!::down_cast(this)->ValidateValue()) return nullptr; } else { if (tag == 0 || WireFormatLite::GetTagWireType(tag) == WireFormatLite::WIRETYPE_END_GROUP) { @@ -416,10 +418,27 @@ class MapEntryImpl : public Base { const char* _InternalParse(const char* ptr, ParseContext* ctx) { auto entry = NewEntry(); ptr = entry->_InternalParse(ptr, ctx); + if (!ptr) return nullptr; UseKeyAndValueFromEntry(); return ptr; } + template + const char* ParseWithEnumValidation(const char* ptr, ParseContext* ctx, + bool (*is_valid)(int), uint32 field_num, + Metadata* metadata) { + auto entry = NewEntry(); + ptr = entry->_InternalParse(ptr, ctx); + if (!ptr) return nullptr; + if (is_valid(entry->value())) { + UseKeyAndValueFromEntry(); + } else { + WriteLengthDelimited(field_num, entry->SerializeAsString(), + metadata->mutable_unknown_fields()); + } + return ptr; + } + MapEntryImpl* NewEntry() { return entry_ = mf_->NewEntry(); } const Key& key() const { return key_; } @@ -644,7 +663,7 @@ template <> struct FromHelper { static ArenaStringPtr From(const std::string& x) { ArenaStringPtr res; - TaggedPtr<::std::string> ptr; + TaggedPtr ptr; ptr.Set(const_cast(&x)); res.UnsafeSetTaggedPointer(ptr); return res; @@ -654,7 +673,7 @@ template <> struct FromHelper { static ArenaStringPtr From(const std::string& x) { ArenaStringPtr res; - TaggedPtr<::std::string> ptr; + TaggedPtr ptr; ptr.Set(const_cast(&x)); res.UnsafeSetTaggedPointer(ptr); return res; diff --git a/src/google/protobuf/map_field.cc b/src/google/protobuf/map_field.cc index 8c86a6b0c0..a0c96df7ed 100644 --- a/src/google/protobuf/map_field.cc +++ b/src/google/protobuf/map_field.cc @@ -218,7 +218,7 @@ void DynamicMapField::AllocateMapValue(MapValueRef* map_val) { HANDLE_TYPE(DOUBLE, double); HANDLE_TYPE(FLOAT, float); HANDLE_TYPE(BOOL, bool); - HANDLE_TYPE(STRING, string); + HANDLE_TYPE(STRING, std::string); HANDLE_TYPE(ENUM, int32); #undef HANDLE_TYPE case FieldDescriptor::CPPTYPE_MESSAGE: { @@ -514,7 +514,7 @@ void DynamicMapField::SyncMapWithRepeatedFieldNoLock() const { HANDLE_TYPE(DOUBLE, double, Double); HANDLE_TYPE(FLOAT, float, Float); HANDLE_TYPE(BOOL, bool, Bool); - HANDLE_TYPE(STRING, string, String); + HANDLE_TYPE(STRING, std::string, String); HANDLE_TYPE(ENUM, int32, EnumValue); #undef HANDLE_TYPE case FieldDescriptor::CPPTYPE_MESSAGE: { @@ -541,7 +541,7 @@ size_t DynamicMapField::SpaceUsedExcludingSelfNoLock() const { size += sizeof(it->second) * map_size; // If key is string, add the allocated space. if (it->first.type() == FieldDescriptor::CPPTYPE_STRING) { - size += sizeof(string) * map_size; + size += sizeof(std::string) * map_size; } // Add the allocated space in MapValueRef. switch (it->second.type()) { @@ -557,7 +557,7 @@ size_t DynamicMapField::SpaceUsedExcludingSelfNoLock() const { HANDLE_TYPE(DOUBLE, double); HANDLE_TYPE(FLOAT, float); HANDLE_TYPE(BOOL, bool); - HANDLE_TYPE(STRING, string); + HANDLE_TYPE(STRING, std::string); HANDLE_TYPE(ENUM, int32); #undef HANDLE_TYPE case FieldDescriptor::CPPTYPE_MESSAGE: { diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h index 91be9669c9..c60510e506 100644 --- a/src/google/protobuf/map_field.h +++ b/src/google/protobuf/map_field.h @@ -291,6 +291,13 @@ class MapField : public TypeDefinedMapFieldBase { const char* _InternalParse(const char* ptr, ParseContext* ctx) { return impl_._InternalParse(ptr, ctx); } + template + const char* ParseWithEnumValidation(const char* ptr, ParseContext* ctx, + bool (*is_valid)(int), uint32 field_num, + Metadata* metadata) { + return impl_.ParseWithEnumValidation(ptr, ctx, is_valid, field_num, + metadata); + } private: MapFieldLiteType impl_; @@ -832,13 +839,13 @@ struct hash<::PROTOBUF_NAMESPACE_ID::MapKey> { case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_STRING: return hash()(map_key.GetStringValue()); case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_INT64: - return hash<::google::protobuf::int64>()(map_key.GetInt64Value()); + return hash()(map_key.GetInt64Value()); case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_INT32: - return hash<::google::protobuf::int32>()(map_key.GetInt32Value()); + return hash()(map_key.GetInt32Value()); case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_UINT64: - return hash<::google::protobuf::uint64>()(map_key.GetUInt64Value()); + return hash()(map_key.GetUInt64Value()); case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_UINT32: - return hash<::google::protobuf::uint32>()(map_key.GetUInt32Value()); + return hash()(map_key.GetUInt32Value()); case ::PROTOBUF_NAMESPACE_ID::FieldDescriptor::CPPTYPE_BOOL: return hash()(map_key.GetBoolValue()); } diff --git a/src/google/protobuf/map_field_inl.h b/src/google/protobuf/map_field_inl.h index 1e2fa496eb..85d5b03890 100644 --- a/src/google/protobuf/map_field_inl.h +++ b/src/google/protobuf/map_field_inl.h @@ -68,7 +68,7 @@ template<> inline bool UnwrapMapKey(const MapKey& map_key) { return map_key.GetBoolValue(); } -template<> +template <> inline std::string UnwrapMapKey(const MapKey& map_key) { return map_key.GetStringValue(); } @@ -96,7 +96,7 @@ template<> inline void SetMapKey(MapKey* map_key, const bool& value) { map_key->SetBoolValue(value); } -template<> +template <> inline void SetMapKey(MapKey* map_key, const std::string& value) { map_key->SetStringValue(value); } diff --git a/src/google/protobuf/map_field_lite.h b/src/google/protobuf/map_field_lite.h index 4e5f898779..bef21406d8 100644 --- a/src/google/protobuf/map_field_lite.h +++ b/src/google/protobuf/map_field_lite.h @@ -114,6 +114,15 @@ class MapFieldLite { return parser._InternalParse(ptr, ctx); } + template + const char* ParseWithEnumValidation(const char* ptr, ParseContext* ctx, + bool (*is_valid)(int), uint32 field_num, + Metadata* metadata) { + typename Derived::template Parser> parser(this); + return parser.ParseWithEnumValidation(ptr, ctx, is_valid, field_num, + metadata); + } + private: typedef void DestructorSkippable_; @@ -123,6 +132,30 @@ class MapFieldLite { friend class ::PROTOBUF_NAMESPACE_ID::Arena; }; +template +struct EnumParseWrapper { + const char* _InternalParse(const char* ptr, ParseContext* ctx) { + return map_field->ParseWithEnumValidation(ptr, ctx, is_valid, field_num, + metadata); + } + T* map_field; + bool (*is_valid)(int); + uint32 field_num; + Metadata* metadata; +}; + +// Helper function because the typenames of maps are horrendous to print. This +// leverages compiler type deduction, to keep all type data out of the +// generated code +template +EnumParseWrapper InitEnumParseWrapper(T* map_field, + bool (*is_valid)(int), + uint32 field_num, + Metadata* metadata) { + return EnumParseWrapper{map_field, is_valid, field_num, + metadata}; +} + // True if IsInitialized() is true for value field in all elements of t. T is // expected to be message. It's useful to have this helper here to keep the // protobuf compiler from ever having to emit loops in IsInitialized() methods. diff --git a/src/google/protobuf/map_field_test.cc b/src/google/protobuf/map_field_test.cc index 731d57800a..ecb25f4bcd 100644 --- a/src/google/protobuf/map_field_test.cc +++ b/src/google/protobuf/map_field_test.cc @@ -43,7 +43,6 @@ #include #include #include -#include #include namespace google { diff --git a/src/google/protobuf/map_test.cc b/src/google/protobuf/map_test.cc index 1cb133829b..137a4d8dd8 100644 --- a/src/google/protobuf/map_test.cc +++ b/src/google/protobuf/map_test.cc @@ -69,7 +69,6 @@ #include #include #include -#include #include #include #include @@ -996,13 +995,13 @@ static int Func(int i, int j) { return i * j; } -static string StrFunc(int i, int j) { - string str; +static std::string StrFunc(int i, int j) { + std::string str; SStringPrintf(&str, "%d", Func(i, j)); return str; } -static int Int(const string& value) { +static int Int(const std::string& value) { int result = 0; std::istringstream(value) >> result; return result; @@ -1025,7 +1024,8 @@ TEST_F(MapFieldReflectionTest, RegularFields) { Map* map_int32_int32 = message.mutable_map_int32_int32(); Map* map_int32_double = message.mutable_map_int32_double(); - Map* map_string_string = message.mutable_map_string_string(); + Map* map_string_string = + message.mutable_map_string_string(); Map* map_int32_foreign_message = message.mutable_map_int32_foreign_message(); @@ -1106,10 +1106,10 @@ TEST_F(MapFieldReflectionTest, RegularFields) { EXPECT_EQ(value_int32_double, Func(key_int32_double, 2)); const Message& message_string_string = mf_string_string.Get(i); - string key_string_string = + std::string key_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_key); - string value_string_string = + std::string value_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_value); EXPECT_EQ(value_string_string, StrFunc(Int(key_string_string), 5)); @@ -1143,10 +1143,10 @@ TEST_F(MapFieldReflectionTest, RegularFields) { EXPECT_EQ(value_int32_double, Func(key_int32_double, 2)); const Message& message_string_string = mmf_string_string->Get(i); - string key_string_string = + std::string key_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_key); - string value_string_string = + std::string value_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_value); EXPECT_EQ(value_string_string, StrFunc(Int(key_string_string), 5)); @@ -1181,7 +1181,7 @@ TEST_F(MapFieldReflectionTest, RegularFields) { Func(key_int32_double, -2)); Message* message_string_string = mmf_string_string->Mutable(i); - string key_string_string = + std::string key_string_string = message_string_string->GetReflection()->GetString( *message_string_string, fd_map_string_string_key); message_string_string->GetReflection()->SetString( @@ -1216,7 +1216,8 @@ TEST_F(MapFieldReflectionTest, RepeatedFieldRefForRegularFields) { Map* map_int32_int32 = message.mutable_map_int32_int32(); Map* map_int32_double = message.mutable_map_int32_double(); - Map* map_string_string = message.mutable_map_string_string(); + Map* map_string_string = + message.mutable_map_string_string(); Map* map_int32_foreign_message = message.mutable_map_int32_foreign_message(); @@ -1335,10 +1336,10 @@ TEST_F(MapFieldReflectionTest, RepeatedFieldRefForRegularFields) { const Message& message_string_string = mf_string_string.Get(i, entry_string_string.get()); - string key_string_string = + std::string key_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_key); - string value_string_string = + std::string value_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_value); EXPECT_EQ(value_string_string, StrFunc(Int(key_string_string), 5)); @@ -1376,10 +1377,10 @@ TEST_F(MapFieldReflectionTest, RepeatedFieldRefForRegularFields) { const Message& message_string_string = mmf_string_string.Get(i, entry_string_string.get()); - string key_string_string = + std::string key_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_key); - string value_string_string = + std::string value_string_string = message_string_string.GetReflection()->GetString( message_string_string, fd_map_string_string_value); EXPECT_EQ(value_string_string, StrFunc(Int(key_string_string), 5)); @@ -1489,19 +1490,20 @@ TEST_F(MapFieldReflectionTest, RepeatedFieldRefForRegularFields) { { int index = 0; - std::unordered_map result; + std::unordered_map result; for (RepeatedFieldRef::iterator it = mf_string_string.begin(); it != mf_string_string.end(); ++it) { const Message& message = *it; - string key = + std::string key = message.GetReflection()->GetString(message, fd_map_string_string_key); - string value = message.GetReflection()->GetString( + std::string value = message.GetReflection()->GetString( message, fd_map_string_string_value); result[key] = value; ++index; } EXPECT_EQ(10, index); - for (std::unordered_map::const_iterator it = result.begin(); + for (std::unordered_map::const_iterator it = + result.begin(); it != result.end(); ++it) { EXPECT_EQ(message.map_string_string().at(it->first), it->second); } @@ -1645,22 +1647,22 @@ TEST_F(MapFieldReflectionTest, RepeatedFieldRefForRegularFields) { { const Message& message0a = mmf_string_string.Get(0, entry_string_string.get()); - string string_value0a = message0a.GetReflection()->GetString( + std::string string_value0a = message0a.GetReflection()->GetString( message0a, fd_map_string_string_value); const Message& message9a = mmf_string_string.Get(9, entry_string_string.get()); - string string_value9a = message9a.GetReflection()->GetString( + std::string string_value9a = message9a.GetReflection()->GetString( message9a, fd_map_string_string_value); mmf_string_string.SwapElements(0, 9); const Message& message0b = mmf_string_string.Get(0, entry_string_string.get()); - string string_value0b = message0b.GetReflection()->GetString( + std::string string_value0b = message0b.GetReflection()->GetString( message0b, fd_map_string_string_value); const Message& message9b = mmf_string_string.Get(9, entry_string_string.get()); - string string_value9b = message9b.GetReflection()->GetString( + std::string string_value9b = message9b.GetReflection()->GetString( message9b, fd_map_string_string_value); EXPECT_EQ(string_value9a, string_value0b); @@ -1996,7 +1998,7 @@ TEST(GeneratedMapFieldTest, UpcastCopyFrom) { MapTestUtil::SetMapFields(&message1); - const Message* source = ::google::protobuf::implicit_cast(&message1); + const Message* source = implicit_cast(&message1); message2.CopyFrom(*source); MapTestUtil::ExpectMapFieldsSet(message2); @@ -2069,7 +2071,7 @@ TEST(GeneratedMapFieldTest, DynamicMessageMergeFromDynamicMessage) { // Test MergeFrom does not sync to repeated fields and // there is no duplicate keys in text format. - string output1, output2, output3; + std::string output1, output2, output3; TextFormat::PrintToString(*message1, &output1); TextFormat::PrintToString(*message2, &output2); TextFormat::PrintToString(*message3, &output3); @@ -2150,7 +2152,7 @@ TEST(GeneratedMapFieldTest, NonEmptyMergeFrom) { message2.MergeFrom(message1); - string output1, output2; + std::string output1, output2; TextFormat::PrintToString(message1, &output1); TextFormat::PrintToString(message2, &output2); EXPECT_EQ(output1, output2); @@ -2172,7 +2174,7 @@ TEST(GeneratedMapFieldTest, MergeFromMessageMap) { // Test the generated SerializeWithCachedSizesToArray() TEST(GeneratedMapFieldTest, SerializationToArray) { unittest::TestMap message1, message2; - string data; + std::string data; MapTestUtil::SetMapFields(&message1); int size = message1.ByteSize(); data.resize(size); @@ -2188,7 +2190,7 @@ TEST(GeneratedMapFieldTest, SerializationToStream) { unittest::TestMap message1, message2; MapTestUtil::SetMapFields(&message1); int size = message1.ByteSize(); - string data; + std::string data; data.resize(size); { // Allow the output stream to buffer only one byte at a time. @@ -2224,7 +2226,7 @@ TEST(GeneratedMapFieldTest, Proto2UnknownEnum) { unittest::TestEnumMapPlusExtra from; (*from.mutable_known_map_field())[0] = unittest::E_PROTO2_MAP_ENUM_FOO; (*from.mutable_unknown_map_field())[0] = unittest::E_PROTO2_MAP_ENUM_EXTRA; - string data; + std::string data; from.SerializeToString(&data); unittest::TestEnumMap to; @@ -2249,7 +2251,7 @@ TEST(GeneratedMapFieldTest, Proto2UnknownEnum) { TEST(GeneratedMapFieldTest, StandardWireFormat) { unittest::TestMap message; - string data = "\x0A\x04\x08\x01\x10\x01"; + std::string data = "\x0A\x04\x08\x01\x10\x01"; EXPECT_TRUE(message.ParseFromString(data)); EXPECT_EQ(1, message.map_int32_int32().size()); @@ -2260,7 +2262,7 @@ TEST(GeneratedMapFieldTest, UnorderedWireFormat) { unittest::TestMap message; // put value before key in wire format - string data = "\x0A\x04\x10\x01\x08\x02"; + std::string data = "\x0A\x04\x10\x01\x08\x02"; EXPECT_TRUE(message.ParseFromString(data)); EXPECT_EQ(1, message.map_int32_int32().size()); @@ -2272,7 +2274,7 @@ TEST(GeneratedMapFieldTest, DuplicatedKeyWireFormat) { unittest::TestMap message; // Two key fields in wire format - string data = "\x0A\x06\x08\x01\x08\x02\x10\x01"; + std::string data = "\x0A\x06\x08\x01\x08\x02\x10\x01"; EXPECT_TRUE(message.ParseFromString(data)); EXPECT_EQ(1, message.map_int32_int32().size()); @@ -2289,14 +2291,14 @@ TEST(GeneratedMapFieldTest, DuplicatedKeyWireFormat) { with_dummy4.set_c(0); with_dummy4.set_dummy4(11); (*map_message.mutable_map_field())[key] = with_dummy4; - string s = map_message.SerializeAsString(); + std::string s = map_message.SerializeAsString(); unittest::TestRequired with_dummy5; with_dummy5.set_a(0); with_dummy5.set_b(0); with_dummy5.set_c(0); with_dummy5.set_dummy5(12); (*map_message.mutable_map_field())[key] = with_dummy5; - string both = s + map_message.SerializeAsString(); + std::string both = s + map_message.SerializeAsString(); // We don't expect a merge now. The "second one wins." ASSERT_TRUE(map_message.ParseFromString(both)); ASSERT_EQ(1, map_message.map_field().size()); @@ -2320,7 +2322,7 @@ TEST(GeneratedMapFieldTest, KeysValuesUnknownsWireFormat) { const char kValueTag = 0x10; const char kJunkTag = 0x20; for (int items = 0; items <= kMaxNumKeysAndValuesAndJunk; items++) { - string data = "\x0A"; + std::string data = "\x0A"; // Encode length of what will follow. data.push_back(items * 2); static const int kBitsOfIPerItem = 4; @@ -2328,7 +2330,7 @@ TEST(GeneratedMapFieldTest, KeysValuesUnknownsWireFormat) { // Each iteration of the following is a test. It uses i as bit vector // encoding the keys and values to put in the wire format. for (int i = 0; i < (1 << (items * kBitsOfIPerItem)); i++) { - string wire_format = data; + std::string wire_format = data; int expected_key = 0; int expected_value = 0; for (int k = i, j = 0; j < items; j++, k >>= kBitsOfIPerItem) { @@ -2364,7 +2366,7 @@ TEST(GeneratedMapFieldTest, DuplicatedValueWireFormat) { unittest::TestMap message; // Two value fields in wire format - string data = "\x0A\x06\x08\x01\x10\x01\x10\x02"; + std::string data = "\x0A\x06\x08\x01\x10\x01\x10\x02"; EXPECT_TRUE(message.ParseFromString(data)); EXPECT_EQ(1, message.map_int32_int32().size()); @@ -2375,7 +2377,7 @@ TEST(GeneratedMapFieldTest, MissedKeyWireFormat) { unittest::TestMap message; // No key field in wire format - string data = "\x0A\x02\x10\x01"; + std::string data = "\x0A\x02\x10\x01"; EXPECT_TRUE(message.ParseFromString(data)); EXPECT_EQ(1, message.map_int32_int32().size()); @@ -2387,7 +2389,7 @@ TEST(GeneratedMapFieldTest, MissedValueWireFormat) { unittest::TestMap message; // No value field in wire format - string data = "\x0A\x02\x08\x01"; + std::string data = "\x0A\x02\x08\x01"; EXPECT_TRUE(message.ParseFromString(data)); EXPECT_EQ(1, message.map_int32_int32().size()); @@ -2399,7 +2401,7 @@ TEST(GeneratedMapFieldTest, MissedValueTextFormat) { unittest::TestMap message; // No value field in text format - string text = + std::string text = "map_int32_foreign_message {\n" " key: 1234567890\n" "}"; @@ -2413,7 +2415,7 @@ TEST(GeneratedMapFieldTest, UnknownFieldWireFormat) { unittest::TestMap message; // Unknown field in wire format - string data = "\x0A\x06\x08\x02\x10\x03\x18\x01"; + std::string data = "\x0A\x06\x08\x02\x10\x03\x18\x01"; EXPECT_TRUE(message.ParseFromString(data)); EXPECT_EQ(1, message.map_int32_int32().size()); @@ -2424,7 +2426,7 @@ TEST(GeneratedMapFieldTest, CorruptedWireFormat) { unittest::TestMap message; // corrupted data in wire format - string data = "\x0A\x06\x08\x02\x11\x03"; + std::string data = "\x0A\x06\x08\x02\x11\x03"; EXPECT_FALSE(message.ParseFromString(data)); } @@ -2454,14 +2456,14 @@ TEST(GeneratedMapFieldTest, MessagesMustMerge) { EXPECT_TRUE(with_dummy4.IsInitialized()); (*map_message.mutable_map_field())[0] = with_dummy4; EXPECT_TRUE(map_message.IsInitialized()); - string s = map_message.SerializeAsString(); + std::string s = map_message.SerializeAsString(); // Modify s so that there are two values in the entry for key 0. // The first will have no value for c. The second will have no value for a. // Those are required fields. Also, make some other little changes, to // ensure we are merging the two values (because they're messages). ASSERT_EQ(s.size() - 2, s[1]); // encoding of the length of what follows - string encoded_val(s.data() + 4, s.data() + s.size()); + std::string encoded_val(s.data() + 4, s.data() + s.size()); // In s, change the encoding of c to an encoding of dummy32. s[s.size() - 3] -= 8; // Make encoded_val slightly different from what's in s. @@ -2830,7 +2832,7 @@ TEST_F(MapFieldInDynamicMessageTest, MapSpaceUsed) { TEST_F(MapFieldInDynamicMessageTest, RecursiveMap) { TestRecursiveMapMessage from; (*from.mutable_a())[""]; - string data = from.SerializeAsString(); + std::string data = from.SerializeAsString(); std::unique_ptr to( factory_.GetPrototype(recursive_map_descriptor_)->New()); ASSERT_TRUE(to->ParseFromString(data)); @@ -2853,7 +2855,7 @@ TEST_F(MapFieldInDynamicMessageTest, MapValueReferernceValidAfterSerialize) { // In previous implementation, calling SerializeToString will cause syncing // from map to repeated field, which will invalidate the submsg we previously // got. - string data; + std::string data; message->SerializeToString(&data); const Reflection* submsg_reflection = submsg->GetReflection(); @@ -2885,7 +2887,7 @@ TEST_F(MapFieldInDynamicMessageTest, MapEntryReferernceValidAfterSerialize) { // In previous implementation, calling SerializeToString will cause syncing // from repeated field to map, which will invalidate the map_entry we // previously got. - string data; + std::string data; message->SerializeToString(&data); const Reflection* submsg_reflection = submsg->GetReflection(); @@ -2979,7 +2981,7 @@ TEST(ReflectionOpsForMapFieldTest, IsInitialized) { TEST(WireFormatForMapFieldTest, ParseMap) { unittest::TestMap source, dest; - string data; + std::string data; // Serialize using the generated code. MapTestUtil::SetMapFields(&source); @@ -3006,8 +3008,8 @@ TEST(WireFormatForMapFieldTest, MapByteSize) { TEST(WireFormatForMapFieldTest, SerializeMap) { unittest::TestMap message; - string generated_data; - string dynamic_data; + std::string generated_data; + std::string dynamic_data; MapTestUtil::SetMapFields(&message); @@ -3049,8 +3051,8 @@ TEST(WireFormatForMapFieldTest, SerializeMapDynamicMessage) { MapTestUtil::SetMapFields(&generated_message); MapTestUtil::ExpectMapFieldsSet(generated_message); - string generated_data; - string dynamic_data; + std::string generated_data; + std::string dynamic_data; // Serialize. generated_message.SerializeToString(&generated_data); @@ -3063,7 +3065,7 @@ TEST(WireFormatForMapFieldTest, SerializeMapDynamicMessage) { } TEST(WireFormatForMapFieldTest, MapParseHelpers) { - string data; + std::string data; { // Set up. @@ -3090,7 +3092,7 @@ TEST(WireFormatForMapFieldTest, MapParseHelpers) { { // Test ParseFromBoundedZeroCopyStream. - string data_with_junk(data); + std::string data_with_junk(data); data_with_junk.append("some junk on the end"); io::ArrayInputStream stream(data_with_junk.data(), data_with_junk.size()); protobuf_unittest::TestMap message; @@ -3111,10 +3113,10 @@ TEST(WireFormatForMapFieldTest, MapParseHelpers) { // Deterministic Serialization Test ========================================== template -static string DeterministicSerializationWithSerializePartialToCodedStream( +static std::string DeterministicSerializationWithSerializePartialToCodedStream( const T& t) { const int size = t.ByteSize(); - string result(size, '\0'); + std::string result(size, '\0'); io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&result), size); io::CodedOutputStream output_stream(&array_stream); output_stream.SetSerializationDeterministic(true); @@ -3125,9 +3127,10 @@ static string DeterministicSerializationWithSerializePartialToCodedStream( } template -static string DeterministicSerializationWithSerializeToCodedStream(const T& t) { +static std::string DeterministicSerializationWithSerializeToCodedStream( + const T& t) { const int size = t.ByteSize(); - string result(size, '\0'); + std::string result(size, '\0'); io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&result), size); io::CodedOutputStream output_stream(&array_stream); output_stream.SetSerializationDeterministic(true); @@ -3138,9 +3141,9 @@ static string DeterministicSerializationWithSerializeToCodedStream(const T& t) { } template -static string DeterministicSerialization(const T& t) { +static std::string DeterministicSerialization(const T& t) { const int size = t.ByteSize(); - string result(size, '\0'); + std::string result(size, '\0'); io::ArrayOutputStream array_stream(::google::protobuf::string_as_array(&result), size); io::CodedOutputStream output_stream(&array_stream); output_stream.SetSerializationDeterministic(true); @@ -3155,12 +3158,12 @@ static string DeterministicSerialization(const T& t) { // Helper to test the serialization of the first arg against a golden file. static void TestDeterministicSerialization(const protobuf_unittest::TestMaps& t, - const string& filename) { - string expected; + const std::string& filename) { + std::string expected; GOOGLE_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath("net/proto2/internal/testdata/" + filename), &expected, true)); - const string actual = DeterministicSerialization(t); + const std::string actual = DeterministicSerialization(t); EXPECT_EQ(expected, actual); protobuf_unittest::TestMaps u; EXPECT_TRUE(u.ParseFromString(actual)); @@ -3168,8 +3171,8 @@ static void TestDeterministicSerialization(const protobuf_unittest::TestMaps& t, } // Helper for MapSerializationTest. Return a 7-bit ASCII string. -static string ConstructKey(uint64 n) { - string s(n % static_cast(9), '\0'); +static std::string ConstructKey(uint64 n) { + std::string s(n % static_cast(9), '\0'); if (s.empty()) { return StrCat(n); } else { @@ -3195,7 +3198,7 @@ TEST(MapSerializationTest, Deterministic) { const int64 i64 = static_cast(frog); const uint64 u64 = frog * static_cast(187321); const bool b = i32 > 0; - const string s = ConstructKey(frog); + const std::string s = ConstructKey(frog); (*inner.mutable_m())[i] = i32; (*t.mutable_m_int32())[i32] = (*t.mutable_m_sint32())[i32] = (*t.mutable_m_sfixed32())[i32] = inner; @@ -3205,8 +3208,8 @@ TEST(MapSerializationTest, Deterministic) { (*t.mutable_m_uint64())[u64] = (*t.mutable_m_fixed64())[u64] = inner; (*t.mutable_m_bool())[b] = inner; (*t.mutable_m_string())[s] = inner; - (*t.mutable_m_string())[s + string(1 << (u32 % static_cast(9)), - b)] = inner; + (*t.mutable_m_string())[s + std::string(1 << (u32 % static_cast(9)), + b)] = inner; inner.mutable_m()->erase(i); frog = frog * multiplier + i; frog ^= (frog >> 41); @@ -3217,14 +3220,14 @@ TEST(MapSerializationTest, Deterministic) { TEST(MapSerializationTest, DeterministicSubmessage) { protobuf_unittest::TestSubmessageMaps p; protobuf_unittest::TestMaps t; - const string filename = "golden_message_maps"; - string golden; + const std::string filename = "golden_message_maps"; + std::string golden; GOOGLE_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath("net/proto2/internal/testdata/" + filename), &golden, true)); t.ParseFromString(golden); *(p.mutable_m()) = t; - std::vector v; + std::vector v; // Use multiple attempts to increase the chance of a failure if something is // buggy. For example, each separate copy of a map might use a different // randomly-chosen hash function. @@ -3241,7 +3244,7 @@ TEST(TextFormatMapTest, SerializeAndParse) { unittest::TestMap source; unittest::TestMap dest; MapTestUtil::SetMapFields(&source); - string output; + std::string output; // Test compact ASCII TextFormat::Printer printer; @@ -3259,7 +3262,7 @@ TEST(TextFormatMapTest, DynamicMessage) { MapReflectionTester tester(message->GetDescriptor()); tester.SetMapFieldsViaReflection(message.get()); - string expected_text; + std::string expected_text; GOOGLE_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath("net/proto2/internal/" "testdata/map_test_data.txt"), @@ -3273,7 +3276,7 @@ TEST(TextFormatMapTest, Sorted) { MapReflectionTester tester(message.GetDescriptor()); tester.SetMapFieldsViaReflection(&message); - string expected_text; + std::string expected_text; GOOGLE_CHECK_OK( File::GetContents(TestUtil::GetTestDataPath("net/proto2/internal/" "testdata/map_test_data.txt"), @@ -3290,7 +3293,7 @@ TEST(TextFormatMapTest, Sorted) { } TEST(TextFormatMapTest, ParseCorruptedString) { - string serialized_message; + std::string serialized_message; GOOGLE_CHECK_OK( File::GetContents(TestUtil::GetTestDataPath( "net/proto2/internal/testdata/golden_message_maps"), @@ -3314,7 +3317,7 @@ TEST(TextFormatMapTest, NoDisableIterator) { // Serialize message to text format, which will invalidate the previous // iterator previously. - string output; + std::string output; TextFormat::Printer printer; printer.PrintToString(source, &output); @@ -3325,7 +3328,7 @@ TEST(TextFormatMapTest, NoDisableIterator) { // format, because the previous iterator has been invalidated. output.clear(); printer.PrintToString(source, &output); - string expected = + std::string expected = "map_int32_int32 {\n" " key: 1\n" " value: 2\n" @@ -3350,7 +3353,7 @@ TEST(TextFormatMapTest, NoDisableReflectionIterator) { // Serialize message to text format, which will invalidate the prvious // iterator previously. - string output; + std::string output; TextFormat::Printer printer; printer.PrintToString(source, &output); @@ -3365,7 +3368,7 @@ TEST(TextFormatMapTest, NoDisableReflectionIterator) { // format, because the previous iterator has been invalidated. output.clear(); printer.PrintToString(source, &output); - string expected = + std::string expected = "map_int32_int32 {\n" " key: 1\n" " value: 2\n" @@ -3382,7 +3385,7 @@ TEST(ArenaTest, ParsingAndSerializingNoHeapAllocation) { options.initial_block = &arena_block[0]; options.initial_block_size = arena_block.size(); Arena arena(options); - string data; + std::string data; data.reserve(128 * 1024); { @@ -3404,7 +3407,7 @@ TEST(ArenaTest, ParsingAndSerializingNoHeapAllocation) { // Use text format parsing and serializing to test reflection api. TEST(ArenaTest, ReflectionInTextFormat) { Arena arena; - string data; + std::string data; TextFormat::Printer printer; TextFormat::Parser parser; @@ -3426,7 +3429,7 @@ TEST(ArenaTest, StringMapNoLeak) { Arena arena; unittest::TestArenaMap* message = Arena::CreateMessage(&arena); - string data; + std::string data; // String with length less than 16 will not be allocated from heap. int original_capacity = data.capacity(); while (data.capacity() <= original_capacity) { diff --git a/src/google/protobuf/map_test_util.cc b/src/google/protobuf/map_test_util.cc index 7061946129..83502afd32 100644 --- a/src/google/protobuf/map_test_util.cc +++ b/src/google/protobuf/map_test_util.cc @@ -329,7 +329,7 @@ MapReflectionTester::MapReflectionTester( } // Shorthand to get a FieldDescriptor for a field of unittest::TestMap. -const FieldDescriptor* MapReflectionTester::F(const string& name) { +const FieldDescriptor* MapReflectionTester::F(const std::string& name) { const FieldDescriptor* result = NULL; result = base_descriptor_->FindFieldByName(name); GOOGLE_CHECK(result != NULL); @@ -744,30 +744,28 @@ void MapReflectionTester::SetMapFieldsViaMapReflection( sub_foreign_message, foreign_c_, 1); } -void MapReflectionTester::GetMapValueViaMapReflection(Message* message, - const string& field_name, - const MapKey& map_key, - MapValueRef* map_val) { +void MapReflectionTester::GetMapValueViaMapReflection( + Message* message, const std::string& field_name, const MapKey& map_key, + MapValueRef* map_val) { const Reflection* reflection = message->GetReflection(); EXPECT_FALSE(reflection->InsertOrLookupMapValue(message, F(field_name), map_key, map_val)); } -Message* MapReflectionTester::GetMapEntryViaReflection(Message* message, - const string& field_name, - int index) { +Message* MapReflectionTester::GetMapEntryViaReflection( + Message* message, const std::string& field_name, int index) { const Reflection* reflection = message->GetReflection(); return reflection->MutableRepeatedMessage(message, F(field_name), index); } MapIterator MapReflectionTester::MapBegin(Message* message, - const string& field_name) { + const std::string& field_name) { const Reflection* reflection = message->GetReflection(); return reflection->MapBegin(message, F(field_name)); } MapIterator MapReflectionTester::MapEnd(Message* message, - const string& field_name) { + const std::string& field_name) { const Reflection* reflection = message->GetReflection(); return reflection->MapEnd(message, F(field_name)); } @@ -993,7 +991,7 @@ void MapReflectionTester:: void MapReflectionTester::ExpectMapFieldsSetViaReflection( const Message& message) { - string scratch; + std::string scratch; const Reflection* reflection = message.GetReflection(); const Message* sub_message; MapKey map_key; @@ -1256,15 +1254,15 @@ void MapReflectionTester::ExpectMapFieldsSetViaReflection( } } { - std::map map; + std::map map; map["0"] = "0"; map["1"] = "1"; for (int i = 0; i < 2; i++) { sub_message = &reflection->GetRepeatedMessage(message, F("map_string_string"), i); - string key = sub_message->GetReflection()->GetString( + std::string key = sub_message->GetReflection()->GetString( *sub_message, map_string_string_key_); - string val = sub_message->GetReflection()->GetString( + std::string val = sub_message->GetReflection()->GetString( *sub_message, map_string_string_val_); EXPECT_EQ(map[key], val); // Check with Map Reflection @@ -1274,7 +1272,7 @@ void MapReflectionTester::ExpectMapFieldsSetViaReflection( } } { - std::map map; + std::map map; map[0] = "0"; map[1] = "1"; for (int i = 0; i < 2; i++) { @@ -1282,7 +1280,7 @@ void MapReflectionTester::ExpectMapFieldsSetViaReflection( &reflection->GetRepeatedMessage(message, F("map_int32_bytes"), i); int32 key = sub_message->GetReflection()->GetInt32( *sub_message, map_int32_bytes_key_); - string val = sub_message->GetReflection()->GetString( + std::string val = sub_message->GetReflection()->GetString( *sub_message, map_int32_bytes_val_); EXPECT_EQ(map[key], val); // Check with Map Reflection @@ -1333,8 +1331,8 @@ void MapReflectionTester::ExpectMapFieldsSetViaReflection( void MapReflectionTester::ExpectMapFieldsSetViaReflectionIterator( Message* message) { - string scratch; - string serialized; + std::string scratch; + std::string serialized; const Reflection* reflection = message->GetReflection(); ASSERT_EQ(2, reflection->FieldSize(*message, F("map_int32_int32"))); @@ -1499,7 +1497,7 @@ void MapReflectionTester::ExpectMapFieldsSetViaReflectionIterator( } } { - std::map map; + std::map map; map["0"] = "0"; map["1"] = "1"; int size = 0; @@ -1519,7 +1517,7 @@ void MapReflectionTester::ExpectMapFieldsSetViaReflectionIterator( EXPECT_EQ(size, 2); } { - std::map map; + std::map map; map[0] = "0"; map[1] = "1"; for (MapIterator iter = reflection->MapBegin(message, F("map_int32_bytes")); diff --git a/src/google/protobuf/map_test_util.h b/src/google/protobuf/map_test_util.h index 105313d43c..ede290b413 100644 --- a/src/google/protobuf/map_test_util.h +++ b/src/google/protobuf/map_test_util.h @@ -109,8 +109,8 @@ class MapReflectionTester { void GetMapValueViaMapReflection(Message* message, const std::string& field_name, const MapKey& map_key, MapValueRef* map_val); - Message* GetMapEntryViaReflection(Message* message, const std::string& field_name, - int index); + Message* GetMapEntryViaReflection(Message* message, + const std::string& field_name, int index); MapIterator MapBegin(Message* message, const std::string& field_name); MapIterator MapEnd(Message* message, const std::string& field_name); diff --git a/src/google/protobuf/map_type_handler.h b/src/google/protobuf/map_type_handler.h index ddfedc8e0f..0caf1a7229 100644 --- a/src/google/protobuf/map_type_handler.h +++ b/src/google/protobuf/map_type_handler.h @@ -35,7 +35,6 @@ #include #include #include -#include #ifdef SWIG #error "You cannot SWIG proto headers" @@ -245,7 +244,7 @@ class MapTypeHandler { int default_enum); \ static inline size_t SpaceUsedInMapEntryLong(const TypeOnMemory& value); \ static inline size_t SpaceUsedInMapLong(const TypeOnMemory& value); \ - static inline size_t SpaceUsedInMapLong(const std::string& value); \ + static inline size_t SpaceUsedInMapLong(const std::string& value); \ static inline void AssignDefaultValue(TypeOnMemory* value); \ static inline const MapEntryAccessorType& DefaultIfNotInitialized( \ const TypeOnMemory& value, const TypeOnMemory& default_value); \ @@ -666,7 +665,7 @@ inline bool MapTypeHandler \ inline size_t \ MapTypeHandler::SpaceUsedInMapLong( \ - const std::string& value) { \ + const std::string& value) { \ return sizeof(value); \ } \ template \ diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc index d31f62486d..5fbae35246 100644 --- a/src/google/protobuf/message.cc +++ b/src/google/protobuf/message.cc @@ -98,7 +98,9 @@ void Message::CopyFrom(const Message& from) { ReflectionOps::Copy(from, this); } -string Message::GetTypeName() const { return GetDescriptor()->full_name(); } +std::string Message::GetTypeName() const { + return GetDescriptor()->full_name(); +} void Message::Clear() { ReflectionOps::Clear(this); } @@ -106,12 +108,12 @@ bool Message::IsInitialized() const { return ReflectionOps::IsInitialized(*this); } -void Message::FindInitializationErrors(std::vector* errors) const { +void Message::FindInitializationErrors(std::vector* errors) const { return ReflectionOps::FindInitializationErrors(*this, "", errors); } -string Message::InitializationErrorString() const { - std::vector errors; +std::string Message::InitializationErrorString() const { + std::vector errors; FindInitializationErrors(&errors); return Join(errors, ", "); } @@ -302,7 +304,7 @@ const char* ParsePackedField(const FieldDescriptor* field, Message* msg, default: GOOGLE_LOG(FATAL) << "Type is not packable " << field->type(); - return {}; // Make compiler happy + return nullptr; // Make compiler happy } } @@ -316,7 +318,7 @@ const char* ParseLenDelim(int field_number, const FieldDescriptor* field, } enum { kNone = 0, kVerify, kStrict } utf8_level = kNone; const char* field_name = nullptr; - auto parse_string = [ptr, ctx, &utf8_level, &field_name](string* s) { + auto parse_string = [ptr, ctx, &utf8_level, &field_name](std::string* s) { switch (utf8_level) { case kNone: return internal::InlineGreedyStringParser(s, ptr, ctx); @@ -347,12 +349,14 @@ const char* ParseLenDelim(int field_number, const FieldDescriptor* field, reflection->AddString(msg, field, ""); if (field->options().ctype() == FieldOptions::STRING || field->is_extension()) { - auto object = reflection->MutableRepeatedPtrField(msg, field) - ->Mutable(index); + auto object = + reflection->MutableRepeatedPtrField(msg, field) + ->Mutable(index); return parse_string(object); } else { - auto object = reflection->MutableRepeatedPtrField(msg, field) - ->Mutable(index); + auto object = + reflection->MutableRepeatedPtrField(msg, field) + ->Mutable(index); return parse_string(object); } } else { @@ -361,12 +365,12 @@ const char* ParseLenDelim(int field_number, const FieldDescriptor* field, if (field->options().ctype() == FieldOptions::STRING || field->is_extension()) { // HACK around inability to get mutable_string in reflection - string* object = &const_cast( + std::string* object = &const_cast( reflection->GetStringReference(*msg, field, nullptr)); return parse_string(object); } else { // HACK around inability to get mutable_string in reflection - string* object = &const_cast( + std::string* object = &const_cast( reflection->GetStringReference(*msg, field, nullptr)); return parse_string(object); } @@ -493,7 +497,7 @@ const char* Message::_InternalParse(const char* ptr, UnknownFieldSet* unknown_ = nullptr; bool is_item_ = false; uint32 type_id_ = 0; - string payload_; + std::string payload_; ReflectiveFieldParser(Message* msg, internal::ParseContext* ctx, bool is_item) @@ -670,7 +674,7 @@ void RegisterFileLevelMetadata(void* assign_descriptors_table); namespace { void RegisterFileLevelMetadata(void* assign_descriptors_table, - const string& filename) { + const std::string& filename) { internal::RegisterFileLevelMetadata(assign_descriptors_table); } diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index 7fa17ed845..252841373b 100644 --- a/src/google/protobuf/message.h +++ b/src/google/protobuf/message.h @@ -49,7 +49,7 @@ // Then, if you used the protocol compiler to generate a class from the above // definition, you could use it like so: // -// string data; // Will store a serialized version of the message. +// std::string data; // Will store a serialized version of the message. // // { // // Create a message and serialize it. @@ -541,7 +541,7 @@ class PROTOBUF_EXPORT Reflection { virtual bool GetBool (const Message& message, const FieldDescriptor* field) const = 0; virtual std::string GetString(const Message& message, - const FieldDescriptor* field) const = 0; + const FieldDescriptor* field) const = 0; virtual const EnumValueDescriptor* GetEnum( const Message& message, const FieldDescriptor* field) const = 0; @@ -561,21 +561,21 @@ class PROTOBUF_EXPORT Reflection { // Get a string value without copying, if possible. // // GetString() necessarily returns a copy of the string. This can be - // inefficient when the string is already stored in a string object in the - // underlying message. GetStringReference() will return a reference to the - // underlying string in this case. Otherwise, it will copy the string into - // *scratch and return that. + // inefficient when the std::string is already stored in a std::string object + // in the underlying message. GetStringReference() will return a reference to + // the underlying std::string in this case. Otherwise, it will copy the + // string into *scratch and return that. // // Note: It is perfectly reasonable and useful to write code like: // str = reflection->GetStringReference(message, field, &str); // This line would ensure that only one copy of the string is made // regardless of the field's underlying representation. When initializing - // a newly-constructed string, though, it's just as fast and more readable - // to use code like: - // string str = reflection->GetString(message, field); + // a newly-constructed string, though, it's just as fast and more + // readable to use code like: + // std::string str = reflection->GetString(message, field); virtual const std::string& GetStringReference(const Message& message, - const FieldDescriptor* field, - std::string* scratch) const = 0; + const FieldDescriptor* field, + std::string* scratch) const = 0; // Singular field mutators ----------------------------------------- @@ -595,8 +595,7 @@ class PROTOBUF_EXPORT Reflection { const FieldDescriptor* field, double value) const = 0; virtual void SetBool (Message* message, const FieldDescriptor* field, bool value) const = 0; - virtual void SetString(Message* message, - const FieldDescriptor* field, + virtual void SetString(Message* message, const FieldDescriptor* field, const std::string& value) const = 0; virtual void SetEnum (Message* message, const FieldDescriptor* field, @@ -669,8 +668,8 @@ class PROTOBUF_EXPORT Reflection { const FieldDescriptor* field, int index) const = 0; virtual std::string GetRepeatedString(const Message& message, - const FieldDescriptor* field, - int index) const = 0; + const FieldDescriptor* field, + int index) const = 0; virtual const EnumValueDescriptor* GetRepeatedEnum( const Message& message, const FieldDescriptor* field, int index) const = 0; @@ -688,8 +687,8 @@ class PROTOBUF_EXPORT Reflection { // See GetStringReference(), above. virtual const std::string& GetRepeatedStringReference( - const Message& message, const FieldDescriptor* field, - int index, std::string* scratch) const = 0; + const Message& message, const FieldDescriptor* field, int index, + std::string* scratch) const = 0; // Repeated field mutators ----------------------------------------- @@ -716,8 +715,7 @@ class PROTOBUF_EXPORT Reflection { virtual void SetRepeatedBool (Message* message, const FieldDescriptor* field, int index, bool value) const = 0; - virtual void SetRepeatedString(Message* message, - const FieldDescriptor* field, + virtual void SetRepeatedString(Message* message, const FieldDescriptor* field, int index, const std::string& value) const = 0; virtual void SetRepeatedEnum(Message* message, const FieldDescriptor* field, int index, @@ -755,8 +753,7 @@ class PROTOBUF_EXPORT Reflection { const FieldDescriptor* field, double value) const = 0; virtual void AddBool (Message* message, const FieldDescriptor* field, bool value) const = 0; - virtual void AddString(Message* message, - const FieldDescriptor* field, + virtual void AddString(Message* message, const FieldDescriptor* field, const std::string& value) const = 0; virtual void AddEnum (Message* message, const FieldDescriptor* field, @@ -799,7 +796,7 @@ class PROTOBUF_EXPORT Reflection { // CPPTYPE_FLOAT float // CPPTYPE_BOOL bool // CPPTYPE_ENUM generated enum type or int32 - // CPPTYPE_STRING string + // CPPTYPE_STRING std::string // CPPTYPE_MESSAGE generated message type or google::protobuf::Message // // A RepeatedFieldRef object can be copied and the resulted object will point @@ -851,7 +848,7 @@ class PROTOBUF_EXPORT Reflection { // DEPRECATED. Please use GetRepeatedFieldRef(). // - // for T = string, google::protobuf::internal::StringPieceField + // for T = std::string, google::protobuf::internal::StringPieceField // google::protobuf::Message & descendants. template PROTOBUF_DEPRECATED_MSG("Please use GetRepeatedFieldRef() instead") @@ -860,7 +857,7 @@ class PROTOBUF_EXPORT Reflection { // DEPRECATED. Please use GetMutableRepeatedFieldRef(). // - // for T = string, google::protobuf::internal::StringPieceField + // for T = std::string, google::protobuf::internal::StringPieceField // google::protobuf::Message & descendants. template PROTOBUF_DEPRECATED_MSG("Please use GetMutableRepeatedFieldRef() instead") @@ -985,8 +982,8 @@ class PROTOBUF_EXPORT Reflection { friend class internal::MapFieldPrinterHelper; friend class internal::ReflectionAccessor; - // Special version for specialized implementations of string. We can't call - // MutableRawRepeatedField directly here because we don't have access to + // Special version for specialized implementations of string. We can't + // call MutableRawRepeatedField directly here because we don't have access to // FieldOptions::* which are defined in descriptor.pb.h. Including that // file here is not possible because it would cause a circular include cycle. // We use 1 routine rather than 2 (const vs mutable) because it is private @@ -1174,6 +1171,33 @@ T* DynamicCastToGenerated(Message* from) { return const_cast(DynamicCastToGenerated(message_const)); } +// Call this function to ensure that this message's reflection is linked into +// the binary: +// +// google::protobuf::LinkMessageReflection(); +// +// This will ensure that the following lookup will succeed: +// +// DescriptorPool::generated_pool()->FindMessageTypeByName("FooMessage"); +// +// As a side-effect, it will also guarantee that anything else from the same +// .proto file will also be available for lookup in the generated pool. +// +// This function does not actually register the message, so it does not need +// to be called before the lookup. However it does need to occur in a function +// that cannot be stripped from the binary (ie. it must be reachable from main). +// +// Best practice is to call this function as close as possible to where the +// reflection is actually needed. This function is very cheap to call, so you +// should not need to worry about its runtime overhead except in the tightest +// of loops (on x86-64 it compiles into two "mov" instructions). +template +void LinkMessageReflection() { + typedef const T& GetDefaultInstanceFunction(); + GetDefaultInstanceFunction* volatile unused = &T::default_instance; + (void)&unused; // Use address to avoid an extra load of volatile variable. +} + namespace internal { // Legacy functions, to preserve compatibility with existing callers. @@ -1191,22 +1215,24 @@ T dynamic_cast_if_available(Message* from) { // ============================================================================= // Implementation details for {Get,Mutable}RawRepeatedPtrField. We provide -// specializations for , and and handle -// everything else with the default template which will match any type having -// a method with signature "static const google::protobuf::Descriptor* descriptor()". -// Such a type presumably is a descendant of google::protobuf::Message. - -template<> -inline const RepeatedPtrField& Reflection::GetRepeatedPtrField( +// specializations for , and and +// handle everything else with the default template which will match any type +// having a method with signature "static const google::protobuf::Descriptor* +// descriptor()". Such a type presumably is a descendant of google::protobuf::Message. + +template <> +inline const RepeatedPtrField& +Reflection::GetRepeatedPtrField( const Message& message, const FieldDescriptor* field) const { - return *static_cast* >( + return *static_cast*>( MutableRawRepeatedString(const_cast(&message), field, true)); } -template<> -inline RepeatedPtrField* Reflection::MutableRepeatedPtrField( +template <> +inline RepeatedPtrField* +Reflection::MutableRepeatedPtrField( Message* message, const FieldDescriptor* field) const { - return static_cast* >( + return static_cast*>( MutableRawRepeatedString(message, field, true)); } diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc index 1df371a033..731f4ca167 100644 --- a/src/google/protobuf/message_lite.cc +++ b/src/google/protobuf/message_lite.cc @@ -56,7 +56,7 @@ namespace google { namespace protobuf { -string MessageLite::InitializationErrorString() const { +std::string MessageLite::InitializationErrorString() const { return "(cannot determine missing fields for lite message)"; } @@ -83,8 +83,8 @@ void ByteSizeConsistencyError(size_t byte_size_before_serialization, GOOGLE_LOG(FATAL) << "This shouldn't be called if all the sizes are equal."; } -string InitializationErrorMessage(const char* action, - const MessageLite& message) { +std::string InitializationErrorMessage(const char* action, + const MessageLite& message) { // Note: We want to avoid depending on strutil in the lite library, otherwise // we'd use: // @@ -94,7 +94,7 @@ string InitializationErrorMessage(const char* action, // action, message.GetTypeName(), // message.InitializationErrorString()); - string result; + std::string result; result += "Can't "; result += action; result += " message of type \""; @@ -126,21 +126,6 @@ bool MergePartialFromImpl(StringPiece input, MessageLite* msg) { return ctx.AtLegitimateEnd(msg->_InternalParse(ptr, &ctx)); } -template -bool MergePartialFromImpl(BoundedZCIS input, MessageLite* msg) { - // TODO(gerbens) Circumvent CIS, to prevent slop region check overhead. - // Tricky case. If we limit ZeroCopyInputStream we need to make sure it's - // left precisely at the limit. However EpsCopyInputStream will always be - // 16 (kSlopBytes) bytes ahead of ZeroCopyInputStream, which means it's - // potentially a buffer ahead from which we can't rollback. Hence we must - // ensure we don't read more than the limit. - // TODO(gerbens) consider putting logic in EpsCopyInputStream to put an - // overall limit on the number of bytes it pulls from the underlying stream. - io::CodedInputStream cis(input.zcis); - cis.PushLimit(input.limit); - return msg->MergePartialFromCodedStream(&cis) && cis.BytesUntilLimit() == 0; -} - template bool MergePartialFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg) { const char* ptr; @@ -149,6 +134,17 @@ bool MergePartialFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg) { return ctx.AtLegitimateEnd(msg->_InternalParse(ptr, &ctx)); } +template +bool MergePartialFromImpl(BoundedZCIS input, MessageLite* msg) { + // We must prevent reading more than limit from the input. Due to the nature + // of EpsCopyInputStream the stream will always read kSlopBytes ahead of + // the parser, we can't always backup so we must prevent from reading past + // limit in the first place. + io::LimitingInputStream zcis(input.zcis, input.limit); + return MergePartialFromImpl(&zcis, msg) && + zcis.ByteCount() == input.limit; +} + #else // !GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER inline bool InlineMergePartialEntireStream(io::CodedInputStream* cis, @@ -287,11 +283,11 @@ bool MessageLite::ParsePartialFromBoundedZeroCopyStream( return ParseFrom(internal::BoundedZCIS{input, size}); } -bool MessageLite::ParseFromString(const string& data) { +bool MessageLite::ParseFromString(const std::string& data) { return ParseFrom(data); } -bool MessageLite::ParsePartialFromString(const string& data) { +bool MessageLite::ParsePartialFromString(const std::string& data) { return ParseFrom(data); } @@ -303,7 +299,7 @@ bool MessageLite::ParsePartialFromArray(const void* data, int size) { return ParseFrom(as_string_view(data, size)); } -bool MessageLite::MergeFromString(const string& data) { +bool MessageLite::MergeFromString(const std::string& data) { return ParseFrom(data); } @@ -385,12 +381,12 @@ bool MessageLite::SerializePartialToZeroCopyStream( return SerializePartialToCodedStream(&encoder); } -bool MessageLite::AppendToString(string* output) const { +bool MessageLite::AppendToString(std::string* output) const { GOOGLE_DCHECK(IsInitialized()) << InitializationErrorMessage("serialize", *this); return AppendPartialToString(output); } -bool MessageLite::AppendPartialToString(string* output) const { +bool MessageLite::AppendPartialToString(std::string* output) const { size_t old_size = output->size(); size_t byte_size = ByteSizeLong(); if (byte_size > INT_MAX) { @@ -409,12 +405,12 @@ bool MessageLite::AppendPartialToString(string* output) const { return true; } -bool MessageLite::SerializeToString(string* output) const { +bool MessageLite::SerializeToString(std::string* output) const { output->clear(); return AppendToString(output); } -bool MessageLite::SerializePartialToString(string* output) const { +bool MessageLite::SerializePartialToString(std::string* output) const { output->clear(); return AppendPartialToString(output); } @@ -440,18 +436,18 @@ bool MessageLite::SerializePartialToArray(void* data, int size) const { return true; } -string MessageLite::SerializeAsString() const { +std::string MessageLite::SerializeAsString() const { // If the compiler implements the (Named) Return Value Optimization, // the local variable 'output' will not actually reside on the stack // of this function, but will be overlaid with the object that the // caller supplied for the return value to be constructed in. - string output; + std::string output; if (!AppendToString(&output)) output.clear(); return output; } -string MessageLite::SerializePartialAsString() const { - string output; +std::string MessageLite::SerializePartialAsString() const { + std::string output; if (!AppendPartialToString(&output)) output.clear(); return output; } @@ -501,7 +497,8 @@ void GenericTypeHandler::Merge(const MessageLite& from, to->CheckTypeAndMergeFrom(from); } template <> -void GenericTypeHandler::Merge(const string& from, string* to) { +void GenericTypeHandler::Merge(const std::string& from, + std::string* to) { *to = from; } diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h index 61c2d2a3de..ba9abf7239 100644 --- a/src/google/protobuf/message_lite.h +++ b/src/google/protobuf/message_lite.h @@ -144,11 +144,11 @@ class ExplicitlyConstructed { // Default empty string object. Don't use this directly. Instead, call // GetEmptyString() to get the reference. -PROTOBUF_EXPORT extern ExplicitlyConstructed<::std::string> +PROTOBUF_EXPORT extern ExplicitlyConstructed fixed_address_empty_string; -PROTOBUF_EXPORT inline const ::std::string& GetEmptyStringAlreadyInited() { +PROTOBUF_EXPORT inline const std::string& GetEmptyStringAlreadyInited() { return fixed_address_empty_string.get(); } @@ -347,8 +347,8 @@ class PROTOBUF_EXPORT MessageLite { // Like SerializeAsString(), but allows missing required fields. std::string SerializePartialAsString() const; - // Like SerializeToString(), but appends to the data to the string's existing - // contents. All required fields must be set. + // Like SerializeToString(), but appends to the data to the string's + // existing contents. All required fields must be set. bool AppendToString(std::string* output) const; // Like AppendToString(), but allows missing required fields. bool AppendPartialToString(std::string* output) const; diff --git a/src/google/protobuf/message_unittest.inc b/src/google/protobuf/message_unittest.inc index 23deaa25ca..d61ca7d33b 100644 --- a/src/google/protobuf/message_unittest.inc +++ b/src/google/protobuf/message_unittest.inc @@ -88,8 +88,8 @@ TEST(MESSAGE_TEST_NAME, SerializeHelpers) { TestUtil::SetAllFields(&message); std::stringstream stream; - string str1("foo"); - string str2("bar"); + std::string str1("foo"); + std::string str2("bar"); EXPECT_TRUE(message.SerializeToString(&str1)); EXPECT_TRUE(message.AppendToString(&str2)); @@ -102,7 +102,7 @@ TEST(MESSAGE_TEST_NAME, SerializeHelpers) { EXPECT_TRUE(str2.substr(3) == str1); // GCC gives some sort of error if we try to just do stream.str() == str1. - string temp = stream.str(); + std::string temp = stream.str(); EXPECT_TRUE(temp == str1); EXPECT_TRUE(message.SerializeAsString() == str1); @@ -118,7 +118,7 @@ TEST(MESSAGE_TEST_NAME, SerializeToBrokenOstream) { } TEST(MESSAGE_TEST_NAME, ParseFromFileDescriptor) { - string filename = + std::string filename = TestUtil::GetTestDataPath("net/proto2/internal/testdata/golden_message"); int file = open(filename.c_str(), O_RDONLY | O_BINARY); ASSERT_GE(file, 0); @@ -131,7 +131,7 @@ TEST(MESSAGE_TEST_NAME, ParseFromFileDescriptor) { } TEST(MESSAGE_TEST_NAME, ParsePackedFromFileDescriptor) { - string filename = TestUtil::GetTestDataPath( + std::string filename = TestUtil::GetTestDataPath( "net/proto2/internal/testdata/golden_packed_fields_message"); int file = open(filename.c_str(), O_RDONLY | O_BINARY); ASSERT_GE(file, 0); @@ -146,7 +146,7 @@ TEST(MESSAGE_TEST_NAME, ParsePackedFromFileDescriptor) { TEST(MESSAGE_TEST_NAME, ParseHelpers) { // TODO(kenton): Test more helpers? They're all two-liners so it seems // like a waste of time. - string data; + std::string data; { // Set up. @@ -173,7 +173,7 @@ TEST(MESSAGE_TEST_NAME, ParseHelpers) { { // Test ParseFromBoundedZeroCopyStream. - string data_with_junk(data); + std::string data_with_junk(data); data_with_junk.append("some junk on the end"); io::ArrayInputStream stream(data_with_junk.data(), data_with_junk.size()); UNITTEST::TestAllTypes message; @@ -193,7 +193,7 @@ TEST(MESSAGE_TEST_NAME, ParseHelpers) { TEST(MESSAGE_TEST_NAME, ParseFailsIfNotInitialized) { UNITTEST::TestRequired message; - std::vector errors; + std::vector errors; { ScopedMemoryLog log; @@ -203,7 +203,7 @@ TEST(MESSAGE_TEST_NAME, ParseFailsIfNotInitialized) { ASSERT_EQ(1, errors.size()); EXPECT_EQ( - "Can't parse message of type \"" + string(UNITTEST_PACKAGE_NAME) + + "Can't parse message of type \"" + std::string(UNITTEST_PACKAGE_NAME) + ".TestRequired\" because it is missing required fields: a, b, c", errors[0]); } @@ -241,10 +241,10 @@ TEST(MESSAGE_TEST_NAME, DynamicCastToGenerated) { TEST(MESSAGE_TEST_NAME, SerializeFailsIfNotInitialized) { UNITTEST::TestRequired message; - string data; + std::string data; EXPECT_DEBUG_DEATH(EXPECT_TRUE(message.SerializeToString(&data)), "Can't serialize message of type \"" + - string(UNITTEST_PACKAGE_NAME) + + std::string(UNITTEST_PACKAGE_NAME) + ".TestRequired\" because " "it is missing required fields: a, b, c"); } @@ -252,8 +252,7 @@ TEST(MESSAGE_TEST_NAME, SerializeFailsIfNotInitialized) { TEST(MESSAGE_TEST_NAME, CheckInitialized) { UNITTEST::TestRequired message; EXPECT_DEATH(message.CheckInitialized(), - "Message of type \"" + - string(UNITTEST_PACKAGE_NAME) + + "Message of type \"" + std::string(UNITTEST_PACKAGE_NAME) + ".TestRequired\" is missing required " "fields: a, b, c"); } @@ -261,12 +260,13 @@ TEST(MESSAGE_TEST_NAME, CheckInitialized) { #endif // PROTOBUF_HAS_DEATH_TEST namespace { -// An input stream that repeats a string's content for a number of times. It -// helps us create a really large input without consuming too much memory. Used -// to test the parsing behavior when the input size exceeds 2G or close to it. +// An input stream that repeats a std::string's content for a number of times. +// It helps us create a really large input without consuming too much memory. +// Used to test the parsing behavior when the input size exceeds 2G or close to +// it. class RepeatedInputStream : public io::ZeroCopyInputStream { public: - RepeatedInputStream(const string& data, size_t count) + RepeatedInputStream(const std::string& data, size_t count) : data_(data), count_(count), position_(0), total_byte_count_(0) {} virtual bool Next(const void** data, int* size) { @@ -308,22 +308,22 @@ class RepeatedInputStream : public io::ZeroCopyInputStream { virtual int64 ByteCount() const { return total_byte_count_; } private: - string data_; + std::string data_; size_t count_; // The number of strings that haven't been consuemd. - size_t position_; // Position in the string for the next read. + size_t position_; // Position in the std::string for the next read. int64 total_byte_count_; }; } // namespace TEST(MESSAGE_TEST_NAME, TestParseMessagesCloseTo2G) { - // Create a message with a large string field. - string value = string(64 * 1024 * 1024, 'x'); + // Create a message with a large std::string field. + std::string value = std::string(64 * 1024 * 1024, 'x'); UNITTEST::TestAllTypes message; message.set_optional_string(value); // Repeat this message in the input stream to make the total input size // close to 2G. - string data = message.SerializeAsString(); + std::string data = message.SerializeAsString(); size_t count = static_cast(kint32max) / data.size(); RepeatedInputStream input(data, count); @@ -337,14 +337,14 @@ TEST(MESSAGE_TEST_NAME, TestParseMessagesCloseTo2G) { } TEST(MESSAGE_TEST_NAME, TestParseMessagesOver2G) { - // Create a message with a large string field. - string value = string(64 * 1024 * 1024, 'x'); + // Create a message with a large std::string field. + std::string value = std::string(64 * 1024 * 1024, 'x'); UNITTEST::TestAllTypes message; message.set_optional_string(value); // Repeat this message in the input stream to make the total input size // larger than 2G. - string data = message.SerializeAsString(); + std::string data = message.SerializeAsString(); size_t count = static_cast(kint32max) / data.size() + 1; RepeatedInputStream input(data, count); @@ -362,7 +362,7 @@ TEST(MESSAGE_TEST_NAME, BypassInitializationCheckOnSerialize) { TEST(MESSAGE_TEST_NAME, FindInitializationErrors) { UNITTEST::TestRequired message; - std::vector errors; + std::vector errors; message.FindInitializationErrors(&errors); ASSERT_EQ(3, errors.size()); EXPECT_EQ("a", errors[0]); @@ -391,7 +391,7 @@ TEST(MESSAGE_TEST_NAME, MessageIsStillValidAfterParseFails) { UNITTEST::TestAllTypes message; // 9 0xFFs for the "optional_uint64" field. - string invalid_data = "\x20\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"; + std::string invalid_data = "\x20\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"; EXPECT_FALSE(message.ParseFromString(invalid_data)); message.Clear(); @@ -399,7 +399,7 @@ TEST(MESSAGE_TEST_NAME, MessageIsStillValidAfterParseFails) { // invalid data for field "optional_string". Length prefix is 1 but no // payload. - string invalid_string_data = "\x72\x01"; + std::string invalid_string_data = "\x72\x01"; { Arena arena; UNITTEST::TestAllTypes* arena_message = @@ -462,7 +462,7 @@ TEST(MESSAGE_TEST_NAME, ParsingMerge) { #undef ASSIGN_REPEATED_GROUP - string buffer; + std::string buffer; generator.SerializeToString(&buffer); UNITTEST::TestParsingMerge parsing_merge; parsing_merge.ParseFromString(buffer); @@ -571,14 +571,14 @@ TEST(MESSAGE_TEST_NAME, MOMIParserEdgeCases) { { UNITTEST::TestAllTypes msg; // Parser ends in last 16 bytes of buffer due to a 0. - string data; + std::string data; // 12 bytes of data for (int i = 0; i < 4; i++) data += "\370\1\1"; // 13 byte is terminator data += '\0'; // Terminator // followed by the rest of the stream // space is ascii 32 so no end group - data += string(30, ' '); + data += std::string(30, ' '); io::ArrayInputStream zcis(data.data(), data.size(), 17); io::CodedInputStream cis(&zcis); EXPECT_TRUE(msg.MergePartialFromCodedStream(&cis)); @@ -589,10 +589,10 @@ TEST(MESSAGE_TEST_NAME, MOMIParserEdgeCases) { // Must use a message that is a group. Otherwise ending on a group end is // a failure. UNITTEST::TestAllTypes::OptionalGroup msg; - string data; + std::string data; for (int i = 0; i < 3; i++) data += "\370\1\1"; data += '\14'; // Octal end-group tag 12 (1 * 8 + 4( - data += string(30, ' '); + data += std::string(30, ' '); io::ArrayInputStream zcis(data.data(), data.size(), 17); io::CodedInputStream cis(&zcis); EXPECT_TRUE(msg.MergePartialFromCodedStream(&cis)); @@ -604,10 +604,10 @@ TEST(MESSAGE_TEST_NAME, MOMIParserEdgeCases) { // a length delimited field. // a failure. UNITTEST::TestAllTypes::OptionalGroup msg; - string data; + std::string data; data += "\22\3foo"; data += '\14'; // Octal end-group tag 12 (1 * 8 + 4( - data += string(30, ' '); + data += std::string(30, ' '); io::ArrayInputStream zcis(data.data(), data.size(), 17); io::CodedInputStream cis(&zcis); EXPECT_TRUE(msg.MergePartialFromCodedStream(&cis)); @@ -617,12 +617,12 @@ TEST(MESSAGE_TEST_NAME, MOMIParserEdgeCases) { { // Parser fails when ending on 0 if from ZeroCopyInputStream UNITTEST::TestAllTypes msg; - string data; + std::string data; // 12 bytes of data for (int i = 0; i < 4; i++) data += "\370\1\1"; // 13 byte is terminator data += '\0'; // Terminator - data += string(30, ' '); + data += std::string(30, ' '); io::ArrayInputStream zcis(data.data(), data.size(), 17); EXPECT_FALSE(msg.ParsePartialFromZeroCopyStream(&zcis)); } diff --git a/src/google/protobuf/metadata_lite.h b/src/google/protobuf/metadata_lite.h index a0e101dffa..e0aa52bc7a 100644 --- a/src/google/protobuf/metadata_lite.h +++ b/src/google/protobuf/metadata_lite.h @@ -167,9 +167,10 @@ class InternalMetadataWithArenaBase { } }; -// We store unknown fields as a string right now, because there is currently no -// good interface for reading unknown fields into an ArenaString. We may want -// to revisit this to allow unknown fields to be parsed onto the Arena. +// We store unknown fields as a std::string right now, because there is +// currently no good interface for reading unknown fields into an ArenaString. +// We may want to revisit this to allow unknown fields to be parsed onto the +// Arena. class InternalMetadataWithArenaLite : public InternalMetadataWithArenaBase { @@ -180,9 +181,7 @@ class InternalMetadataWithArenaLite : InternalMetadataWithArenaBase(arena) {} - void DoSwap(std::string* other) { - mutable_unknown_fields()->swap(*other); - } + void DoSwap(std::string* other) { mutable_unknown_fields()->swap(*other); } void DoMergeFrom(const std::string& other) { mutable_unknown_fields()->append(other); @@ -193,8 +192,8 @@ class InternalMetadataWithArenaLite } static const std::string& default_instance() { - // Can't use GetEmptyStringAlreadyInited() here because empty string may - // not have been initalized yet. This happens when protocol compiler + // Can't use GetEmptyStringAlreadyInited() here because empty string + // may not have been initalized yet. This happens when protocol compiler // statically determines the user can't access defaults and omits init code // from proto constructors. However unknown fields are always part of a // proto so it needs to be lazily initailzed. See b/112613846. @@ -204,9 +203,9 @@ class InternalMetadataWithArenaLite // This helper RAII class is needed to efficiently parse unknown fields. We // should only call mutable_unknown_fields if there are actual unknown fields. -// The obvious thing to just use a stack string and swap it at the end of the -// parse won't work, because the destructor of StringOutputStream needs to be -// called before we can modify the string (it check-fails). Using +// The obvious thing to just use a stack string and swap it at the end of +// the parse won't work, because the destructor of StringOutputStream needs to +// be called before we can modify the string (it check-fails). Using // LiteUnknownFieldSetter setter(&_internal_metadata_); // StringOutputStream stream(setter.buffer()); // guarantees that the string is only swapped after stream is destroyed. diff --git a/src/google/protobuf/no_field_presence_test.cc b/src/google/protobuf/no_field_presence_test.cc index d212fb110d..9645d3a806 100644 --- a/src/google/protobuf/no_field_presence_test.cc +++ b/src/google/protobuf/no_field_presence_test.cc @@ -418,7 +418,7 @@ TEST(NoFieldPresenceTest, DontSerializeDefaultValuesTest) { // check that serialized data contains only non-zero numeric fields/non-empty // string/byte fields. proto2_nofieldpresence_unittest::TestAllTypes message; - string output; + std::string output; // All default values -> no output. message.SerializeToString(&output); @@ -510,7 +510,7 @@ TEST(NoFieldPresenceTest, LazyMessageFieldHasBit) { // Serialize and parse with a new message object so that lazy field on new // object is in unparsed state. - string output; + std::string output; message.SerializeToString(&output); proto2_nofieldpresence_unittest::TestAllTypes message2; message2.ParseFromString(output); @@ -529,7 +529,7 @@ TEST(NoFieldPresenceTest, OneofPresence) { // oneof fields still have field presence -- ensure that this goes on the wire // even though its value is the empty string. message.set_oneof_string(""); - string serialized; + std::string serialized; message.SerializeToString(&serialized); // Tag: 113 --> tag is (113 << 3) | 2 (length delimited) = 906 // varint: 0x8a 0x07 diff --git a/src/google/protobuf/parse_context.cc b/src/google/protobuf/parse_context.cc index 2954105e79..abf7caf864 100644 --- a/src/google/protobuf/parse_context.cc +++ b/src/google/protobuf/parse_context.cc @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -159,9 +160,7 @@ std::pair EpsCopyInputStream::DoneFallback(const char* ptr, GOOGLE_DCHECK(overrun != limit_); // We either exceeded the limit (parse error) or we need to get new data. // Did we exceed the limit? Is so parse error. - if (PROTOBUF_PREDICT_FALSE(overrun > limit_)) { - return {nullptr, true}; - } + if (PROTOBUF_PREDICT_FALSE(overrun > limit_)) return {nullptr, true}; GOOGLE_DCHECK(overrun <= limit_); // Follows from above // At this point we know the following assertion holds. GOOGLE_DCHECK(limit_ > 0); @@ -172,9 +171,7 @@ std::pair EpsCopyInputStream::DoneFallback(const char* ptr, auto p = Next(overrun, d); if (p == nullptr) { // We are at the end of the stream - if (PROTOBUF_PREDICT_FALSE(overrun != 0)) { - return {nullptr, true}; - } + if (PROTOBUF_PREDICT_FALSE(overrun != 0)) return {nullptr, true}; GOOGLE_DCHECK(limit_ > 0); limit_end_ = buffer_end_; return {ptr, true}; @@ -192,13 +189,16 @@ const char* EpsCopyInputStream::SkipFallback(const char* ptr, int size) { } const char* EpsCopyInputStream::ReadStringFallback(const char* ptr, int size, - string* s) { + std::string* s) { s->clear(); + // TODO(gerbens) assess security. At the moment its parity with + // CodedInputStream but it allows a payload to reserve large memory. + if (size <= buffer_end_ - ptr + limit_) s->reserve(size); return AppendStringFallback(ptr, size, s); } const char* EpsCopyInputStream::AppendStringFallback(const char* ptr, int size, - string* str) { + std::string* str) { return AppendSize(ptr, size, [str](const char* p, int s) { str->append(p, s); }); } @@ -216,18 +216,47 @@ const char* EpsCopyInputStream::ReadRepeatedFixed(const char* ptr, return ptr; } +template +const char* EpsCopyInputStream::ReadPackedFixed(const char* ptr, int size, + RepeatedField* out) { + int nbytes = buffer_end_ + kSlopBytes - ptr; + while (size > nbytes) { + int num = nbytes / sizeof(T); + int old_entries = out->size(); + out->Reserve(old_entries + num); + int block_size = num * sizeof(T); + std::memcpy(out->AddNAlreadyReserved(num), ptr, block_size); + ptr += block_size; + size -= block_size; + if (DoneWithCheck(&ptr, -1)) return nullptr; + nbytes = buffer_end_ + kSlopBytes - ptr; + } + int num = size / sizeof(T); + int old_entries = out->size(); + out->Reserve(old_entries + num); + int block_size = num * sizeof(T); + std::memcpy(out->AddNAlreadyReserved(num), ptr, block_size); + ptr += block_size; + if (size != block_size) return nullptr; + return ptr; +} + const char* EpsCopyInputStream::InitFrom(io::ZeroCopyInputStream* zcis) { zcis_ = zcis; const void* data; int size; + limit_ = INT_MAX; if (zcis->Next(&data, &size)) { if (size > kSlopBytes) { auto ptr = static_cast(data); limit_ -= size - kSlopBytes; limit_end_ = buffer_end_ = ptr + size - kSlopBytes; + next_chunk_ = buffer_; if (aliasing_ == kOnPatch) aliasing_ = kNoDelta; return ptr; } else { + limit_end_ = buffer_end_ = buffer_ + kSlopBytes; + next_chunk_ = buffer_; auto ptr = buffer_ + 2 * kSlopBytes - size; std::memcpy(ptr, data, size); return ptr; @@ -240,7 +269,17 @@ const char* EpsCopyInputStream::InitFrom(io::ZeroCopyInputStream* zcis) { return buffer_; } -inline void WriteVarint(uint64 val, string* s) { +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ParseContext::ParseMessage(MessageLite* msg, const char* ptr) { + return ParseMessage(msg, ptr); +} +const char* ParseContext::ParseMessage(Message* msg, const char* ptr) { + // Use reinterptret case to prevent inclusion of non lite header + return ParseMessage(reinterpret_cast(msg), ptr); +} +#endif + +inline void WriteVarint(uint64 val, std::string* s) { while (val >= 128) { uint8 c = val | 0x80; s->push_back(c); @@ -249,67 +288,30 @@ inline void WriteVarint(uint64 val, string* s) { s->push_back(val); } -void WriteVarint(uint32 num, uint64 val, string* s) { +void WriteVarint(uint32 num, uint64 val, std::string* s) { WriteVarint(num << 3, s); WriteVarint(val, s); } -void WriteLengthDelimited(uint32 num, StringPiece val, string* s) { +void WriteLengthDelimited(uint32 num, StringPiece val, std::string* s) { WriteVarint((num << 3) + 2, s); WriteVarint(val.size(), s); s->append(val.data(), val.size()); } -std::pair Parse32Fallback(const char* p, uint32 res) { - uint32 extra = 128 + 128 * 128; +std::pair ReadTagFallback(const char* p, uint32 res) { for (std::uint32_t i = 0; i < 3; i++) { std::uint32_t byte = static_cast(p[i]); - res += byte << (7 * (i + 2)); + res += (byte - 1) << (7 * (i + 2)); if (PROTOBUF_PREDICT_TRUE(byte < 128)) { - return {p + i + 1, res - extra}; + return {p + i + 1, res}; } - extra += (1ull << (7 * (i + 3))); - } - return {nullptr, 0}; -} - -std::pair FinishReadTag1Fallback(const char* p, uint32 res) { - uint32 extra = 128; - for (std::uint32_t i = 0; i < 4; i++) { - std::uint32_t byte = static_cast(p[i]); - res += byte << (7 * (i + 1)); - if (PROTOBUF_PREDICT_TRUE(byte < 128)) { - return {p + i + 1, res - extra}; - } - extra += (1ull << (7 * (i + 2))); - } - return {nullptr, 0}; -} - -std::pair FinishReadTag2Fallback(const char* p, uint32 res) { - uint32 extra = 128 * 128; - for (std::uint32_t i = 0; i < 3; i++) { - std::uint32_t byte = static_cast(p[i]); - res += byte << (7 * (i + 2)); - if (PROTOBUF_PREDICT_TRUE(byte < 128)) { - return {p + i + 1, res - extra}; - } - extra += (1ull << (7 * (i + 3))); } return {nullptr, 0}; } std::pair ParseVarint64Fallback(const char* p, uint64 res) { - res >>= 1; - for (std::uint32_t i = 0; i < 4; i++) { - std::uint32_t tmp; - auto pnew = DecodeTwoBytes(p + 2 * i, &tmp); - res += (static_cast(tmp) - 2) << (14 * (i + 1) - 1); - if (PROTOBUF_PREDICT_TRUE(std::int16_t(tmp) >= 0)) { - return {pnew, res}; - } - } - return {nullptr, res}; + return ParseVarint64FallbackInline(p, res); } std::pair ReadSizeFallback(const char* p, uint32 first) { @@ -321,7 +323,7 @@ std::pair ReadSizeFallback(const char* p, uint32 first) { const char* StringParser(const char* begin, const char* end, void* object, ParseContext*) { - auto str = static_cast(object); + auto str = static_cast(object); str->append(begin, end - begin); return end; } @@ -338,7 +340,7 @@ bool VerifyUTF8(StringPiece str, const char* field_name) { return true; } -const char* InlineGreedyStringParserUTF8(string* s, const char* ptr, +const char* InlineGreedyStringParserUTF8(std::string* s, const char* ptr, ParseContext* ctx, const char* field_name) { auto p = InlineGreedyStringParser(s, ptr, ctx); @@ -346,7 +348,7 @@ const char* InlineGreedyStringParserUTF8(string* s, const char* ptr, return p; } -const char* InlineGreedyStringParserUTF8Verify(string* s, const char* ptr, +const char* InlineGreedyStringParserUTF8Verify(std::string* s, const char* ptr, ParseContext* ctx, const char* field_name) { auto p = InlineGreedyStringParser(s, ptr, ctx); @@ -359,15 +361,7 @@ const char* InlineGreedyStringParserUTF8Verify(string* s, const char* ptr, template const char* VarintParser(void* object, const char* ptr, ParseContext* ctx) { - int size = ReadSize(&ptr); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - auto old = ctx->PushLimit(ptr, size); - if (old < 0) return nullptr; - auto repeated_field = static_cast*>(object); - while (!ctx->DoneNoSlopCheck(&ptr)) { - uint64 varint; - ptr = ParseVarint64(ptr, &varint); - if (!ptr) return nullptr; + return ctx->ReadPackedVarint(ptr, [object](uint64 varint) { T val; if (sign) { if (sizeof(T) == 8) { @@ -378,29 +372,8 @@ const char* VarintParser(void* object, const char* ptr, ParseContext* ctx) { } else { val = varint; } - repeated_field->Add(val); - } - ctx->PopLimit(old); - return ptr; -} - -template -const char* FixedParser(void* object, const char* ptr, ParseContext* ctx) { - int size = ReadSize(&ptr); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - auto old = ctx->PushLimit(ptr, size); - GOOGLE_PROTOBUF_PARSER_ASSERT(old >= 0); - auto repeated_field = static_cast*>(object); - while (!ctx->DoneNoSlopCheck(&ptr)) { - int num = (ctx->ConsecutiveBytes(ptr) + sizeof(T) - 1) / sizeof(T); - - const int old_entries = repeated_field->size(); - repeated_field->Reserve(old_entries + num); - std::memcpy(repeated_field->AddNAlreadyReserved(num), ptr, num * sizeof(T)); - ptr = ptr + num * sizeof(T); - } - ctx->PopLimit(old); - return ptr; + static_cast*>(object)->Add(val); + }); } const char* PackedInt32Parser(void* object, const char* ptr, @@ -433,57 +406,45 @@ const char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx) { } const char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx, - bool (*is_valid)(int), string* unknown, + bool (*is_valid)(int), std::string* unknown, int field_num) { - int size = ReadSize(&ptr); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - auto old = ctx->PushLimit(ptr, size); - GOOGLE_PROTOBUF_PARSER_ASSERT(old >= 0); - auto repeated_field = static_cast*>(object); - while (!ctx->DoneNoSlopCheck(&ptr)) { - uint64 varint; - ptr = ParseVarint64(ptr, &varint); - if (!ptr) return nullptr; - int val = varint; - if (is_valid(val)) { - repeated_field->Add(val); - } else { - WriteVarint(field_num, val, unknown); - } - } - ctx->PopLimit(old); - return ptr; + return ctx->ReadPackedVarint( + ptr, [object, is_valid, unknown, field_num](uint64 val) { + if (is_valid(val)) { + static_cast*>(object)->Add(val); + } else { + WriteVarint(field_num, val, unknown); + } + }); } const char* PackedEnumParserArg(void* object, const char* ptr, ParseContext* ctx, bool (*is_valid)(const void*, int), - const void* data, string* unknown, + const void* data, std::string* unknown, int field_num) { - int size = ReadSize(&ptr); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - auto old = ctx->PushLimit(ptr, size); - GOOGLE_PROTOBUF_PARSER_ASSERT(old >= 0); - auto repeated_field = static_cast*>(object); - while (!ctx->DoneNoSlopCheck(&ptr)) { - uint64 varint; - ptr = ParseVarint64(ptr, &varint); - if (!ptr) return nullptr; - int val = varint; - if (is_valid(data, val)) { - repeated_field->Add(val); - } else { - WriteVarint(field_num, val, unknown); - } - } - ctx->PopLimit(old); - return ptr; + return ctx->ReadPackedVarint( + ptr, [object, is_valid, data, unknown, field_num](uint64 val) { + if (is_valid(data, val)) { + static_cast*>(object)->Add(val); + } else { + WriteVarint(field_num, val, unknown); + } + }); } const char* PackedBoolParser(void* object, const char* ptr, ParseContext* ctx) { return VarintParser(object, ptr, ctx); } +template +const char* FixedParser(void* object, const char* ptr, ParseContext* ctx) { + int size = ReadSize(&ptr); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + return ctx->ReadPackedFixed(ptr, size, + static_cast*>(object)); +} + const char* PackedFixed32Parser(void* object, const char* ptr, ParseContext* ctx) { return FixedParser(object, ptr, ctx); @@ -511,7 +472,8 @@ const char* PackedDoubleParser(void* object, const char* ptr, class UnknownFieldLiteParserHelper { public: - explicit UnknownFieldLiteParserHelper(string* unknown) : unknown_(unknown) {} + explicit UnknownFieldLiteParserHelper(std::string* unknown) + : unknown_(unknown) {} void AddVarint(uint32 num, uint64 value) { if (unknown_ == nullptr) return; @@ -554,16 +516,16 @@ class UnknownFieldLiteParserHelper { } private: - string* unknown_; + std::string* unknown_; }; -const char* UnknownGroupLiteParse(string* unknown, const char* ptr, +const char* UnknownGroupLiteParse(std::string* unknown, const char* ptr, ParseContext* ctx) { UnknownFieldLiteParserHelper field_parser(unknown); return WireFormatParser(field_parser, ptr, ctx); } -const char* UnknownFieldParse(uint32 tag, string* unknown, const char* ptr, +const char* UnknownFieldParse(uint32 tag, std::string* unknown, const char* ptr, ParseContext* ctx) { UnknownFieldLiteParserHelper field_parser(unknown); return FieldParser(tag, field_parser, ptr, ctx); diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h index f8122db5c8..82756e3377 100644 --- a/src/google/protobuf/parse_context.h +++ b/src/google/protobuf/parse_context.h @@ -34,9 +34,9 @@ #include #include -#include #include #include +#include #include #include #include @@ -104,7 +104,7 @@ inline void WriteLengthDelimited(uint32 num, StringPiece val, class PROTOBUF_EXPORT EpsCopyInputStream { public: - enum { kSlopBytes = 16 }; + enum { kSlopBytes = 16, kMaxCordBytesToCopy = 512 }; explicit EpsCopyInputStream(bool enable_aliasing) : aliasing_(enable_aliasing ? kOnPatch : kNoAliasing) {} @@ -113,9 +113,9 @@ class PROTOBUF_EXPORT EpsCopyInputStream { GOOGLE_DCHECK(ptr <= buffer_end_ + kSlopBytes); int count; if (next_chunk_ == buffer_) { - count = buffer_end_ + kSlopBytes - ptr; + count = static_cast(buffer_end_ + kSlopBytes - ptr); } else { - count = size_ + (buffer_end_ - ptr); + count = size_ + static_cast(buffer_end_ - ptr); } if (count > 0) zcis_->BackUp(count); } @@ -130,15 +130,13 @@ class PROTOBUF_EXPORT EpsCopyInputStream { return old_limit - limit; } - void PopLimit(int delta) { + PROTOBUF_MUST_USE_RESULT bool PopLimit(int delta, const char* ptr) { // Ensure not to forget to check PushLimit return value GOOGLE_DCHECK(delta >= 0); - // In a correct parse this addition can never overflow because all Pop's - // are paired with a Push. However on an incorrect parse this might not - // be the case. We use unsigned to prevent UB. - limit_ = - static_cast(limit_) + static_cast(delta); + if (ptr == nullptr || ptr - buffer_end_ != limit_) return false; + limit_ = limit_ + delta; limit_end_ = buffer_end_ + (std::min)(0, limit_); + return true; } PROTOBUF_MUST_USE_RESULT const char* Skip(const char* ptr, int size) { @@ -173,14 +171,10 @@ class PROTOBUF_EXPORT EpsCopyInputStream { PROTOBUF_MUST_USE_RESULT const char* ReadPackedFixed(const char* ptr, int size, RepeatedField* out); - template + template PROTOBUF_MUST_USE_RESULT const char* ReadPackedVarint(const char* ptr, Add add); - int ConsecutiveBytes(const char* ptr) const { return limit_end_ - ptr; } - int BytesUntilLimit(const char* ptr) const { - return buffer_end_ - ptr + limit_; - } bool AtLimit(const char* ptr) const { return (ptr - buffer_end_ == limit_) || (next_chunk_ == nullptr && limit_ > 0 && ptr == buffer_end_); @@ -204,6 +198,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream { if (flat.size() > kSlopBytes) { limit_ = kSlopBytes; limit_end_ = buffer_end_ = flat.end() - kSlopBytes; + next_chunk_ = buffer_; if (aliasing_ == kOnPatch) aliasing_ = kNoDelta; return flat.begin(); } else { @@ -223,18 +218,17 @@ class PROTOBUF_EXPORT EpsCopyInputStream { const char* InitFrom(io::ZeroCopyInputStream* zcis, int limit) { auto res = InitFrom(zcis); - limit_ = limit - (buffer_end_ - res); + limit_ = limit - static_cast(buffer_end_ - res); limit_end_ = buffer_end_ + (std::min)(0, limit_); return res; } private: - const char* limit_end_ = - buffer_ + kSlopBytes; // buffer_end_ + min(limit_, 0) - const char* buffer_end_ = buffer_ + kSlopBytes; - const char* next_chunk_ = buffer_; + const char* limit_end_; // buffer_end_ + min(limit_, 0) + const char* buffer_end_; + const char* next_chunk_; int size_; - int limit_ = INT_MAX; // relative to buffer_end_; + int limit_; // relative to buffer_end_; io::ZeroCopyInputStream* zcis_ = nullptr; char buffer_[2 * kSlopBytes] = {}; enum { kNoAliasing = 0, kOnPatch = 1, kNoDelta = 2 }; @@ -249,16 +243,17 @@ class PROTOBUF_EXPORT EpsCopyInputStream { template const char* AppendSize(const char* ptr, int size, const A& append) { int chunk_size = buffer_end_ + kSlopBytes - ptr; - if (size > buffer_end_ - ptr + limit_) return nullptr; do { GOOGLE_DCHECK(size > chunk_size); append(ptr, chunk_size); ptr += chunk_size; size -= chunk_size; + // DoneFallBack asserts it isn't called when exactly on the limit. If this + // happens we fail the parse, as we are at the limit and still more bytes + // to read. + if (limit_ == kSlopBytes) return nullptr; auto res = DoneFallback(ptr, -1); - if (res.second) { - return nullptr; // If done we passed the limit - } + if (res.second) return nullptr; // If done we passed the limit ptr = res.first; chunk_size = buffer_end_ + kSlopBytes - ptr; } while (size > chunk_size); @@ -266,6 +261,11 @@ class PROTOBUF_EXPORT EpsCopyInputStream { return ptr + size; } + // AppendUntilEnd appends data until a limit (either a PushLimit or end of + // stream. Normal payloads are from length delimited fields which have an + // explicit size. Reading until limit only comes when the string takes + // the place of a protobuf, ie RawMessage/StringRawMessage, lazy fields and + // implicit weak messages. We keep these methods private and friend them. template const char* AppendUntilEnd(const char* ptr, const A& append) { while (!DoneWithCheck(&ptr, -1)) { @@ -277,8 +277,8 @@ class PROTOBUF_EXPORT EpsCopyInputStream { PROTOBUF_MUST_USE_RESULT const char* AppendString(const char* ptr, std::string* str) { - return AppendUntilEnd(ptr, - [str](const char* p, int s) { str->append(p, s); }); + return AppendUntilEnd( + ptr, [str](const char* p, ptrdiff_t s) { str->append(p, s); }); } friend class ImplicitWeakMessage; }; @@ -287,8 +287,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream { // 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. -class PROTOBUF_EXPORT ParseContext - : public EpsCopyInputStream { +class PROTOBUF_EXPORT ParseContext : public EpsCopyInputStream { public: struct Data { const DescriptorPool* pool = nullptr; @@ -318,11 +317,15 @@ class PROTOBUF_EXPORT ParseContext const Data& data() const { return data_; } template - PROTOBUF_MUST_USE_RESULT const char* ParseMessage(T* msg, const char* ptr); + PROTOBUF_MUST_USE_RESULT PROTOBUF_ALWAYS_INLINE const char* ParseMessage( + T* msg, const char* ptr); + // We outline when the type is generic and we go through a virtual + const char* ParseMessage(MessageLite* msg, const char* ptr); + const char* ParseMessage(Message* msg, const char* ptr); template - PROTOBUF_MUST_USE_RESULT const char* ParseGroup(T* msg, const char* ptr, - uint32 tag) { + PROTOBUF_MUST_USE_RESULT PROTOBUF_ALWAYS_INLINE const char* ParseGroup( + T* msg, const char* ptr, uint32 tag) { if (--depth_ < 0) return nullptr; group_depth_++; ptr = msg->_InternalParse(ptr, this); @@ -375,90 +378,86 @@ PROTOBUF_MUST_USE_RESULT const char* VarintParse(const char* p, T* out) { return nullptr; } -// Decode 2 consecutive bytes of a varint. Two bytes must be available from -// ptr. Returns ptr + 1 or ptr + 2 depending if the first byte had continuation -// bit set. Stores The value of the varint shifted left by one. -// If bit 15 of *res is set (equivalent to the continuation bits of both bytes -// being set) the varint continues, otherwise the parse is done. On x86 -// movzx eax, word ptr [rdi] -// movsx edx, al -// and eax, edx -// add eax, edx -// adc rdi, 1 -inline const char* DecodeTwoBytes(const char* ptr, uint32* res) { - uint32_t y = UnalignedLoad(ptr); +// Decode 2 consecutive bytes of a varint and returns the value, shifted left +// by 1. It simultaneous updates *ptr to *ptr + 1 or *ptr + 2 depending if the +// first byte's continuation bit is set. +// If bit 15 of return value is set (equivalent to the continuation bits of both +// bytes being set) the varint continues, otherwise the parse is done. On x86 +// movsx eax, dil +// add edi, eax +// adc [rsi], 1 +// add eax, eax +// and eax, edi +inline uint32 DecodeTwoBytes(uint32 value, const char** ptr) { // Sign extend the low byte continuation bit - uint32_t x = static_cast(y); - y &= x; // Mask out the high byte iff no continuation + uint32_t x = static_cast(value); // This add is an amazing operation, it cancels the low byte continuation bit // from y transferring it to the carry. Simultaneously it also shifts the 7 - // LSB left by one tightly against high byte varint bits. Hence y now + // LSB left by one tightly against high byte varint bits. Hence value now // contains the unpacked value shifted left by 1. - y += x; - *res = y; - // If the addition above carried the high byte was part of the varint. Alas - // in c we don't have access to the carry, but a good optimizer compiles this - // down to a "adc" instruction. - return ptr + (y < x ? 2 : 1); -} - -inline uint32 ReadSmallVarint(const char** ptr) { - uint32 res; - *ptr = DecodeTwoBytes(*ptr, &res); - return res >> 1; + value += x; + // Use the carry to update the ptr appropriately. + *ptr += value < x ? 2 : 1; + return value & (x + x); // Mask out the high byte iff no continuation } -std::pair Parse32Fallback(const char* p, uint32 res); - -inline const char* _Parse32(const char* p, uint32* out) { +// Used for tags, could read up to 5 bytes which must be available. +// Caller must ensure its safe to call. +inline const char* ReadTag(const char* p, uint32* out) { return VarintParse<5>(p, out); } -inline const char* ReadTagOne(const char* p, uint32* out) { - *out = static_cast(*p); - return p + 1; -} +std::pair ReadTagFallback(const char* p, uint32 res); -inline const char* ReadTagTwo(const char* p, uint32* out) { +// Will preload the next 2 bytes +inline const char* ReadTag(const char* p, uint32* out, uint32* preload) { uint32 res = static_cast(p[0]); - if (res < 128) { *out = res; return p + 1; } - uint32 byte = static_cast(p[1]); - res += (byte << 7) - 128; - *out = res; - return p + 2; -} - -inline const char* FinishReadTagOne(const char* p, uint32* tag) { - if (*tag & 128) { - uint32 tmp; - p = VarintParse<4>(p, &tmp); - *tag += ((tmp - 1) << 7); + if (res < 128) { + *out = res; + *preload = UnalignedLoad(p + 1); + return p + 1; + } + uint32 second = static_cast(p[1]); + res += (second - 1) << 7; + if (second < 128) { + *out = res; + *preload = UnalignedLoad(p + 2); + return p + 2; } - return p; + auto tmp = ReadTagFallback(p + 2, res); + *out = tmp.second; + return tmp.first; } -inline const char* FinishReadTagTwo(const char* p, uint32* tag) { - if (*tag & (1 << 14)) { - uint32 tmp; - p = VarintParse<3>(p, &tmp); - *tag += ((tmp - 1) << 14); +inline std::pair ParseVarint64FallbackInline(const char* p, + uint64 res) { + res >>= 1; + for (std::uint32_t i = 0; i < 4; i++) { + auto pnew = p + 2 * i; + auto tmp = DecodeTwoBytes(UnalignedLoad(pnew), &pnew); + res += (static_cast(tmp) - 2) << (14 * (i + 1) - 1); + if (PROTOBUF_PREDICT_TRUE(std::int16_t(tmp) >= 0)) { + return {pnew, res}; + } } - return p; + return {nullptr, res}; } -// Used for tags, could read up to 5 bytes which must be available. -// Caller must ensure its safe to call. -inline const char* ReadTag(const char* p, uint32* out) { - return _Parse32(p, out); +inline const char* ParseVarint64Inline(const char* p, uint64* out) { + auto tmp = DecodeTwoBytes(UnalignedLoad(p), &p); + if (PROTOBUF_PREDICT_TRUE(static_cast(tmp) >= 0)) { + *out = tmp >> 1; + return p; + } + auto x = ParseVarint64FallbackInline(p, tmp); + *out = x.second; + return x.first; } std::pair ParseVarint64Fallback(const char* p, uint64 res); -// Used for reading varint wiretype values, could read up to 10 bytes. -// Caller must ensure its safe to call. -inline const char* ParseVarint64(const char* p, uint64* out) { - std::uint32_t tmp; - p = DecodeTwoBytes(p, &tmp); +inline const char* ParseVarint64(const char* p, uint32 preload, uint64* out) { + auto tmp = DecodeTwoBytes(preload, &p); if (PROTOBUF_PREDICT_TRUE(static_cast(tmp) >= 0)) { *out = tmp >> 1; return p; @@ -468,6 +467,12 @@ inline const char* ParseVarint64(const char* p, uint64* out) { return x.first; } +// Used for reading varint wiretype values, could read up to 10 bytes. +// Caller must ensure its safe to call. +inline const char* ParseVarint64(const char* p, uint64* out) { + return ParseVarint64(p, UnalignedLoad(p), out); +} + std::pair ReadSizeFallback(const char* p, uint32 first); // Used for tags, could read up to 5 bytes which must be available. Additionally // it makes sure the unsigned value fits a int32, otherwise returns nullptr. @@ -504,7 +509,25 @@ inline int64 ReadVarintZigZag64(const char** p) { inline int32 ReadVarintZigZag32(const char** p) { uint64 tmp; *p = ParseVarint64(*p, &tmp); - return WireFormatLite::ZigZagDecode32(tmp); + return WireFormatLite::ZigZagDecode32(static_cast(tmp)); +} + +inline uint64 ReadVarint(const char** p, uint32 preload) { + uint64 tmp; + *p = ParseVarint64(*p, preload, &tmp); + return tmp; +} + +inline int64 ReadVarintZigZag64(const char** p, uint32 preload) { + uint64 tmp; + *p = ParseVarint64(*p, preload, &tmp); + return WireFormatLite::ZigZagDecode64(tmp); +} + +inline int32 ReadVarintZigZag32(const char** p, uint32 preload) { + uint64 tmp; + *p = ParseVarint64(*p, preload, &tmp); + return WireFormatLite::ZigZagDecode32(static_cast(tmp)); } template @@ -516,14 +539,12 @@ PROTOBUF_MUST_USE_RESULT const char* ParseContext::ParseMessage( if (--depth_ < 0 || old < 0) return nullptr; ptr = msg->_InternalParse(ptr, this); depth_++; - PopLimit(old); - if (last_tag_minus_1_ != 0) return nullptr; + if (!PopLimit(old, ptr) || last_tag_minus_1_ != 0) return nullptr; return ptr; } -template -PROTOBUF_MUST_USE_RESULT const char* EpsCopyInputStream::ReadPackedVarint( - const char* ptr, Add add) { +template +const char* EpsCopyInputStream::ReadPackedVarint(const char* ptr, Add add) { int size = ReadSize(&ptr); if (ptr == nullptr) return nullptr; auto old = PushLimit(ptr, size); @@ -534,7 +555,7 @@ PROTOBUF_MUST_USE_RESULT const char* EpsCopyInputStream::ReadPackedVarint( if (!ptr) return nullptr; add(varint); } - PopLimit(old); + if (!PopLimit(old, ptr)) return nullptr; return ptr; } @@ -550,10 +571,12 @@ inline PROTOBUF_MUST_USE_RESULT const char* InlineGreedyStringParser( return ctx->ReadString(ptr, size, s); } -PROTOBUF_MUST_USE_RESULT const char* InlineGreedyStringParserUTF8( - std::string* s, const char* ptr, ParseContext* ctx, const char* field_name); -PROTOBUF_MUST_USE_RESULT const char* InlineGreedyStringParserUTF8Verify( - std::string* s, const char* ptr, ParseContext* ctx, const char* field_name); +PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* +InlineGreedyStringParserUTF8(std::string* s, const char* ptr, ParseContext* ctx, + const char* field_name); +PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* +InlineGreedyStringParserUTF8Verify(std::string* s, const char* ptr, + ParseContext* ctx, const char* field_name); // Add any of the following lines to debug which parse function is failing. @@ -566,7 +589,7 @@ PROTOBUF_MUST_USE_RESULT const char* InlineGreedyStringParserUTF8Verify( } #define GOOGLE_PROTOBUF_PARSER_ASSERT(predicate) \ - GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr) + GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr) template PROTOBUF_MUST_USE_RESULT const char* FieldParser(uint64 tag, T& field_parser, @@ -678,7 +701,7 @@ PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* PackedDoubleParser( PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* UnknownGroupLiteParse( std::string* unknown, const char* ptr, ParseContext* ctx); // This is a helper to for the UnknownGroupLiteParse but is actually also -// useful in the generated code. It uses overload on string* vs +// useful in the generated code. It uses overload on std::string* vs // UnknownFieldSet* to make the generated code isomorphic between full and lite. PROTOBUF_EXPORT PROTOBUF_MUST_USE_RESULT const char* UnknownFieldParse( uint32 tag, std::string* unknown, const char* ptr, ParseContext* ctx); diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 50049a357e..42a125cf9d 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -130,10 +130,19 @@ #ifdef PROTOBUF_MUST_USE_RESULT #error PROTOBUF_MUST_USE_RESULT was previously defined #endif +#ifdef PROTOBUF_UNUSED +#error PROTOBUF_UNUSED was previously defined +#endif #define PROTOBUF_NAMESPACE "google::protobuf" #define PROTOBUF_NAMESPACE_ID google::protobuf +#define PROTOBUF_NAMESPACE_OPEN \ + namespace google { \ + namespace protobuf { +#define PROTOBUF_NAMESPACE_CLOSE \ + } /* namespace protobuf */ \ + } /* namespace google */ #define PROTOBUF_DEPRECATED #define PROTOBUF_DEPRECATED_MSG(x) #define PROTOBUF_SECTION_VARIABLE(x) @@ -243,6 +252,20 @@ #define PROTOBUF_FALLTHROUGH_INTENDED #endif +#if defined(__has_cpp_attribute) +#define HAS_ATTRIBUTE(attr) __has_cpp_attribute(attr) +#else +#define HAS_ATTRIBUTE(attr) 0 +#endif + +#if HAS_ATTRIBUTE(unused) || (defined(__GNUC__) && !defined(__clang__)) +#define PROTOBUF_UNUSED __attribute__((__unused__)) +#else +#define PROTOBUF_UNUSED +#endif + +#undef HAS_ATTRIBUTE + #ifdef _MSC_VER #define PROTOBUF_LONGLONG(x) x##I64 #define PROTOBUF_ULONGLONG(x) x##UI64 diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc index f0cca4eea4..feadecd03e 100644 --- a/src/google/protobuf/port_undef.inc +++ b/src/google/protobuf/port_undef.inc @@ -60,6 +60,9 @@ #undef PROTOBUF_EXPORT #undef PROTOC_EXPORT #undef PROTOBUF_MUST_USE_RESULT +#undef PROTOBUF_NAMESPACE_OPEN +#undef PROTOBUF_NAMESPACE_CLOSE +#undef PROTOBUF_UNUSED // Restore macro that may have been #undef'd in port_def.inc. #ifdef _MSC_VER diff --git a/src/google/protobuf/preserve_unknown_enum_test.cc b/src/google/protobuf/preserve_unknown_enum_test.cc index 71826c3815..94addc4077 100644 --- a/src/google/protobuf/preserve_unknown_enum_test.cc +++ b/src/google/protobuf/preserve_unknown_enum_test.cc @@ -99,7 +99,7 @@ void CheckMessage( TEST(PreserveUnknownEnumTest, PreserveParseAndSerialize) { proto3_preserve_unknown_enum_unittest::MyMessagePlusExtra orig_message; FillMessage(&orig_message); - string serialized; + std::string serialized; orig_message.SerializeToString(&serialized); proto3_preserve_unknown_enum_unittest::MyMessage message; @@ -117,7 +117,7 @@ TEST(PreserveUnknownEnumTest, PreserveParseAndSerialize) { TEST(PreserveUnknownEnumTest, PreserveParseAndSerializeDynamicMessage) { proto3_preserve_unknown_enum_unittest::MyMessagePlusExtra orig_message; FillMessage(&orig_message); - string serialized = orig_message.SerializeAsString(); + std::string serialized = orig_message.SerializeAsString(); DynamicMessageFactory factory; std::unique_ptr message( @@ -138,7 +138,7 @@ TEST(PreserveUnknownEnumTest, Proto2HidesUnknownValues) { proto3_preserve_unknown_enum_unittest::MyMessagePlusExtra orig_message; FillMessage(&orig_message); - string serialized; + std::string serialized; orig_message.SerializeToString(&serialized); proto2_preserve_unknown_enum_unittest::MyMessage message; @@ -160,7 +160,7 @@ TEST(PreserveUnknownEnumTest, DynamicProto2HidesUnknownValues) { proto3_preserve_unknown_enum_unittest::MyMessagePlusExtra orig_message; FillMessage(&orig_message); - string serialized; + std::string serialized; orig_message.SerializeToString(&serialized); DynamicMessageFactory factory; @@ -187,7 +187,7 @@ TEST(PreserveUnknownEnumTest, DynamicProto2HidesUnknownValues) { TEST(PreserveUnknownEnumTest, DynamicEnumValueDescriptors) { proto3_preserve_unknown_enum_unittest::MyMessagePlusExtra orig_message; FillMessage(&orig_message); - string serialized; + std::string serialized; orig_message.SerializeToString(&serialized); proto3_preserve_unknown_enum_unittest::MyMessage message; diff --git a/src/google/protobuf/proto3_arena_lite_unittest.cc b/src/google/protobuf/proto3_arena_lite_unittest.cc index 6d2abf63ac..9c6d166f2d 100644 --- a/src/google/protobuf/proto3_arena_lite_unittest.cc +++ b/src/google/protobuf/proto3_arena_lite_unittest.cc @@ -28,8 +28,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include #include +#include #include #include diff --git a/src/google/protobuf/proto3_arena_unittest.cc b/src/google/protobuf/proto3_arena_unittest.cc index a03ed423c0..e3c4777b7c 100644 --- a/src/google/protobuf/proto3_arena_unittest.cc +++ b/src/google/protobuf/proto3_arena_unittest.cc @@ -28,8 +28,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include #include +#include #include #include diff --git a/src/google/protobuf/proto3_lite_unittest.inc b/src/google/protobuf/proto3_lite_unittest.inc index eca9b7062b..636691b49c 100644 --- a/src/google/protobuf/proto3_lite_unittest.inc +++ b/src/google/protobuf/proto3_lite_unittest.inc @@ -28,8 +28,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include #include +#include #include #include diff --git a/src/google/protobuf/reflection.h b/src/google/protobuf/reflection.h index 094701f793..407ca62506 100644 --- a/src/google/protobuf/reflection.h +++ b/src/google/protobuf/reflection.h @@ -338,7 +338,7 @@ namespace internal { // CPPTYPE_FLOAT float float // CPPTYPE_BOOL bool bool // CPPTYPE_ENUM generated enum type int32 -// CPPTYPE_STRING string string +// CPPTYPE_STRING string std::string // CPPTYPE_MESSAGE generated message type google::protobuf::Message // or google::protobuf::Message // @@ -573,7 +573,7 @@ struct RefTypeTraits< } }; -template +template struct RefTypeTraits< T, typename std::enable_if::value>::type> { typedef RepeatedFieldRefIterator iterator; diff --git a/src/google/protobuf/reflection_internal.h b/src/google/protobuf/reflection_internal.h index b3cf659a7e..b4b1d41029 100644 --- a/src/google/protobuf/reflection_internal.h +++ b/src/google/protobuf/reflection_internal.h @@ -127,9 +127,9 @@ class RepeatedFieldWrapper : public RandomAccessRepeatedFieldAccessor { virtual T ConvertToT(const Value* value) const = 0; // Convert an object stored in RepeatedPtrField to an object that will be - // returned by this accessor. If the two objects have the same type (true - // for string fields with ctype=STRING), a pointer to the source object can - // be returned directly. Otherwise, data should be copied from value to + // returned by this accessor. If the two objects have the same type (true for + // string fields with ctype=STRING), a pointer to the source object can be + // returned directly. Otherwise, data should be copied from value to // scratch_space and scratch_space should be returned. virtual const Value* ConvertFromT(const T& value, Value* scratch_space) const = 0; @@ -189,9 +189,9 @@ class RepeatedPtrFieldWrapper : public RandomAccessRepeatedFieldAccessor { virtual void ConvertToT(const Value* value, T* result) const = 0; // Convert an object stored in RepeatedPtrField to an object that will be - // returned by this accessor. If the two objects have the same type (true - // for string fields with ctype=STRING), a pointer to the source object can - // be returned directly. Otherwise, data should be copied from value to + // returned by this accessor. If the two objects have the same type (true for + // string fields with ctype=STRING), a pointer to the source object can be + // returned directly. Otherwise, data should be copied from value to // scratch_space and scratch_space should be returned. virtual const Value* ConvertFromT(const T& value, Value* scratch_space) const = 0; diff --git a/src/google/protobuf/reflection_ops.cc b/src/google/protobuf/reflection_ops.cc index 058f58f3ee..f1eea1f240 100644 --- a/src/google/protobuf/reflection_ops.cc +++ b/src/google/protobuf/reflection_ops.cc @@ -54,7 +54,7 @@ static const Reflection* GetReflectionOrDie(const Message& m) { const Reflection* r = m.GetReflection(); if (r == nullptr) { const Descriptor* d = m.GetDescriptor(); - const string& mtype = d ? d->name() : "unknown"; + const std::string& mtype = d ? d->name() : "unknown"; // RawMessage is one known type for which GetReflection() returns nullptr. GOOGLE_LOG(FATAL) << "Message does not support reflection (type " << mtype << ")."; } @@ -276,10 +276,9 @@ void ReflectionOps::DiscardUnknownFields(Message* message) { } } -static string SubMessagePrefix(const string& prefix, - const FieldDescriptor* field, - int index) { - string result(prefix); +static std::string SubMessagePrefix(const std::string& prefix, + const FieldDescriptor* field, int index) { + std::string result(prefix); if (field->is_extension()) { result.append("("); result.append(field->full_name()); @@ -296,10 +295,9 @@ static string SubMessagePrefix(const string& prefix, return result; } -void ReflectionOps::FindInitializationErrors( - const Message& message, - const string& prefix, - std::vector* errors) { +void ReflectionOps::FindInitializationErrors(const Message& message, + const std::string& prefix, + std::vector* errors) { const Descriptor* descriptor = message.GetDescriptor(); const Reflection* reflection = GetReflectionOrDie(message); diff --git a/src/google/protobuf/reflection_ops_unittest.cc b/src/google/protobuf/reflection_ops_unittest.cc index 9cedb34229..0f46ff133e 100644 --- a/src/google/protobuf/reflection_ops_unittest.cc +++ b/src/google/protobuf/reflection_ops_unittest.cc @@ -419,8 +419,8 @@ TEST(ReflectionOpsTest, OneofIsInitialized) { EXPECT_TRUE(ReflectionOps::IsInitialized(message)); } -static string FindInitializationErrors(const Message& message) { - std::vector errors; +static std::string FindInitializationErrors(const Message& message) { + std::vector errors; ReflectionOps::FindInitializationErrors(message, "", &errors); return Join(errors, ","); } diff --git a/src/google/protobuf/repeated_field.cc b/src/google/protobuf/repeated_field.cc index e09f3e6a97..44b045738a 100644 --- a/src/google/protobuf/repeated_field.cc +++ b/src/google/protobuf/repeated_field.cc @@ -129,7 +129,7 @@ template class PROTOBUF_EXPORT RepeatedField; template class PROTOBUF_EXPORT RepeatedField; template class PROTOBUF_EXPORT RepeatedField; template class PROTOBUF_EXPORT RepeatedField; -template class PROTOBUF_EXPORT RepeatedPtrField; +template class PROTOBUF_EXPORT RepeatedPtrField; } // namespace protobuf } // namespace google diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h index f886d757f5..0515e01441 100644 --- a/src/google/protobuf/repeated_field.h +++ b/src/google/protobuf/repeated_field.h @@ -380,7 +380,7 @@ namespace internal { // arena-related "copy if on different arena" behavior if the necessary methods // exist on the contained type. In particular, we rely on MergeFrom() existing // as a general proxy for the fact that a copy will work, and we also provide a -// specific override for string*. +// specific override for std::string*. template struct TypeImplementsMergeBehaviorProbeForMergeFrom { typedef char HasMerge; @@ -412,7 +412,7 @@ struct TypeImplementsMergeBehavior : template <> -struct TypeImplementsMergeBehavior< ::std::string> { +struct TypeImplementsMergeBehavior { typedef std::true_type type; }; @@ -724,13 +724,13 @@ inline void* GenericTypeHandler::GetMaybeArenaPointer( template <> void GenericTypeHandler::Merge(const MessageLite& from, MessageLite* to); -template<> +template <> inline void GenericTypeHandler::Clear(std::string* value) { value->clear(); } -template<> +template <> void GenericTypeHandler::Merge(const std::string& from, - std::string* to); + std::string* to); // Declarations of the specialization as we cannot define them here, as the // header that defines ProtocolMessage depends on types defined in this header. @@ -765,7 +765,8 @@ class StringTypeHandler { static inline std::string* New(Arena* arena, std::string&& value) { return Arena::Create(arena, std::move(value)); } - static inline std::string* NewFromPrototype(const std::string*, Arena* arena) { + static inline std::string* NewFromPrototype(const std::string*, + Arena* arena) { return New(arena); } static inline Arena* GetArena(std::string*) { return NULL; } @@ -778,8 +779,10 @@ class StringTypeHandler { } } static inline void Clear(std::string* value) { value->clear(); } - static inline void Merge(const std::string& from, std::string* to) { *to = from; } - static size_t SpaceUsedLong(const std::string& value) { + static inline void Merge(const std::string& from, std::string* to) { + *to = from; + } + static size_t SpaceUsedLong(const std::string& value) { return sizeof(value) + StringSpaceUsedExcludingSelfLong(value); } }; @@ -1944,8 +1947,7 @@ class RepeatedPtrField::TypeHandler template <> class RepeatedPtrField::TypeHandler - : public internal::StringTypeHandler { -}; + : public internal::StringTypeHandler {}; template inline RepeatedPtrField::RepeatedPtrField() @@ -2299,7 +2301,7 @@ class RepeatedPtrIterator { : it_(other.it_) { // Force a compiler error if the other type is not convertible to ours. if (false) { - ::google::protobuf::implicit_cast(static_cast(nullptr)); + implicit_cast(static_cast(nullptr)); } } diff --git a/src/google/protobuf/repeated_field_reflection_unittest.cc b/src/google/protobuf/repeated_field_reflection_unittest.cc index 74ec83b050..6ec428e048 100644 --- a/src/google/protobuf/repeated_field_reflection_unittest.cc +++ b/src/google/protobuf/repeated_field_reflection_unittest.cc @@ -54,8 +54,8 @@ static int Func(int i, int j) { return i * j; } -static string StrFunc(int i, int j) { - string str; +static std::string StrFunc(int i, int j) { + std::string str; SStringPrintf(&str, "%d", Func(i, 4)); return str; } @@ -95,8 +95,8 @@ TEST(RepeatedFieldReflectionTest, RegularFields) { refl->MutableRepeatedField(&message, fd_repeated_double); // Get RepeatedPtrField objects for all fields of interest. - const RepeatedPtrField& rpf_string = - refl->GetRepeatedPtrField(message, fd_repeated_string); + const RepeatedPtrField& rpf_string = + refl->GetRepeatedPtrField(message, fd_repeated_string); const RepeatedPtrField& rpf_foreign_message = refl->GetRepeatedPtrField( message, fd_repeated_foreign_message); @@ -105,8 +105,8 @@ TEST(RepeatedFieldReflectionTest, RegularFields) { message, fd_repeated_foreign_message); // Get mutable RepeatedPtrField objects for all fields of interest. - RepeatedPtrField* mrpf_string = - refl->MutableRepeatedPtrField(&message, fd_repeated_string); + RepeatedPtrField* mrpf_string = + refl->MutableRepeatedPtrField(&message, fd_repeated_string); RepeatedPtrField* mrpf_foreign_message = refl->MutableRepeatedPtrField( &message, fd_repeated_foreign_message); @@ -204,10 +204,11 @@ void TestRepeatedFieldRefIteratorForPrimitive( template void TestRepeatedFieldRefIteratorForString( - const RepeatedFieldRef& handle, const MessageType& message, + const RepeatedFieldRef& handle, const MessageType& message, ValueType (MessageType::*GetFunc)(int) const) { int index = 0; - for (typename RepeatedFieldRef::const_iterator it = handle.begin(); + for (typename RepeatedFieldRef::const_iterator it = + handle.begin(); it != handle.end(); ++it) { // Test both operator* and operator-> EXPECT_EQ((message.*GetFunc)(index), *it); @@ -244,8 +245,8 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForRegularFields) { refl->GetRepeatedFieldRef(message, fd_repeated_int32); const RepeatedFieldRef rf_double = refl->GetRepeatedFieldRef(message, fd_repeated_double); - const RepeatedFieldRef rf_string = - refl->GetRepeatedFieldRef(message, fd_repeated_string); + const RepeatedFieldRef rf_string = + refl->GetRepeatedFieldRef(message, fd_repeated_string); const RepeatedFieldRef rf_foreign_message = refl->GetRepeatedFieldRef( message, fd_repeated_foreign_message); @@ -258,8 +259,9 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefForRegularFields) { refl->GetMutableRepeatedFieldRef(&message, fd_repeated_int32); const MutableRepeatedFieldRef mrf_double = refl->GetMutableRepeatedFieldRef(&message, fd_repeated_double); - const MutableRepeatedFieldRef mrf_string = - refl->GetMutableRepeatedFieldRef(&message, fd_repeated_string); + const MutableRepeatedFieldRef mrf_string = + refl->GetMutableRepeatedFieldRef(&message, + fd_repeated_string); const MutableRepeatedFieldRef mrf_foreign_message = refl->GetMutableRepeatedFieldRef( &message, fd_repeated_foreign_message); @@ -603,8 +605,8 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefMergeFromAndSwap) { refl->GetMutableRepeatedFieldRef(&m0, fd_repeated_int32); const MutableRepeatedFieldRef mrf_double = refl->GetMutableRepeatedFieldRef(&m0, fd_repeated_double); - const MutableRepeatedFieldRef mrf_string = - refl->GetMutableRepeatedFieldRef(&m0, fd_repeated_string); + const MutableRepeatedFieldRef mrf_string = + refl->GetMutableRepeatedFieldRef(&m0, fd_repeated_string); const MutableRepeatedFieldRef mrf_foreign_message = refl->GetMutableRepeatedFieldRef( &m0, fd_repeated_foreign_message); @@ -619,7 +621,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefMergeFromAndSwap) { mrf_double.CopyFrom( refl->GetRepeatedFieldRef(m1, fd_repeated_double)); mrf_string.CopyFrom( - refl->GetRepeatedFieldRef(m1, fd_repeated_string)); + refl->GetRepeatedFieldRef(m1, fd_repeated_string)); mrf_foreign_message.CopyFrom( refl->GetRepeatedFieldRef( m1, fd_repeated_foreign_message)); @@ -640,7 +642,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefMergeFromAndSwap) { mrf_double.MergeFrom( refl->GetRepeatedFieldRef(m2, fd_repeated_double)); mrf_string.MergeFrom( - refl->GetRepeatedFieldRef(m2, fd_repeated_string)); + refl->GetRepeatedFieldRef(m2, fd_repeated_string)); mrf_foreign_message.MergeFrom( refl->GetRepeatedFieldRef( m2, fd_repeated_foreign_message)); @@ -662,7 +664,7 @@ TEST(RepeatedFieldReflectionTest, RepeatedFieldRefMergeFromAndSwap) { mrf_double.Swap( refl->GetMutableRepeatedFieldRef(&m2, fd_repeated_double)); mrf_string.Swap( - refl->GetMutableRepeatedFieldRef(&m2, fd_repeated_string)); + refl->GetMutableRepeatedFieldRef(&m2, fd_repeated_string)); mrf_foreign_message.Swap( refl->GetMutableRepeatedFieldRef( &m2, fd_repeated_foreign_message)); diff --git a/src/google/protobuf/repeated_field_unittest.cc b/src/google/protobuf/repeated_field_unittest.cc index d054ac90e0..25ee24c425 100644 --- a/src/google/protobuf/repeated_field_unittest.cc +++ b/src/google/protobuf/repeated_field_unittest.cc @@ -552,7 +552,7 @@ TEST(Movable, Works) { NonMovable& operator=(NonMovable&&) = delete; }; - EXPECT_TRUE(internal::IsMovable::value); + EXPECT_TRUE(internal::IsMovable::value); EXPECT_FALSE(std::is_move_constructible::value); EXPECT_TRUE(std::is_move_assignable::value); @@ -663,9 +663,9 @@ TEST(RepeatedField, ClearThenReserveMore) { // present. Use a 'string' and > 16 bytes length so that the elements are // non-POD and allocate -- the leak checker will catch any skipped destructor // calls here. - RepeatedField field; + RepeatedField field; for (int i = 0; i < 32; i++) { - field.Add(string("abcdefghijklmnopqrstuvwxyz0123456789")); + field.Add(std::string("abcdefghijklmnopqrstuvwxyz0123456789")); } EXPECT_EQ(32, field.size()); field.Clear(); @@ -684,7 +684,7 @@ TEST(RepeatedField, ClearThenReserveMore) { // tests above. TEST(RepeatedPtrField, Small) { - RepeatedPtrField field; + RepeatedPtrField field; EXPECT_TRUE(field.empty()); EXPECT_EQ(field.size(), 0); @@ -728,7 +728,7 @@ TEST(RepeatedPtrField, Small) { } TEST(RepeatedPtrField, Large) { - RepeatedPtrField field; + RepeatedPtrField field; for (int i = 0; i < 16; i++) { *field.Add() += 'a' + i; @@ -741,13 +741,13 @@ TEST(RepeatedPtrField, Large) { EXPECT_EQ(field.Get(i)[0], 'a' + i); } - int min_expected_usage = 16 * sizeof(string); + int min_expected_usage = 16 * sizeof(std::string); EXPECT_GE(field.SpaceUsedExcludingSelf(), min_expected_usage); } TEST(RepeatedPtrField, SwapSmallSmall) { - RepeatedPtrField field1; - RepeatedPtrField field2; + RepeatedPtrField field1; + RepeatedPtrField field2; EXPECT_TRUE(field1.empty()); EXPECT_EQ(field1.size(), 0); @@ -776,8 +776,8 @@ TEST(RepeatedPtrField, SwapSmallSmall) { } TEST(RepeatedPtrField, SwapLargeSmall) { - RepeatedPtrField field1; - RepeatedPtrField field2; + RepeatedPtrField field1; + RepeatedPtrField field2; field2.Add()->assign("foo"); field2.Add()->assign("bar"); @@ -797,8 +797,8 @@ TEST(RepeatedPtrField, SwapLargeSmall) { } TEST(RepeatedPtrField, SwapLargeLarge) { - RepeatedPtrField field1; - RepeatedPtrField field2; + RepeatedPtrField field1; + RepeatedPtrField field2; field1.Add()->assign("foo"); field1.Add()->assign("bar"); @@ -822,8 +822,8 @@ TEST(RepeatedPtrField, SwapLargeLarge) { } } -static int ReservedSpace(RepeatedPtrField* field) { - const string* const* ptr = field->data(); +static int ReservedSpace(RepeatedPtrField* field) { + const std::string* const* ptr = field->data(); do { field->Add(); } while (field->data() == ptr); @@ -832,14 +832,14 @@ static int ReservedSpace(RepeatedPtrField* field) { } TEST(RepeatedPtrField, ReserveMoreThanDouble) { - RepeatedPtrField field; + RepeatedPtrField field; field.Reserve(20); EXPECT_LE(20, ReservedSpace(&field)); } TEST(RepeatedPtrField, ReserveLessThanDouble) { - RepeatedPtrField field; + RepeatedPtrField field; field.Reserve(20); int capacity = field.Capacity(); @@ -850,9 +850,9 @@ TEST(RepeatedPtrField, ReserveLessThanDouble) { } TEST(RepeatedPtrField, ReserveLessThanExisting) { - RepeatedPtrField field; + RepeatedPtrField field; field.Reserve(20); - const string* const* previous_ptr = field.data(); + const std::string* const* previous_ptr = field.data(); field.Reserve(10); EXPECT_EQ(previous_ptr, field.data()); @@ -863,8 +863,8 @@ TEST(RepeatedPtrField, ReserveDoesntLoseAllocated) { // Check that a bug is fixed: An earlier implementation of Reserve() // failed to copy pointers to allocated-but-cleared objects, possibly // leading to segfaults. - RepeatedPtrField field; - string* first = field.Add(); + RepeatedPtrField field; + std::string* first = field.Add(); field.RemoveLast(); field.Reserve(20); @@ -874,9 +874,9 @@ TEST(RepeatedPtrField, ReserveDoesntLoseAllocated) { // Clearing elements is tricky with RepeatedPtrFields since the memory for // the elements is retained and reused. TEST(RepeatedPtrField, ClearedElements) { - RepeatedPtrField field; + RepeatedPtrField field; - string* original = field.Add(); + std::string* original = field.Add(); *original = "foo"; EXPECT_EQ(field.ClearedCount(), 0); @@ -885,7 +885,8 @@ TEST(RepeatedPtrField, ClearedElements) { EXPECT_TRUE(original->empty()); EXPECT_EQ(field.ClearedCount(), 1); - EXPECT_EQ(field.Add(), original); // Should return same string for reuse. + EXPECT_EQ(field.Add(), + original); // Should return same string for reuse. EXPECT_EQ(field.ReleaseLast(), original); // We take ownership. EXPECT_EQ(field.ClearedCount(), 0); @@ -914,7 +915,7 @@ TEST(RepeatedPtrField, ClearedElements) { // Test all code paths in AddAllocated(). TEST(RepeatedPtrField, AddAlocated) { - RepeatedPtrField field; + RepeatedPtrField field; while (field.size() < field.Capacity()) { field.Add()->assign("filler"); } @@ -922,14 +923,14 @@ TEST(RepeatedPtrField, AddAlocated) { int index = field.size(); // First branch: Field is at capacity with no cleared objects. - string* foo = new string("foo"); + std::string* foo = new std::string("foo"); field.AddAllocated(foo); EXPECT_EQ(index + 1, field.size()); EXPECT_EQ(0, field.ClearedCount()); EXPECT_EQ(foo, &field.Get(index)); // Last branch: Field is not at capacity and there are no cleared objects. - string* bar = new string("bar"); + std::string* bar = new std::string("bar"); field.AddAllocated(bar); ++index; EXPECT_EQ(index + 1, field.size()); @@ -938,7 +939,7 @@ TEST(RepeatedPtrField, AddAlocated) { // Third branch: Field is not at capacity and there are no cleared objects. field.RemoveLast(); - string* baz = new string("baz"); + std::string* baz = new std::string("baz"); field.AddAllocated(baz); EXPECT_EQ(index + 1, field.size()); EXPECT_EQ(1, field.ClearedCount()); @@ -950,7 +951,7 @@ TEST(RepeatedPtrField, AddAlocated) { } field.RemoveLast(); index = field.size(); - string* qux = new string("qux"); + std::string* qux = new std::string("qux"); field.AddAllocated(qux); EXPECT_EQ(index + 1, field.size()); // We should have discarded the cleared object. @@ -959,7 +960,7 @@ TEST(RepeatedPtrField, AddAlocated) { } TEST(RepeatedPtrField, MergeFrom) { - RepeatedPtrField source, destination; + RepeatedPtrField source, destination; source.Add()->assign("4"); source.Add()->assign("5"); destination.Add()->assign("1"); @@ -978,7 +979,7 @@ TEST(RepeatedPtrField, MergeFrom) { TEST(RepeatedPtrField, CopyFrom) { - RepeatedPtrField source, destination; + RepeatedPtrField source, destination; source.Add()->assign("4"); source.Add()->assign("5"); destination.Add()->assign("1"); @@ -993,7 +994,7 @@ TEST(RepeatedPtrField, CopyFrom) { } TEST(RepeatedPtrField, CopyFromSelf) { - RepeatedPtrField me; + RepeatedPtrField me; me.Add()->assign("1"); me.CopyFrom(me); ASSERT_EQ(1, me.size()); @@ -1001,8 +1002,8 @@ TEST(RepeatedPtrField, CopyFromSelf) { } TEST(RepeatedPtrField, Erase) { - RepeatedPtrField me; - RepeatedPtrField::iterator it = me.erase(me.begin(), me.end()); + RepeatedPtrField me; + RepeatedPtrField::iterator it = me.erase(me.begin(), me.end()); EXPECT_TRUE(me.begin() == it); EXPECT_EQ(0, me.size()); @@ -1034,11 +1035,11 @@ TEST(RepeatedPtrField, Erase) { } TEST(RepeatedPtrField, CopyConstruct) { - RepeatedPtrField source; + RepeatedPtrField source; source.Add()->assign("1"); source.Add()->assign("2"); - RepeatedPtrField destination(source); + RepeatedPtrField destination(source); ASSERT_EQ(2, destination.size()); EXPECT_EQ("1", destination.Get(0)); @@ -1046,16 +1047,16 @@ TEST(RepeatedPtrField, CopyConstruct) { } TEST(RepeatedPtrField, IteratorConstruct_String) { - std::vector values; + std::vector values; values.push_back("1"); values.push_back("2"); - RepeatedPtrField field(values.begin(), values.end()); + RepeatedPtrField field(values.begin(), values.end()); ASSERT_EQ(values.size(), field.size()); EXPECT_EQ(values[0], field.Get(0)); EXPECT_EQ(values[1], field.Get(1)); - RepeatedPtrField other(field.begin(), field.end()); + RepeatedPtrField other(field.begin(), field.end()); ASSERT_EQ(values.size(), other.size()); EXPECT_EQ(values[0], other.Get(0)); EXPECT_EQ(values[1], other.Get(1)); @@ -1081,7 +1082,7 @@ TEST(RepeatedPtrField, IteratorConstruct_Proto) { } TEST(RepeatedPtrField, CopyAssign) { - RepeatedPtrField source, destination; + RepeatedPtrField source, destination; source.Add()->assign("4"); source.Add()->assign("5"); destination.Add()->assign("1"); @@ -1097,7 +1098,7 @@ TEST(RepeatedPtrField, CopyAssign) { TEST(RepeatedPtrField, SelfAssign) { // Verify that assignment to self does not destroy data. - RepeatedPtrField source, *p; + RepeatedPtrField source, *p; p = &source; source.Add()->assign("7"); source.Add()->assign("8"); @@ -1111,11 +1112,11 @@ TEST(RepeatedPtrField, SelfAssign) { TEST(RepeatedPtrField, MoveConstruct) { { - RepeatedPtrField source; + RepeatedPtrField source; *source.Add() = "1"; *source.Add() = "2"; - const string* const* data = source.data(); - RepeatedPtrField destination = std::move(source); + const std::string* const* data = source.data(); + RepeatedPtrField destination = std::move(source); EXPECT_EQ(data, destination.data()); EXPECT_THAT(destination, ElementsAre("1", "2")); // This property isn't guaranteed but it's useful to have a test that would @@ -1124,11 +1125,11 @@ TEST(RepeatedPtrField, MoveConstruct) { } { Arena arena; - RepeatedPtrField* source = - Arena::CreateMessage>(&arena); + RepeatedPtrField* source = + Arena::CreateMessage>(&arena); *source->Add() = "1"; *source->Add() = "2"; - RepeatedPtrField destination = std::move(*source); + RepeatedPtrField destination = std::move(*source); EXPECT_EQ(nullptr, destination.GetArena()); EXPECT_THAT(destination, ElementsAre("1", "2")); // This property isn't guaranteed but it's useful to have a test that would @@ -1139,13 +1140,13 @@ TEST(RepeatedPtrField, MoveConstruct) { TEST(RepeatedPtrField, MoveAssign) { { - RepeatedPtrField source; + RepeatedPtrField source; *source.Add() = "1"; *source.Add() = "2"; - RepeatedPtrField destination; + RepeatedPtrField destination; *destination.Add() = "3"; - const string* const* source_data = source.data(); - const string* const* destination_data = destination.data(); + const std::string* const* source_data = source.data(); + const std::string* const* destination_data = destination.data(); destination = std::move(source); EXPECT_EQ(source_data, destination.data()); EXPECT_THAT(destination, ElementsAre("1", "2")); @@ -1156,15 +1157,15 @@ TEST(RepeatedPtrField, MoveAssign) { } { Arena arena; - RepeatedPtrField* source = - Arena::CreateMessage>(&arena); + RepeatedPtrField* source = + Arena::CreateMessage>(&arena); *source->Add() = "1"; *source->Add() = "2"; - RepeatedPtrField* destination = - Arena::CreateMessage>(&arena); + RepeatedPtrField* destination = + Arena::CreateMessage>(&arena); *destination->Add() = "3"; - const string* const* source_data = source->data(); - const string* const* destination_data = destination->data(); + const std::string* const* source_data = source->data(); + const std::string* const* destination_data = destination->data(); *destination = std::move(*source); EXPECT_EQ(source_data, destination->data()); EXPECT_THAT(*destination, ElementsAre("1", "2")); @@ -1175,13 +1176,13 @@ TEST(RepeatedPtrField, MoveAssign) { } { Arena source_arena; - RepeatedPtrField* source = - Arena::CreateMessage>(&source_arena); + RepeatedPtrField* source = + Arena::CreateMessage>(&source_arena); *source->Add() = "1"; *source->Add() = "2"; Arena destination_arena; - RepeatedPtrField* destination = - Arena::CreateMessage>(&destination_arena); + RepeatedPtrField* destination = + Arena::CreateMessage>(&destination_arena); *destination->Add() = "3"; *destination = std::move(*source); EXPECT_THAT(*destination, ElementsAre("1", "2")); @@ -1191,11 +1192,11 @@ TEST(RepeatedPtrField, MoveAssign) { } { Arena arena; - RepeatedPtrField* source = - Arena::CreateMessage>(&arena); + RepeatedPtrField* source = + Arena::CreateMessage>(&arena); *source->Add() = "1"; *source->Add() = "2"; - RepeatedPtrField destination; + RepeatedPtrField destination; *destination.Add() = "3"; destination = std::move(*source); EXPECT_THAT(destination, ElementsAre("1", "2")); @@ -1204,12 +1205,12 @@ TEST(RepeatedPtrField, MoveAssign) { EXPECT_THAT(*source, ElementsAre("1", "2")); } { - RepeatedPtrField source; + RepeatedPtrField source; *source.Add() = "1"; *source.Add() = "2"; Arena arena; - RepeatedPtrField* destination = - Arena::CreateMessage>(&arena); + RepeatedPtrField* destination = + Arena::CreateMessage>(&arena); *destination->Add() = "3"; *destination = std::move(source); EXPECT_THAT(*destination, ElementsAre("1", "2")); @@ -1218,23 +1219,23 @@ TEST(RepeatedPtrField, MoveAssign) { EXPECT_THAT(source, ElementsAre("1", "2")); } { - RepeatedPtrField field; + RepeatedPtrField field; // An alias to defeat -Wself-move. - RepeatedPtrField& alias = field; + RepeatedPtrField& alias = field; *field.Add() = "1"; *field.Add() = "2"; - const string* const* data = field.data(); + const std::string* const* data = field.data(); field = std::move(alias); EXPECT_EQ(data, field.data()); EXPECT_THAT(field, ElementsAre("1", "2")); } { Arena arena; - RepeatedPtrField* field = - Arena::CreateMessage>(&arena); + RepeatedPtrField* field = + Arena::CreateMessage>(&arena); *field->Add() = "1"; *field->Add() = "2"; - const string* const* data = field->data(); + const std::string* const* data = field->data(); *field = std::move(*field); EXPECT_EQ(data, field->data()); EXPECT_THAT(*field, ElementsAre("1", "2")); @@ -1242,23 +1243,23 @@ TEST(RepeatedPtrField, MoveAssign) { } TEST(RepeatedPtrField, MutableDataIsMutable) { - RepeatedPtrField field; + RepeatedPtrField field; *field.Add() = "1"; EXPECT_EQ("1", field.Get(0)); // The fact that this line compiles would be enough, but we'll check the // value anyway. - string** data = field.mutable_data(); + std::string** data = field.mutable_data(); **data = "2"; EXPECT_EQ("2", field.Get(0)); } TEST(RepeatedPtrField, SubscriptOperators) { - RepeatedPtrField field; + RepeatedPtrField field; *field.Add() = "1"; EXPECT_EQ("1", field.Get(0)); EXPECT_EQ("1", field[0]); EXPECT_EQ(field.Mutable(0), &field[0]); - const RepeatedPtrField& const_field = field; + const RepeatedPtrField& const_field = field; EXPECT_EQ(*field.data(), &const_field[0]); } @@ -1269,12 +1270,12 @@ TEST(RepeatedPtrField, ExtractSubrange) { for (int num = 0; num <= sz; ++num) { for (int start = 0; start < sz - num; ++start) { for (int extra = 0; extra < 4; ++extra) { - std::vector subject; + std::vector subject; // Create an array with "sz" elements and "extra" cleared elements. - RepeatedPtrField field; + RepeatedPtrField field; for (int i = 0; i < sz + extra; ++i) { - subject.push_back(new string()); + subject.push_back(new std::string()); field.AddAllocated(subject[i]); } EXPECT_EQ(field.size(), sz + extra); @@ -1284,7 +1285,7 @@ TEST(RepeatedPtrField, ExtractSubrange) { EXPECT_EQ(field.ClearedCount(), extra); // Create a catcher array and call ExtractSubrange. - string* catcher[10]; + std::string* catcher[10]; for (int i = 0; i < 10; ++i) catcher[i] = NULL; field.ExtractSubrange(start, num, catcher); @@ -1394,18 +1395,18 @@ class RepeatedPtrFieldIteratorTest : public testing::Test { proto_array_.Add()->assign("baz"); } - RepeatedPtrField proto_array_; + RepeatedPtrField proto_array_; }; TEST_F(RepeatedPtrFieldIteratorTest, Convertible) { - RepeatedPtrField::iterator iter = proto_array_.begin(); - RepeatedPtrField::const_iterator c_iter = iter; - RepeatedPtrField::value_type value = *c_iter; + RepeatedPtrField::iterator iter = proto_array_.begin(); + RepeatedPtrField::const_iterator c_iter = iter; + RepeatedPtrField::value_type value = *c_iter; EXPECT_EQ("foo", value); } TEST_F(RepeatedPtrFieldIteratorTest, MutableIteration) { - RepeatedPtrField::iterator iter = proto_array_.begin(); + RepeatedPtrField::iterator iter = proto_array_.begin(); EXPECT_EQ("foo", *iter); ++iter; EXPECT_EQ("bar", *(iter++)); @@ -1416,8 +1417,9 @@ TEST_F(RepeatedPtrFieldIteratorTest, MutableIteration) { } TEST_F(RepeatedPtrFieldIteratorTest, ConstIteration) { - const RepeatedPtrField& const_proto_array = proto_array_; - RepeatedPtrField::const_iterator iter = const_proto_array.begin(); + const RepeatedPtrField& const_proto_array = proto_array_; + RepeatedPtrField::const_iterator iter = + const_proto_array.begin(); EXPECT_EQ("foo", *iter); ++iter; EXPECT_EQ("bar", *(iter++)); @@ -1428,7 +1430,7 @@ TEST_F(RepeatedPtrFieldIteratorTest, ConstIteration) { } TEST_F(RepeatedPtrFieldIteratorTest, MutableReverseIteration) { - RepeatedPtrField::reverse_iterator iter = proto_array_.rbegin(); + RepeatedPtrField::reverse_iterator iter = proto_array_.rbegin(); EXPECT_EQ("baz", *iter); ++iter; EXPECT_EQ("bar", *(iter++)); @@ -1439,9 +1441,9 @@ TEST_F(RepeatedPtrFieldIteratorTest, MutableReverseIteration) { } TEST_F(RepeatedPtrFieldIteratorTest, ConstReverseIteration) { - const RepeatedPtrField& const_proto_array = proto_array_; - RepeatedPtrField::const_reverse_iterator iter - = const_proto_array.rbegin(); + const RepeatedPtrField& const_proto_array = proto_array_; + RepeatedPtrField::const_reverse_iterator iter = + const_proto_array.rbegin(); EXPECT_EQ("baz", *iter); ++iter; EXPECT_EQ("bar", *(iter++)); @@ -1452,8 +1454,8 @@ TEST_F(RepeatedPtrFieldIteratorTest, ConstReverseIteration) { } TEST_F(RepeatedPtrFieldIteratorTest, RandomAccess) { - RepeatedPtrField::iterator iter = proto_array_.begin(); - RepeatedPtrField::iterator iter2 = iter; + RepeatedPtrField::iterator iter = proto_array_.begin(); + RepeatedPtrField::iterator iter2 = iter; ++iter2; ++iter2; EXPECT_TRUE(iter + 2 == iter2); @@ -1464,8 +1466,8 @@ TEST_F(RepeatedPtrFieldIteratorTest, RandomAccess) { } TEST_F(RepeatedPtrFieldIteratorTest, Comparable) { - RepeatedPtrField::const_iterator iter = proto_array_.begin(); - RepeatedPtrField::const_iterator iter2 = iter + 1; + RepeatedPtrField::const_iterator iter = proto_array_.begin(); + RepeatedPtrField::const_iterator iter2 = iter + 1; EXPECT_TRUE(iter == iter); EXPECT_TRUE(iter != iter2); EXPECT_TRUE(iter < iter2); @@ -1478,7 +1480,7 @@ TEST_F(RepeatedPtrFieldIteratorTest, Comparable) { // Uninitialized iterator does not point to any of the RepeatedPtrField. TEST_F(RepeatedPtrFieldIteratorTest, UninitializedIterator) { - RepeatedPtrField::iterator iter; + RepeatedPtrField::iterator iter; EXPECT_TRUE(iter != proto_array_.begin()); EXPECT_TRUE(iter != proto_array_.begin() + 1); EXPECT_TRUE(iter != proto_array_.begin() + 2); @@ -1496,8 +1498,8 @@ TEST_F(RepeatedPtrFieldIteratorTest, STLAlgorithms_lower_bound) { proto_array_.Add()->assign("x"); proto_array_.Add()->assign("y"); - string v = "f"; - RepeatedPtrField::const_iterator it = + std::string v = "f"; + RepeatedPtrField::const_iterator it = std::lower_bound(proto_array_.begin(), proto_array_.end(), v); EXPECT_EQ(*it, "n"); @@ -1505,7 +1507,7 @@ TEST_F(RepeatedPtrFieldIteratorTest, STLAlgorithms_lower_bound) { } TEST_F(RepeatedPtrFieldIteratorTest, Mutation) { - RepeatedPtrField::iterator iter = proto_array_.begin(); + RepeatedPtrField::iterator iter = proto_array_.begin(); *iter = "qux"; EXPECT_EQ("qux", proto_array_.Get(0)); } @@ -1521,24 +1523,24 @@ class RepeatedPtrFieldPtrsIteratorTest : public testing::Test { const_proto_array_ = &proto_array_; } - RepeatedPtrField proto_array_; - const RepeatedPtrField* const_proto_array_; + RepeatedPtrField proto_array_; + const RepeatedPtrField* const_proto_array_; }; TEST_F(RepeatedPtrFieldPtrsIteratorTest, ConvertiblePtr) { - RepeatedPtrField::pointer_iterator iter = + RepeatedPtrField::pointer_iterator iter = proto_array_.pointer_begin(); static_cast(iter); } TEST_F(RepeatedPtrFieldPtrsIteratorTest, ConvertibleConstPtr) { - RepeatedPtrField::const_pointer_iterator iter = + RepeatedPtrField::const_pointer_iterator iter = const_proto_array_->pointer_begin(); static_cast(iter); } TEST_F(RepeatedPtrFieldPtrsIteratorTest, MutablePtrIteration) { - RepeatedPtrField::pointer_iterator iter = + RepeatedPtrField::pointer_iterator iter = proto_array_.pointer_begin(); EXPECT_EQ("foo", **iter); ++iter; @@ -1550,7 +1552,7 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, MutablePtrIteration) { } TEST_F(RepeatedPtrFieldPtrsIteratorTest, MutableConstPtrIteration) { - RepeatedPtrField::const_pointer_iterator iter = + RepeatedPtrField::const_pointer_iterator iter = const_proto_array_->pointer_begin(); EXPECT_EQ("foo", **iter); ++iter; @@ -1562,9 +1564,9 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, MutableConstPtrIteration) { } TEST_F(RepeatedPtrFieldPtrsIteratorTest, RandomPtrAccess) { - RepeatedPtrField::pointer_iterator iter = + RepeatedPtrField::pointer_iterator iter = proto_array_.pointer_begin(); - RepeatedPtrField::pointer_iterator iter2 = iter; + RepeatedPtrField::pointer_iterator iter2 = iter; ++iter2; ++iter2; EXPECT_TRUE(iter + 2 == iter2); @@ -1575,9 +1577,9 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, RandomPtrAccess) { } TEST_F(RepeatedPtrFieldPtrsIteratorTest, RandomConstPtrAccess) { - RepeatedPtrField::const_pointer_iterator iter = + RepeatedPtrField::const_pointer_iterator iter = const_proto_array_->pointer_begin(); - RepeatedPtrField::const_pointer_iterator iter2 = iter; + RepeatedPtrField::const_pointer_iterator iter2 = iter; ++iter2; ++iter2; EXPECT_TRUE(iter + 2 == iter2); @@ -1588,9 +1590,9 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, RandomConstPtrAccess) { } TEST_F(RepeatedPtrFieldPtrsIteratorTest, ComparablePtr) { - RepeatedPtrField::pointer_iterator iter = + RepeatedPtrField::pointer_iterator iter = proto_array_.pointer_begin(); - RepeatedPtrField::pointer_iterator iter2 = iter + 1; + RepeatedPtrField::pointer_iterator iter2 = iter + 1; EXPECT_TRUE(iter == iter); EXPECT_TRUE(iter != iter2); EXPECT_TRUE(iter < iter2); @@ -1602,9 +1604,9 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, ComparablePtr) { } TEST_F(RepeatedPtrFieldPtrsIteratorTest, ComparableConstPtr) { - RepeatedPtrField::const_pointer_iterator iter = + RepeatedPtrField::const_pointer_iterator iter = const_proto_array_->pointer_begin(); - RepeatedPtrField::const_pointer_iterator iter2 = iter + 1; + RepeatedPtrField::const_pointer_iterator iter2 = iter + 1; EXPECT_TRUE(iter == iter); EXPECT_TRUE(iter != iter2); EXPECT_TRUE(iter < iter2); @@ -1618,7 +1620,7 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, ComparableConstPtr) { // Uninitialized iterator does not point to any of the RepeatedPtrOverPtrs. // Dereferencing an uninitialized iterator crashes the process. TEST_F(RepeatedPtrFieldPtrsIteratorTest, UninitializedPtrIterator) { - RepeatedPtrField::pointer_iterator iter; + RepeatedPtrField::pointer_iterator iter; EXPECT_TRUE(iter != proto_array_.pointer_begin()); EXPECT_TRUE(iter != proto_array_.pointer_begin() + 1); EXPECT_TRUE(iter != proto_array_.pointer_begin() + 2); @@ -1627,7 +1629,7 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, UninitializedPtrIterator) { } TEST_F(RepeatedPtrFieldPtrsIteratorTest, UninitializedConstPtrIterator) { - RepeatedPtrField::const_pointer_iterator iter; + RepeatedPtrField::const_pointer_iterator iter; EXPECT_TRUE(iter != const_proto_array_->pointer_begin()); EXPECT_TRUE(iter != const_proto_array_->pointer_begin() + 1); EXPECT_TRUE(iter != const_proto_array_->pointer_begin() + 2); @@ -1637,13 +1639,14 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, UninitializedConstPtrIterator) { // This comparison functor is required by the tests for RepeatedPtrOverPtrs. // They operate on strings and need to compare strings as strings in -// any stl algorithm, even though the iterator returns a pointer to a string -// - i.e. *iter has type string*. +// any stl algorithm, even though the iterator returns a pointer to a +// string +// - i.e. *iter has type std::string*. struct StringLessThan { - bool operator()(const string* z, const string& y) { - return *z < y; + bool operator()(const std::string* z, const std::string& y) { return *z < y; } + bool operator()(const std::string* z, const std::string* y) const { + return *z < *y; } - bool operator()(const string* z, const string* y) const { return *z < *y; } }; TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) { @@ -1657,8 +1660,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) { proto_array_.Add()->assign("y"); { - string v = "f"; - RepeatedPtrField::pointer_iterator it = + std::string v = "f"; + RepeatedPtrField::pointer_iterator it = std::lower_bound(proto_array_.pointer_begin(), proto_array_.pointer_end(), &v, StringLessThan()); @@ -1668,8 +1671,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) { EXPECT_TRUE(it == proto_array_.pointer_begin() + 3); } { - string v = "f"; - RepeatedPtrField::const_pointer_iterator it = std::lower_bound( + std::string v = "f"; + RepeatedPtrField::const_pointer_iterator it = std::lower_bound( const_proto_array_->pointer_begin(), const_proto_array_->pointer_end(), &v, StringLessThan()); @@ -1681,7 +1684,7 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) { } TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrMutation) { - RepeatedPtrField::pointer_iterator iter = + RepeatedPtrField::pointer_iterator iter = proto_array_.pointer_begin(); **iter = "qux"; EXPECT_EQ("qux", proto_array_.Get(0)); @@ -1690,10 +1693,10 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrMutation) { EXPECT_EQ("baz", proto_array_.Get(2)); ++iter; delete *iter; - *iter = new string("a"); + *iter = new std::string("a"); ++iter; delete *iter; - *iter = new string("b"); + *iter = new std::string("b"); EXPECT_EQ("a", proto_array_.Get(1)); EXPECT_EQ("b", proto_array_.Get(2)); } @@ -1727,7 +1730,7 @@ class RepeatedFieldInsertionIteratorsTest : public testing::Test { protected: std::list halves; std::list fibonacci; - std::vector words; + std::vector words; typedef TestAllTypes::NestedMessage Nested; Nested nesteds[2]; std::vector nested_ptrs; @@ -1850,10 +1853,10 @@ TEST_F(RepeatedFieldInsertionIteratorsTest, TEST_F(RepeatedFieldInsertionIteratorsTest, AllocatedRepeatedPtrFieldWithString) { - std::vector data; + std::vector data; TestAllTypes goldenproto; for (int i = 0; i < 10; ++i) { - string* new_data = new string; + std::string* new_data = new std::string; *new_data = "name-" + StrCat(i); data.push_back(new_data); @@ -1887,10 +1890,10 @@ TEST_F(RepeatedFieldInsertionIteratorsTest, TEST_F(RepeatedFieldInsertionIteratorsTest, UnsafeArenaAllocatedRepeatedPtrFieldWithString) { - std::vector data; + std::vector data; TestAllTypes goldenproto; for (int i = 0; i < 10; ++i) { - string* new_data = new string; + std::string* new_data = new std::string; *new_data = "name-" + StrCat(i); data.push_back(new_data); @@ -1905,8 +1908,9 @@ TEST_F(RepeatedFieldInsertionIteratorsTest, } TEST_F(RepeatedFieldInsertionIteratorsTest, MoveStrings) { - std::vector src = {"a", "b", "c", "d"}; - std::vector copy = src; // copy since move leaves in undefined state + std::vector src = {"a", "b", "c", "d"}; + std::vector copy = + src; // copy since move leaves in undefined state TestAllTypes testproto; std::move(copy.begin(), copy.end(), RepeatedFieldBackInserter(testproto.mutable_repeated_string())); diff --git a/src/google/protobuf/service.h b/src/google/protobuf/service.h index 0792817a67..a9339eb885 100644 --- a/src/google/protobuf/service.h +++ b/src/google/protobuf/service.h @@ -101,8 +101,8 @@ #define GOOGLE_PROTOBUF_SERVICE_H__ #include -#include #include +#include #ifdef SWIG #error "You cannot SWIG proto headers" diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index 566eed7d65..e6cce71751 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,53 +16,51 @@ // @@protoc_insertion_point(includes) #include -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class SourceContextDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _SourceContext_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsSourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_SourceContext_default_instance_; - new (ptr) ::google::protobuf::SourceContext(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::SourceContext(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::SourceContext::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::SourceContext::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[1]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceContext, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::SourceContext, file_name_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::SourceContext, file_name_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::protobuf::SourceContext)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::SourceContext)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_SourceContext_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_SourceContext_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, file_level_service_descriptors_google_2fprotobuf_2fsource_5fcontext_2eproto, @@ -77,23 +75,22 @@ const char descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eprot "text\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTy" "pesb\006proto3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto = { false, InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto, descriptor_table_protodef_google_2fprotobuf_2fsource_5fcontext_2eproto, "google/protobuf/source_context.proto", &assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto, 251, }; void AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fsource_5fcontext_2eproto = []() { AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN // =================================================================== @@ -108,25 +105,25 @@ const int SourceContext::kFileNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SourceContext::SourceContext() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.SourceContext) } SourceContext::SourceContext(const SourceContext& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (from.file_name().size() > 0) { - file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.file_name_); + file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_); } // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext) } void SourceContext::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base); - file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } SourceContext::~SourceContext() { @@ -135,39 +132,40 @@ SourceContext::~SourceContext() { } void SourceContext::SharedDtor() { - file_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void SourceContext::SetCachedSize(int size) const { _cached_size_.Set(size); } const SourceContext& SourceContext::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto.base); return *internal_default_instance(); } void SourceContext::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + file_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SourceContext::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* SourceContext::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // string file_name = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_file_name(), ptr, ctx, "google.protobuf.SourceContext.file_name"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_file_name(), ptr, ctx, "google.protobuf.SourceContext.file_name"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -188,23 +186,23 @@ const char* SourceContext::_InternalParse(const char* ptr, ::google::protobuf::i } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool SourceContext::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string file_name = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_file_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->file_name().data(), static_cast(this->file_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.SourceContext.file_name")); } else { goto handle_unusual; @@ -217,7 +215,7 @@ bool SourceContext::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -234,47 +232,47 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SourceContext::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string file_name = 1; if (this->file_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->file_name().data(), static_cast(this->file_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.SourceContext.file_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->file_name(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext) } -::google::protobuf::uint8* SourceContext::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SourceContext::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceContext) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string file_name = 1; if (this->file_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->file_name().data(), static_cast(this->file_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.SourceContext.file_name"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 1, this->file_name(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceContext) @@ -287,34 +285,34 @@ size_t SourceContext::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string file_name = 1; if (this->file_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->file_name()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void SourceContext::MergeFrom(const ::google::protobuf::Message& from) { +void SourceContext::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceContext) GOOGLE_DCHECK_NE(&from, this); const SourceContext* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.SourceContext) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.SourceContext) MergeFrom(*source); @@ -325,16 +323,16 @@ void SourceContext::MergeFrom(const SourceContext& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.SourceContext) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.file_name().size() > 0) { - file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.file_name_); + file_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_name_); } } -void SourceContext::CopyFrom(const ::google::protobuf::Message& from) { +void SourceContext::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceContext) if (&from == this) return; Clear(); @@ -359,26 +357,23 @@ void SourceContext::Swap(SourceContext* other) { void SourceContext::InternalSwap(SourceContext* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - file_name_.Swap(&other->file_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_name_.Swap(&other->file_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata SourceContext::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata SourceContext::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fsource_5fcontext_2eproto); return ::file_level_metadata_google_2fprotobuf_2fsource_5fcontext_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::SourceContext* Arena::CreateMaybeMessage< ::google::protobuf::SourceContext >(Arena* arena) { - return Arena::CreateInternal< ::google::protobuf::SourceContext >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::SourceContext >(Arena* arena) { + return Arena::CreateInternal< PROTOBUF_NAMESPACE_ID::SourceContext >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 95c5309dd7..49c301de3d 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/source_context.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto #include #include @@ -31,61 +31,56 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2fsource_5fcontext_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class SourceContext; class SourceContextDefaultTypeInternal; PROTOBUF_EXPORT extern SourceContextDefaultTypeInternal _SourceContext_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::SourceContext* Arena::CreateMaybeMessage<::google::protobuf::SourceContext>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::SourceContext* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN // =================================================================== class PROTOBUF_EXPORT SourceContext final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceContext) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceContext) */ { public: SourceContext(); virtual ~SourceContext(); SourceContext(const SourceContext& from); - - inline SourceContext& operator=(const SourceContext& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 SourceContext(SourceContext&& from) noexcept : SourceContext() { *this = ::std::move(from); } + inline SourceContext& operator=(const SourceContext& from) { + CopyFrom(from); + return *this; + } inline SourceContext& operator=(SourceContext&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -94,8 +89,8 @@ class PROTOBUF_EXPORT SourceContext final : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const SourceContext& default_instance(); @@ -119,11 +114,11 @@ class PROTOBUF_EXPORT SourceContext final : return CreateMaybeMessage(nullptr); } - SourceContext* New(::google::protobuf::Arena* arena) const final { + SourceContext* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SourceContext& from); void MergeFrom(const SourceContext& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -131,15 +126,15 @@ class PROTOBUF_EXPORT SourceContext final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -147,12 +142,12 @@ class PROTOBUF_EXPORT SourceContext final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SourceContext* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.SourceContext"; } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -160,7 +155,7 @@ class PROTOBUF_EXPORT SourceContext final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -169,24 +164,22 @@ class PROTOBUF_EXPORT SourceContext final : // string file_name = 1; void clear_file_name(); static const int kFileNameFieldNumber = 1; - const ::std::string& file_name() const; - void set_file_name(const ::std::string& value); - #if LANG_CXX11 - void set_file_name(::std::string&& value); - #endif + const std::string& file_name() const; + void set_file_name(const std::string& value); + void set_file_name(std::string&& value); void set_file_name(const char* value); void set_file_name(const char* value, size_t size); - ::std::string* mutable_file_name(); - ::std::string* release_file_name(); - void set_allocated_file_name(::std::string* file_name); + std::string* mutable_file_name(); + std::string* release_file_name(); + void set_allocated_file_name(std::string* file_name); // @@protoc_insertion_point(class_scope:google.protobuf.SourceContext) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr file_name_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fsource_5fcontext_2eproto; }; // =================================================================== @@ -202,54 +195,52 @@ class PROTOBUF_EXPORT SourceContext final : // string file_name = 1; inline void SourceContext::clear_file_name() { - file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + file_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& SourceContext::file_name() const { +inline const std::string& SourceContext::file_name() const { // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name) return file_name_.GetNoArena(); } -inline void SourceContext::set_file_name(const ::std::string& value) { +inline void SourceContext::set_file_name(const std::string& value) { - file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + file_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) } -#if LANG_CXX11 -inline void SourceContext::set_file_name(::std::string&& value) { +inline void SourceContext::set_file_name(std::string&& value) { file_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceContext.file_name) } -#endif inline void SourceContext::set_file_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + file_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:google.protobuf.SourceContext.file_name) } inline void SourceContext::set_file_name(const char* value, size_t size) { - file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceContext.file_name) } -inline ::std::string* SourceContext::mutable_file_name() { +inline std::string* SourceContext::mutable_file_name() { // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_name) - return file_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return file_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* SourceContext::release_file_name() { +inline std::string* SourceContext::release_file_name() { // @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_name) - return file_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return file_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void SourceContext::set_allocated_file_name(::std::string* file_name) { +inline void SourceContext::set_allocated_file_name(std::string* file_name) { if (file_name != nullptr) { } else { } - file_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), file_name); + file_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), file_name); // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.file_name) } @@ -259,10 +250,9 @@ inline void SourceContext::set_allocated_file_name(::std::string* file_name) { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fsource_5fcontext_2eproto diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc index b107e5dfc1..a75df43e9f 100644 --- a/src/google/protobuf/struct.pb.cc +++ b/src/google/protobuf/struct.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,122 +16,120 @@ // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fstruct_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto; -namespace google { -namespace protobuf { +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto; +PROTOBUF_NAMESPACE_OPEN class Struct_FieldsEntry_DoNotUseDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Struct_FieldsEntry_DoNotUse_default_instance_; class StructDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Struct_default_instance_; class ValueDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; int null_value_; double number_value_; - ::google::protobuf::internal::ArenaStringPtr string_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_; bool bool_value_; - const ::google::protobuf::Struct* struct_value_; - const ::google::protobuf::ListValue* list_value_; + const PROTOBUF_NAMESPACE_ID::Struct* struct_value_; + const PROTOBUF_NAMESPACE_ID::ListValue* list_value_; } _Value_default_instance_; class ListValueDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ListValue_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsListValue_google_2fprotobuf_2fstruct_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Struct_FieldsEntry_DoNotUse_default_instance_; - new (ptr) ::google::protobuf::Struct_FieldsEntry_DoNotUse(); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse(); } { - void* ptr = &::google::protobuf::_Struct_default_instance_; - new (ptr) ::google::protobuf::Struct(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Struct_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Struct(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } { - void* ptr = &::google::protobuf::_Value_default_instance_; - new (ptr) ::google::protobuf::Value(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Value_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Value(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } { - void* ptr = &::google::protobuf::_ListValue_default_instance_; - new (ptr) ::google::protobuf::ListValue(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::ListValue(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Struct_FieldsEntry_DoNotUse::InitAsDefaultInstance(); - ::google::protobuf::Struct::InitAsDefaultInstance(); - ::google::protobuf::Value::InitAsDefaultInstance(); - ::google::protobuf::ListValue::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Struct::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Value::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::ListValue::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListValue_google_2fprotobuf_2fstruct_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListValue_google_2fprotobuf_2fstruct_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2fstruct_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4]; -static const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1]; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, _internal_metadata_), +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Struct, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Struct, fields_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Struct, fields_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Value, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_), ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Value, _oneof_case_[0]), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::protobuf::ValueDefaultTypeInternal, null_value_), - offsetof(::google::protobuf::ValueDefaultTypeInternal, number_value_), - offsetof(::google::protobuf::ValueDefaultTypeInternal, string_value_), - offsetof(::google::protobuf::ValueDefaultTypeInternal, bool_value_), - offsetof(::google::protobuf::ValueDefaultTypeInternal, struct_value_), - offsetof(::google::protobuf::ValueDefaultTypeInternal, list_value_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Value, kind_), + offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, null_value_), + offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, number_value_), + offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, string_value_), + offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, bool_value_), + offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, struct_value_), + offsetof(PROTOBUF_NAMESPACE_ID::ValueDefaultTypeInternal, list_value_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Value, kind_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::ListValue, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::ListValue, values_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::ListValue, values_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, sizeof(::google::protobuf::Struct_FieldsEntry_DoNotUse)}, - { 9, -1, sizeof(::google::protobuf::Struct)}, - { 15, -1, sizeof(::google::protobuf::Value)}, - { 27, -1, sizeof(::google::protobuf::ListValue)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 7, sizeof(PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)}, + { 9, -1, sizeof(PROTOBUF_NAMESPACE_ID::Struct)}, + { 15, -1, sizeof(PROTOBUF_NAMESPACE_ID::Value)}, + { 27, -1, sizeof(PROTOBUF_NAMESPACE_ID::ListValue)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_Struct_FieldsEntry_DoNotUse_default_instance_), - reinterpret_cast(&::google::protobuf::_Struct_default_instance_), - reinterpret_cast(&::google::protobuf::_Value_default_instance_), - reinterpret_cast(&::google::protobuf::_ListValue_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Struct_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Value_default_instance_), + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto = { {}, AddDescriptors_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets, file_level_metadata_google_2fprotobuf_2fstruct_2eproto, 4, file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto, file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto, @@ -156,25 +154,24 @@ const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] = "\252\002\036Google.Protobuf.WellKnownTypesb\006proto" "3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = { false, InitDefaults_google_2fprotobuf_2fstruct_2eproto, descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto, "google/protobuf/struct.proto", &assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto, 641, }; void AddDescriptors_google_2fprotobuf_2fstruct_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto = []() { AddDescriptors_google_2fprotobuf_2fstruct_2eproto(); return true; }(); -namespace google { -namespace protobuf { -const ::google::protobuf::EnumDescriptor* NullValue_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); +PROTOBUF_NAMESPACE_OPEN +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); return file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[0]; } bool NullValue_IsValid(int value) { @@ -190,18 +187,18 @@ bool NullValue_IsValid(int value) { // =================================================================== Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {} -Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena) +Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) : SuperType(arena) {} void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) { MergeFromInternal(other); } -::google::protobuf::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[0]; } void Struct_FieldsEntry_DoNotUse::MergeFrom( - const ::google::protobuf::Message& other) { - ::google::protobuf::Message::MergeFrom(other); + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); } @@ -218,12 +215,12 @@ const int Struct::kFieldsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Struct::Struct() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Struct) } -Struct::Struct(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), fields_(arena) { SharedCtor(); @@ -231,7 +228,7 @@ Struct::Struct(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct) } Struct::Struct(const Struct& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); fields_.MergeFrom(from.fields_); @@ -239,7 +236,7 @@ Struct::Struct(const Struct& from) } void Struct::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); } @@ -256,20 +253,20 @@ void Struct::ArenaDtor(void* object) { Struct* _this = reinterpret_cast< Struct* >(object); (void)_this; } -void Struct::RegisterArenaDtor(::google::protobuf::Arena*) { +void Struct::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void Struct::SetCachedSize(int size) const { _cached_size_.Set(size); } const Struct& Struct::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); return *internal_default_instance(); } void Struct::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Struct) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -278,20 +275,21 @@ void Struct::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Struct::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Struct::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // map fields = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; do { ptr = ctx->ParseMessage(&fields_, ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } default: { @@ -311,30 +309,30 @@ const char* Struct::_InternalParse(const char* ptr, ::google::protobuf::internal } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Struct::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Struct) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // map fields = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - Struct_FieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + Struct_FieldsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< Struct_FieldsEntry_DoNotUse, - ::std::string, ::google::protobuf::Value, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + std::string, PROTOBUF_NAMESPACE_ID::Value, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, 0 >, - ::google::protobuf::Map< ::std::string, ::google::protobuf::Value > > parser(&fields_); - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value > > parser(&fields_); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Struct.FieldsEntry.key")); } else { goto handle_unusual; @@ -347,7 +345,7 @@ bool Struct::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -364,22 +362,22 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Struct::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Struct) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // map fields = 1; if (!this->fields().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; - typedef ::google::protobuf::internal::CompareByDerefFirst Less; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; struct Utf8Check { static void Check(ConstPtr p) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.FieldsEntry.key"); } }; @@ -388,9 +386,9 @@ void Struct::SerializeWithCachedSizes( this->fields().size() > 1) { ::std::unique_ptr items( new SortItem[this->fields().size()]); - typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type; + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -398,44 +396,44 @@ void Struct::SerializeWithCachedSizes( ::std::sort(&items[0], &items[static_cast(n)], Less()); for (size_type i = 0; i < n; i++) { Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, items[static_cast(i)]->first, items[static_cast(i)]->second); - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); Utf8Check::Check(&(*items[static_cast(i)])); } } else { - for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(1, entry, output); Utf8Check::Check(&(*it)); } } } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Struct) } -::google::protobuf::uint8* Struct::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Struct::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // map fields = 1; if (!this->fields().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; - typedef ::google::protobuf::internal::CompareByDerefFirst Less; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; struct Utf8Check { static void Check(ConstPtr p) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.FieldsEntry.key"); } }; @@ -444,9 +442,9 @@ void Struct::SerializeWithCachedSizes( this->fields().size() > 1) { ::std::unique_ptr items( new SortItem[this->fields().size()]); - typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type; + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -454,22 +452,22 @@ void Struct::SerializeWithCachedSizes( ::std::sort(&items[0], &items[static_cast(n)], Less()); for (size_type i = 0; i < n; i++) { Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, items[static_cast(i)]->first, items[static_cast(i)]->second); - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); Utf8Check::Check(&(*items[static_cast(i)])); } } else { - for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessageNoVirtualToArray(1, entry, target); Utf8Check::Check(&(*it)); } } } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct) @@ -482,38 +480,38 @@ size_t Struct::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // map fields = 1; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->fields_size()); - for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->fields_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { Struct_FieldsEntry_DoNotUse::MapEntryWrapper entry(nullptr, it->first, it->second); - total_size += ::google::protobuf::internal::WireFormatLite:: + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: MessageSizeNoVirtual(entry); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Struct::MergeFrom(const ::google::protobuf::Message& from) { +void Struct::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Struct) GOOGLE_DCHECK_NE(&from, this); const Struct* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Struct) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Struct) MergeFrom(*source); @@ -524,13 +522,13 @@ void Struct::MergeFrom(const Struct& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; fields_.MergeFrom(from.fields_); } -void Struct::CopyFrom(const ::google::protobuf::Message& from) { +void Struct::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Struct) if (&from == this) return; Clear(); @@ -573,8 +571,8 @@ void Struct::InternalSwap(Struct* other) { fields_.Swap(&other->fields_); } -::google::protobuf::Metadata Struct::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Struct::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages]; } @@ -582,38 +580,38 @@ void Struct::InternalSwap(Struct* other) { // =================================================================== void Value::InitAsDefaultInstance() { - ::google::protobuf::_Value_default_instance_.null_value_ = 0; - ::google::protobuf::_Value_default_instance_.number_value_ = 0; - ::google::protobuf::_Value_default_instance_.string_value_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::protobuf::_Value_default_instance_.bool_value_ = false; - ::google::protobuf::_Value_default_instance_.struct_value_ = const_cast< ::google::protobuf::Struct*>( - ::google::protobuf::Struct::internal_default_instance()); - ::google::protobuf::_Value_default_instance_.list_value_ = const_cast< ::google::protobuf::ListValue*>( - ::google::protobuf::ListValue::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_Value_default_instance_.null_value_ = 0; + PROTOBUF_NAMESPACE_ID::_Value_default_instance_.number_value_ = 0; + PROTOBUF_NAMESPACE_ID::_Value_default_instance_.string_value_.UnsafeSetDefault( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + PROTOBUF_NAMESPACE_ID::_Value_default_instance_.bool_value_ = false; + PROTOBUF_NAMESPACE_ID::_Value_default_instance_.struct_value_ = const_cast< PROTOBUF_NAMESPACE_ID::Struct*>( + PROTOBUF_NAMESPACE_ID::Struct::internal_default_instance()); + PROTOBUF_NAMESPACE_ID::_Value_default_instance_.list_value_ = const_cast< PROTOBUF_NAMESPACE_ID::ListValue*>( + PROTOBUF_NAMESPACE_ID::ListValue::internal_default_instance()); } class Value::HasBitSetters { public: - static const ::google::protobuf::Struct& struct_value(const Value* msg); - static const ::google::protobuf::ListValue& list_value(const Value* msg); + static const PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg); + static const PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg); }; -const ::google::protobuf::Struct& +const PROTOBUF_NAMESPACE_ID::Struct& Value::HasBitSetters::struct_value(const Value* msg) { return *msg->kind_.struct_value_; } -const ::google::protobuf::ListValue& +const PROTOBUF_NAMESPACE_ID::ListValue& Value::HasBitSetters::list_value(const Value* msg) { return *msg->kind_.list_value_; } -void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +void Value::set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); clear_kind(); if (struct_value) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(struct_value); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(struct_value); if (message_arena != submessage_arena) { - struct_value = ::google::protobuf::internal::GetOwnedMessage( + struct_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, struct_value, submessage_arena); } set_has_struct_value(); @@ -621,14 +619,14 @@ void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) } // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value) } -void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +void Value::set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); clear_kind(); if (list_value) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::GetArena(list_value); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(list_value); if (message_arena != submessage_arena) { - list_value = ::google::protobuf::internal::GetOwnedMessage( + list_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, list_value, submessage_arena); } set_has_list_value(); @@ -646,19 +644,19 @@ const int Value::kListValueFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Value::Value() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Value) } -Value::Value(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Value) } Value::Value(const Value& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); clear_has_kind(); @@ -680,11 +678,11 @@ Value::Value(const Value& from) break; } case kStructValue: { - mutable_struct_value()->::google::protobuf::Struct::MergeFrom(from.struct_value()); + mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value()); break; } case kListValue: { - mutable_list_value()->::google::protobuf::ListValue::MergeFrom(from.list_value()); + mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value()); break; } case KIND_NOT_SET: { @@ -695,7 +693,7 @@ Value::Value(const Value& from) } void Value::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); clear_has_kind(); } @@ -716,13 +714,13 @@ void Value::ArenaDtor(void* object) { Value* _this = reinterpret_cast< Value* >(object); (void)_this; } -void Value::RegisterArenaDtor(::google::protobuf::Arena*) { +void Value::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void Value::SetCachedSize(int size) const { _cached_size_.Set(size); } const Value& Value::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); return *internal_default_instance(); } @@ -739,7 +737,7 @@ void Value::clear_kind() { break; } case kStringValue: { - kind_.string_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); break; } @@ -769,7 +767,7 @@ void Value::clear_kind() { void Value::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Value) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -778,51 +776,52 @@ void Value::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Value::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // .google.protobuf.NullValue null_value = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - set_null_value(static_cast<::google::protobuf::NullValue>(val)); + set_null_value(static_cast(val)); break; } // double number_value = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 17) goto handle_unusual; - set_number_value(::google::protobuf::internal::UnalignedLoad(ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 17) goto handle_unusual; + set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); break; } // string string_value = 3; case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - ptr = ::google::protobuf::internal::InlineGreedyStringParserUTF8(mutable_string_value(), ptr, ctx, "google.protobuf.Value.string_value"); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 26) goto handle_unusual; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_string_value(), ptr, ctx, "google.protobuf.Value.string_value"); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // bool bool_value = 4; case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - set_bool_value(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 32) goto handle_unusual; + set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // .google.protobuf.Struct struct_value = 5; case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 42) goto handle_unusual; ptr = ctx->ParseMessage(mutable_struct_value(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // .google.protobuf.ListValue list_value = 6; case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 50) goto handle_unusual; ptr = ctx->ParseMessage(mutable_list_value(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; @@ -844,23 +843,23 @@ const char* Value::_InternalParse(const char* ptr, ::google::protobuf::internal: } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Value::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Value) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .google.protobuf.NullValue null_value = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_null_value(static_cast< ::google::protobuf::NullValue >(value)); + set_null_value(static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(value)); } else { goto handle_unusual; } @@ -869,10 +868,10 @@ bool Value::MergePartialFromCodedStream( // double number_value = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (17 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) { clear_kind(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( input, &kind_.number_value_))); set_has_number_value(); } else { @@ -883,12 +882,12 @@ bool Value::MergePartialFromCodedStream( // string string_value = 3; case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( input, this->mutable_string_value())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), static_cast(this->string_value().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Value.string_value")); } else { goto handle_unusual; @@ -898,10 +897,10 @@ bool Value::MergePartialFromCodedStream( // bool bool_value = 4; case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { clear_kind(); - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( input, &kind_.bool_value_))); set_has_bool_value(); } else { @@ -912,8 +911,8 @@ bool Value::MergePartialFromCodedStream( // .google.protobuf.Struct struct_value = 5; case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_struct_value())); } else { goto handle_unusual; @@ -923,8 +922,8 @@ bool Value::MergePartialFromCodedStream( // .google.protobuf.ListValue list_value = 6; case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, mutable_list_value())); } else { goto handle_unusual; @@ -937,7 +936,7 @@ bool Value::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -954,105 +953,105 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Value::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Value) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.protobuf.NullValue null_value = 1; if (has_null_value()) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( 1, this->null_value(), output); } // double number_value = 2; if (has_number_value()) { - ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->number_value(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->number_value(), output); } // string string_value = 3; if (has_string_value()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), static_cast(this->string_value().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->string_value(), output); } // bool bool_value = 4; if (has_bool_value()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->bool_value(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->bool_value(), output); } // .google.protobuf.Struct struct_value = 5; if (has_struct_value()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 5, HasBitSetters::struct_value(this), output); } // .google.protobuf.ListValue list_value = 6; if (has_list_value()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 6, HasBitSetters::list_value(this), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Value) } -::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Value::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.protobuf.NullValue null_value = 1; if (has_null_value()) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 1, this->null_value(), target); } // double number_value = 2; if (has_number_value()) { - target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->number_value(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->number_value(), target); } // string string_value = 3; if (has_string_value()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), static_cast(this->string_value().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value"); target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( 3, this->string_value(), target); } // bool bool_value = 4; if (has_bool_value()) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->bool_value(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->bool_value(), target); } // .google.protobuf.Struct struct_value = 5; if (has_struct_value()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 5, HasBitSetters::struct_value(this), target); } // .google.protobuf.ListValue list_value = 6; if (has_list_value()) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 6, HasBitSetters::list_value(this), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value) @@ -1065,10 +1064,10 @@ size_t Value::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1076,7 +1075,7 @@ size_t Value::ByteSizeLong() const { // .google.protobuf.NullValue null_value = 1; case kNullValue: { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->null_value()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->null_value()); break; } // double number_value = 2; @@ -1087,7 +1086,7 @@ size_t Value::ByteSizeLong() const { // string string_value = 3; case kStringValue: { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->string_value()); break; } @@ -1099,14 +1098,14 @@ size_t Value::ByteSizeLong() const { // .google.protobuf.Struct struct_value = 5; case kStructValue: { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *kind_.struct_value_); break; } // .google.protobuf.ListValue list_value = 6; case kListValue: { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *kind_.list_value_); break; } @@ -1114,20 +1113,20 @@ size_t Value::ByteSizeLong() const { break; } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Value::MergeFrom(const ::google::protobuf::Message& from) { +void Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Value) GOOGLE_DCHECK_NE(&from, this); const Value* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Value) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Value) MergeFrom(*source); @@ -1138,7 +1137,7 @@ void Value::MergeFrom(const Value& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; switch (from.kind_case()) { @@ -1159,11 +1158,11 @@ void Value::MergeFrom(const Value& from) { break; } case kStructValue: { - mutable_struct_value()->::google::protobuf::Struct::MergeFrom(from.struct_value()); + mutable_struct_value()->PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(from.struct_value()); break; } case kListValue: { - mutable_list_value()->::google::protobuf::ListValue::MergeFrom(from.list_value()); + mutable_list_value()->PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(from.list_value()); break; } case KIND_NOT_SET: { @@ -1172,7 +1171,7 @@ void Value::MergeFrom(const Value& from) { } } -void Value::CopyFrom(const ::google::protobuf::Message& from) { +void Value::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Value) if (&from == this) return; Clear(); @@ -1216,8 +1215,8 @@ void Value::InternalSwap(Value* other) { swap(_oneof_case_[0], other->_oneof_case_[0]); } -::google::protobuf::Metadata Value::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages]; } @@ -1235,12 +1234,12 @@ const int ListValue::kValuesFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListValue::ListValue() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.ListValue) } -ListValue::ListValue(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena), values_(arena) { SharedCtor(); @@ -1248,7 +1247,7 @@ ListValue::ListValue(::google::protobuf::Arena* arena) // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue) } ListValue::ListValue(const ListValue& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), values_(from.values_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -1256,7 +1255,7 @@ ListValue::ListValue(const ListValue& from) } void ListValue::SharedCtor() { - ::google::protobuf::internal::InitSCC( + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC( &scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); } @@ -1273,20 +1272,20 @@ void ListValue::ArenaDtor(void* object) { ListValue* _this = reinterpret_cast< ListValue* >(object); (void)_this; } -void ListValue::RegisterArenaDtor(::google::protobuf::Arena*) { +void ListValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void ListValue::SetCachedSize(int size) const { _cached_size_.Set(size); } const ListValue& ListValue::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListValue_google_2fprotobuf_2fstruct_2eproto.base); return *internal_default_instance(); } void ListValue::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1295,20 +1294,21 @@ void ListValue::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ListValue::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // repeated .google.protobuf.Value values = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 10) goto handle_unusual; do { ptr = ctx->ParseMessage(add_values(), ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (ctx->Done(&ptr)) return ptr; - } while ((::google::protobuf::internal::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + } while ((::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } default: { @@ -1328,19 +1328,19 @@ const char* ListValue::_InternalParse(const char* ptr, ::google::protobuf::inter } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool ListValue::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.ListValue) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.protobuf.Value values = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( input, add_values())); } else { goto handle_unusual; @@ -1353,7 +1353,7 @@ bool ListValue::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -1370,43 +1370,43 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void ListValue::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.ListValue) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.Value values = 1; for (unsigned int i = 0, n = static_cast(this->values_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->values(static_cast(i)), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.ListValue) } -::google::protobuf::uint8* ListValue::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ListValue::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.Value values = 1; for (unsigned int i = 0, n = static_cast(this->values_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->values(static_cast(i)), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue) @@ -1419,10 +1419,10 @@ size_t ListValue::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1432,25 +1432,25 @@ size_t ListValue::ByteSizeLong() const { total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( this->values(static_cast(i))); } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ListValue::MergeFrom(const ::google::protobuf::Message& from) { +void ListValue::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ListValue) GOOGLE_DCHECK_NE(&from, this); const ListValue* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ListValue) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.ListValue) MergeFrom(*source); @@ -1461,13 +1461,13 @@ void ListValue::MergeFrom(const ListValue& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; values_.MergeFrom(from.values_); } -void ListValue::CopyFrom(const ::google::protobuf::Message& from) { +void ListValue::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ListValue) if (&from == this) return; Clear(); @@ -1510,31 +1510,28 @@ void ListValue::InternalSwap(ListValue* other) { CastToBase(&values_)->InternalSwap(CastToBase(&other->values_)); } -::google::protobuf::Metadata ListValue::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2fstruct_2eproto); return ::file_level_metadata_google_2fprotobuf_2fstruct_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::protobuf::Struct_FieldsEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::Struct_FieldsEntry_DoNotUse >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::Struct* Arena::CreateMaybeMessage< ::google::protobuf::Struct >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::Struct >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Struct >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::Value* Arena::CreateMaybeMessage< ::google::protobuf::Value >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::Value >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Value >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Value >(arena); } -template<> PROTOBUF_NOINLINE ::google::protobuf::ListValue* Arena::CreateMaybeMessage< ::google::protobuf::ListValue >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::ListValue >(arena); +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::ListValue >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/struct.pb.h b/src/google/protobuf/struct.pb.h index 6cdc6ab5e3..c4979a7a5f 100644 --- a/src/google/protobuf/struct.pb.h +++ b/src/google/protobuf/struct.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/struct.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto #include #include @@ -35,32 +35,29 @@ #include #include #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fstruct_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fstruct_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[4] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2fstruct_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class ListValue; class ListValueDefaultTypeInternal; PROTOBUF_EXPORT extern ListValueDefaultTypeInternal _ListValue_default_instance_; @@ -73,76 +70,78 @@ PROTOBUF_EXPORT extern Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_Fi class Value; class ValueDefaultTypeInternal; PROTOBUF_EXPORT extern ValueDefaultTypeInternal _Value_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::ListValue* Arena::CreateMaybeMessage<::google::protobuf::ListValue>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::Struct* Arena::CreateMaybeMessage<::google::protobuf::Struct>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage<::google::protobuf::Struct_FieldsEntry_DoNotUse>(Arena*); -template<> PROTOBUF_EXPORT ::google::protobuf::Value* Arena::CreateMaybeMessage<::google::protobuf::Value>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage(Arena*); +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN enum NullValue { NULL_VALUE = 0, - NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), - NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() + NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; PROTOBUF_EXPORT bool NullValue_IsValid(int value); constexpr NullValue NullValue_MIN = NULL_VALUE; constexpr NullValue NullValue_MAX = NULL_VALUE; constexpr int NullValue_ARRAYSIZE = NullValue_MAX + 1; -PROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* NullValue_descriptor(); -inline const ::std::string& NullValue_Name(NullValue value) { - return ::google::protobuf::internal::NameOfEnum( +PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor(); +inline const std::string& NullValue_Name(NullValue value) { + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( NullValue_descriptor(), value); } inline bool NullValue_Parse( - const ::std::string& name, NullValue* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, NullValue* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( NullValue_descriptor(), name, value); } // =================================================================== -class Struct_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { public: - typedef ::google::protobuf::internal::MapEntry SuperType; Struct_FieldsEntry_DoNotUse(); - Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena); + Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); void MergeFrom(const Struct_FieldsEntry_DoNotUse& other); static const Struct_FieldsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Struct_FieldsEntry_DoNotUse_default_instance_); } - void MergeFrom(const ::google::protobuf::Message& other) final; - ::google::protobuf::Metadata GetMetadata() const; + bool ValidateKey() const { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(key().data(), key().size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Struct.FieldsEntry.key"); + } + bool ValidateValue() const { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT Struct final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ { public: Struct(); virtual ~Struct(); Struct(const Struct& from); - - inline Struct& operator=(const Struct& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Struct(Struct&& from) noexcept : Struct() { *this = ::std::move(from); } + inline Struct& operator=(const Struct& from) { + CopyFrom(from); + return *this; + } inline Struct& operator=(Struct&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -151,14 +150,14 @@ class PROTOBUF_EXPORT Struct final : } return *this; } - #endif - inline ::google::protobuf::Arena* GetArena() const final { + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Struct& default_instance(); @@ -183,11 +182,11 @@ class PROTOBUF_EXPORT Struct final : return CreateMaybeMessage(nullptr); } - Struct* New(::google::protobuf::Arena* arena) const final { + Struct* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Struct& from); void MergeFrom(const Struct& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -195,15 +194,15 @@ class PROTOBUF_EXPORT Struct final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -211,17 +210,17 @@ class PROTOBUF_EXPORT Struct final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Struct* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Struct"; } protected: - explicit Struct(::google::protobuf::Arena* arena); + explicit Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -229,7 +228,7 @@ class PROTOBUF_EXPORT Struct final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -240,48 +239,46 @@ class PROTOBUF_EXPORT Struct final : int fields_size() const; void clear_fields(); static const int kFieldsFieldNumber = 1; - const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >& + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >& fields() const; - ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >* + ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >* mutable_fields(); // @@protoc_insertion_point(class_scope:google.protobuf.Struct) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::internal::MapField< + ::PROTOBUF_NAMESPACE_ID::internal::MapField< Struct_FieldsEntry_DoNotUse, - ::std::string, ::google::protobuf::Value, - ::google::protobuf::internal::WireFormatLite::TYPE_STRING, - ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, + std::string, PROTOBUF_NAMESPACE_ID::Value, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, 0 > fields_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT Value final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ { public: Value(); virtual ~Value(); Value(const Value& from); - - inline Value& operator=(const Value& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Value(Value&& from) noexcept : Value() { *this = ::std::move(from); } + inline Value& operator=(const Value& from) { + CopyFrom(from); + return *this; + } inline Value& operator=(Value&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -290,14 +287,14 @@ class PROTOBUF_EXPORT Value final : } return *this; } - #endif - inline ::google::protobuf::Arena* GetArena() const final { + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Value& default_instance(); @@ -332,11 +329,11 @@ class PROTOBUF_EXPORT Value final : return CreateMaybeMessage(nullptr); } - Value* New(::google::protobuf::Arena* arena) const final { + Value* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Value& from); void MergeFrom(const Value& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -344,15 +341,15 @@ class PROTOBUF_EXPORT Value final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -360,17 +357,17 @@ class PROTOBUF_EXPORT Value final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Value* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Value"; } protected: - explicit Value(::google::protobuf::Arena* arena); + explicit Value(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -378,7 +375,7 @@ class PROTOBUF_EXPORT Value final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -390,8 +387,8 @@ class PROTOBUF_EXPORT Value final : public: void clear_null_value(); static const int kNullValueFieldNumber = 1; - ::google::protobuf::NullValue null_value() const; - void set_null_value(::google::protobuf::NullValue value); + PROTOBUF_NAMESPACE_ID::NullValue null_value() const; + void set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value); // double number_value = 2; private: @@ -408,25 +405,23 @@ class PROTOBUF_EXPORT Value final : public: void clear_string_value(); static const int kStringValueFieldNumber = 3; - const ::std::string& string_value() const; - void set_string_value(const ::std::string& value); - #if LANG_CXX11 - void set_string_value(::std::string&& value); - #endif + const std::string& string_value() const; + void set_string_value(const std::string& value); + void set_string_value(std::string&& value); void set_string_value(const char* value); void set_string_value(const char* value, size_t size); - ::std::string* mutable_string_value(); - ::std::string* release_string_value(); - void set_allocated_string_value(::std::string* string_value); + std::string* mutable_string_value(); + std::string* release_string_value(); + void set_allocated_string_value(std::string* string_value); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - ::std::string* unsafe_arena_release_string_value(); + std::string* unsafe_arena_release_string_value(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") void unsafe_arena_set_allocated_string_value( - ::std::string* string_value); + std::string* string_value); // bool bool_value = 4; private: @@ -441,25 +436,25 @@ class PROTOBUF_EXPORT Value final : bool has_struct_value() const; void clear_struct_value(); static const int kStructValueFieldNumber = 5; - const ::google::protobuf::Struct& struct_value() const; - ::google::protobuf::Struct* release_struct_value(); - ::google::protobuf::Struct* mutable_struct_value(); - void set_allocated_struct_value(::google::protobuf::Struct* struct_value); + const PROTOBUF_NAMESPACE_ID::Struct& struct_value() const; + PROTOBUF_NAMESPACE_ID::Struct* release_struct_value(); + PROTOBUF_NAMESPACE_ID::Struct* mutable_struct_value(); + void set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value); void unsafe_arena_set_allocated_struct_value( - ::google::protobuf::Struct* struct_value); - ::google::protobuf::Struct* unsafe_arena_release_struct_value(); + PROTOBUF_NAMESPACE_ID::Struct* struct_value); + PROTOBUF_NAMESPACE_ID::Struct* unsafe_arena_release_struct_value(); // .google.protobuf.ListValue list_value = 6; bool has_list_value() const; void clear_list_value(); static const int kListValueFieldNumber = 6; - const ::google::protobuf::ListValue& list_value() const; - ::google::protobuf::ListValue* release_list_value(); - ::google::protobuf::ListValue* mutable_list_value(); - void set_allocated_list_value(::google::protobuf::ListValue* list_value); + const PROTOBUF_NAMESPACE_ID::ListValue& list_value() const; + PROTOBUF_NAMESPACE_ID::ListValue* release_list_value(); + PROTOBUF_NAMESPACE_ID::ListValue* mutable_list_value(); + void set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value); void unsafe_arena_set_allocated_list_value( - ::google::protobuf::ListValue* list_value); - ::google::protobuf::ListValue* unsafe_arena_release_list_value(); + PROTOBUF_NAMESPACE_ID::ListValue* list_value); + PROTOBUF_NAMESPACE_ID::ListValue* unsafe_arena_release_list_value(); void clear_kind(); KindCase kind_case() const; @@ -476,44 +471,42 @@ class PROTOBUF_EXPORT Value final : inline bool has_kind() const; inline void clear_has_kind(); - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; union KindUnion { KindUnion() {} int null_value_; double number_value_; - ::google::protobuf::internal::ArenaStringPtr string_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_; bool bool_value_; - ::google::protobuf::Struct* struct_value_; - ::google::protobuf::ListValue* list_value_; + PROTOBUF_NAMESPACE_ID::Struct* struct_value_; + PROTOBUF_NAMESPACE_ID::ListValue* list_value_; } kind_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::uint32 _oneof_case_[1]; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; }; // ------------------------------------------------------------------- class PROTOBUF_EXPORT ListValue final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ { public: ListValue(); virtual ~ListValue(); ListValue(const ListValue& from); - - inline ListValue& operator=(const ListValue& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ListValue(ListValue&& from) noexcept : ListValue() { *this = ::std::move(from); } + inline ListValue& operator=(const ListValue& from) { + CopyFrom(from); + return *this; + } inline ListValue& operator=(ListValue&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -522,14 +515,14 @@ class PROTOBUF_EXPORT ListValue final : } return *this; } - #endif - inline ::google::protobuf::Arena* GetArena() const final { + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const ListValue& default_instance(); @@ -554,11 +547,11 @@ class PROTOBUF_EXPORT ListValue final : return CreateMaybeMessage(nullptr); } - ListValue* New(::google::protobuf::Arena* arena) const final { + ListValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ListValue& from); void MergeFrom(const ListValue& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -566,15 +559,15 @@ class PROTOBUF_EXPORT ListValue final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -582,17 +575,17 @@ class PROTOBUF_EXPORT ListValue final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ListValue* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.ListValue"; } protected: - explicit ListValue(::google::protobuf::Arena* arena); + explicit ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -600,7 +593,7 @@ class PROTOBUF_EXPORT ListValue final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -610,24 +603,24 @@ class PROTOBUF_EXPORT ListValue final : int values_size() const; void clear_values(); static const int kValuesFieldNumber = 1; - ::google::protobuf::Value* mutable_values(int index); - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* + PROTOBUF_NAMESPACE_ID::Value* mutable_values(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >* mutable_values(); - const ::google::protobuf::Value& values(int index) const; - ::google::protobuf::Value* add_values(); - const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& + const PROTOBUF_NAMESPACE_ID::Value& values(int index) const; + PROTOBUF_NAMESPACE_ID::Value* add_values(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >& values() const; // @@protoc_insertion_point(class_scope:google.protobuf.ListValue) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value > values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto; }; // =================================================================== @@ -650,12 +643,12 @@ inline int Struct::fields_size() const { inline void Struct::clear_fields() { fields_.Clear(); } -inline const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >& +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >& Struct::fields() const { // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields) return fields_.GetMap(); } -inline ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >* +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, PROTOBUF_NAMESPACE_ID::Value >* Struct::mutable_fields() { // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields) return fields_.MutableMap(); @@ -678,14 +671,14 @@ inline void Value::clear_null_value() { clear_has_kind(); } } -inline ::google::protobuf::NullValue Value::null_value() const { +inline PROTOBUF_NAMESPACE_ID::NullValue Value::null_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value) if (has_null_value()) { - return static_cast< ::google::protobuf::NullValue >(kind_.null_value_); + return static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(kind_.null_value_); } - return static_cast< ::google::protobuf::NullValue >(0); + return static_cast< PROTOBUF_NAMESPACE_ID::NullValue >(0); } -inline void Value::set_null_value(::google::protobuf::NullValue value) { +inline void Value::set_null_value(PROTOBUF_NAMESPACE_ID::NullValue value) { if (!has_null_value()) { clear_kind(); set_has_null_value(); @@ -732,49 +725,47 @@ inline void Value::set_has_string_value() { } inline void Value::clear_string_value() { if (has_string_value()) { - kind_.string_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + kind_.string_value_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); clear_has_kind(); } } -inline const ::std::string& Value::string_value() const { +inline const std::string& Value::string_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value) if (has_string_value()) { return kind_.string_value_.Get(); } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); + return *&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } -inline void Value::set_string_value(const ::std::string& value) { +inline void Value::set_string_value(const std::string& value) { if (!has_string_value()) { clear_kind(); set_has_string_value(); - kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } - kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, + kind_.string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value) } -#if LANG_CXX11 -inline void Value::set_string_value(::std::string&& value) { +inline void Value::set_string_value(std::string&& value) { // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value) if (!has_string_value()) { clear_kind(); set_has_string_value(); - kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } kind_.string_value_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Value.string_value) } -#endif inline void Value::set_string_value(const char* value) { GOOGLE_DCHECK(value != nullptr); if (!has_string_value()) { clear_kind(); set_has_string_value(); - kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } - kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + kind_.string_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value) } @@ -783,35 +774,35 @@ inline void Value::set_string_value(const char* value, if (!has_string_value()) { clear_kind(); set_has_string_value(); - kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } kind_.string_value_.Set( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.string_value) } -inline ::std::string* Value::mutable_string_value() { +inline std::string* Value::mutable_string_value() { if (!has_string_value()) { clear_kind(); set_has_string_value(); - kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } - return kind_.string_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return kind_.string_value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value) } -inline ::std::string* Value::release_string_value() { +inline std::string* Value::release_string_value() { // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value) if (has_string_value()) { clear_has_kind(); - return kind_.string_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + return kind_.string_value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } else { return nullptr; } } -inline void Value::set_allocated_string_value(::std::string* string_value) { +inline void Value::set_allocated_string_value(std::string* string_value) { if (has_kind()) { clear_kind(); } @@ -821,26 +812,26 @@ inline void Value::set_allocated_string_value(::std::string* string_value) { } // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value) } -inline ::std::string* Value::unsafe_arena_release_string_value() { +inline std::string* Value::unsafe_arena_release_string_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.string_value) GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (has_string_value()) { clear_has_kind(); return kind_.string_value_.UnsafeArenaRelease( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } else { return nullptr; } } -inline void Value::unsafe_arena_set_allocated_string_value(::std::string* string_value) { +inline void Value::unsafe_arena_set_allocated_string_value(std::string* string_value) { GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); if (!has_string_value()) { - kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + kind_.string_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } clear_kind(); if (string_value) { set_has_string_value(); - kind_.string_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual()); + kind_.string_value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual()); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.string_value) } @@ -889,13 +880,13 @@ inline void Value::clear_struct_value() { clear_has_kind(); } } -inline ::google::protobuf::Struct* Value::release_struct_value() { +inline PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value() { // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value) if (has_struct_value()) { clear_has_kind(); - ::google::protobuf::Struct* temp = kind_.struct_value_; + PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } kind_.struct_value_ = nullptr; return temp; @@ -903,24 +894,24 @@ inline ::google::protobuf::Struct* Value::release_struct_value() { return nullptr; } } -inline const ::google::protobuf::Struct& Value::struct_value() const { +inline const PROTOBUF_NAMESPACE_ID::Struct& Value::struct_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value) return has_struct_value() ? *kind_.struct_value_ - : *reinterpret_cast< ::google::protobuf::Struct*>(&::google::protobuf::_Struct_default_instance_); + : *reinterpret_cast< PROTOBUF_NAMESPACE_ID::Struct*>(&PROTOBUF_NAMESPACE_ID::_Struct_default_instance_); } -inline ::google::protobuf::Struct* Value::unsafe_arena_release_struct_value() { +inline PROTOBUF_NAMESPACE_ID::Struct* Value::unsafe_arena_release_struct_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value) if (has_struct_value()) { clear_has_kind(); - ::google::protobuf::Struct* temp = kind_.struct_value_; + PROTOBUF_NAMESPACE_ID::Struct* temp = kind_.struct_value_; kind_.struct_value_ = nullptr; return temp; } else { return nullptr; } } -inline void Value::unsafe_arena_set_allocated_struct_value(::google::protobuf::Struct* struct_value) { +inline void Value::unsafe_arena_set_allocated_struct_value(PROTOBUF_NAMESPACE_ID::Struct* struct_value) { clear_kind(); if (struct_value) { set_has_struct_value(); @@ -928,11 +919,11 @@ inline void Value::unsafe_arena_set_allocated_struct_value(::google::protobuf::S } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value) } -inline ::google::protobuf::Struct* Value::mutable_struct_value() { +inline PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value() { if (!has_struct_value()) { clear_kind(); set_has_struct_value(); - kind_.struct_value_ = CreateMaybeMessage< ::google::protobuf::Struct >( + kind_.struct_value_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Struct >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value) @@ -954,13 +945,13 @@ inline void Value::clear_list_value() { clear_has_kind(); } } -inline ::google::protobuf::ListValue* Value::release_list_value() { +inline PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value() { // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value) if (has_list_value()) { clear_has_kind(); - ::google::protobuf::ListValue* temp = kind_.list_value_; + PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_; if (GetArenaNoVirtual() != nullptr) { - temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } kind_.list_value_ = nullptr; return temp; @@ -968,24 +959,24 @@ inline ::google::protobuf::ListValue* Value::release_list_value() { return nullptr; } } -inline const ::google::protobuf::ListValue& Value::list_value() const { +inline const PROTOBUF_NAMESPACE_ID::ListValue& Value::list_value() const { // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value) return has_list_value() ? *kind_.list_value_ - : *reinterpret_cast< ::google::protobuf::ListValue*>(&::google::protobuf::_ListValue_default_instance_); + : *reinterpret_cast< PROTOBUF_NAMESPACE_ID::ListValue*>(&PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_); } -inline ::google::protobuf::ListValue* Value::unsafe_arena_release_list_value() { +inline PROTOBUF_NAMESPACE_ID::ListValue* Value::unsafe_arena_release_list_value() { // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value) if (has_list_value()) { clear_has_kind(); - ::google::protobuf::ListValue* temp = kind_.list_value_; + PROTOBUF_NAMESPACE_ID::ListValue* temp = kind_.list_value_; kind_.list_value_ = nullptr; return temp; } else { return nullptr; } } -inline void Value::unsafe_arena_set_allocated_list_value(::google::protobuf::ListValue* list_value) { +inline void Value::unsafe_arena_set_allocated_list_value(PROTOBUF_NAMESPACE_ID::ListValue* list_value) { clear_kind(); if (list_value) { set_has_list_value(); @@ -993,11 +984,11 @@ inline void Value::unsafe_arena_set_allocated_list_value(::google::protobuf::Lis } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value) } -inline ::google::protobuf::ListValue* Value::mutable_list_value() { +inline PROTOBUF_NAMESPACE_ID::ListValue* Value::mutable_list_value() { if (!has_list_value()) { clear_kind(); set_has_list_value(); - kind_.list_value_ = CreateMaybeMessage< ::google::protobuf::ListValue >( + kind_.list_value_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::ListValue >( GetArenaNoVirtual()); } // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value) @@ -1024,24 +1015,24 @@ inline int ListValue::values_size() const { inline void ListValue::clear_values() { values_.Clear(); } -inline ::google::protobuf::Value* ListValue::mutable_values(int index) { +inline PROTOBUF_NAMESPACE_ID::Value* ListValue::mutable_values(int index) { // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values) return values_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >* ListValue::mutable_values() { // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values) return &values_; } -inline const ::google::protobuf::Value& ListValue::values(int index) const { +inline const PROTOBUF_NAMESPACE_ID::Value& ListValue::values(int index) const { // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values) return values_.Get(index); } -inline ::google::protobuf::Value* ListValue::add_values() { +inline PROTOBUF_NAMESPACE_ID::Value* ListValue::add_values() { // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values) return values_.Add(); } -inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Value >& ListValue::values() const { // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values) return values_; @@ -1059,22 +1050,19 @@ ListValue::values() const { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::google::protobuf::NullValue> : ::std::true_type {}; +template <> struct is_proto_enum< PROTOBUF_NAMESPACE_ID::NullValue> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::NullValue>() { - return ::google::protobuf::NullValue_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< PROTOBUF_NAMESPACE_ID::NullValue>() { + return PROTOBUF_NAMESPACE_ID::NullValue_descriptor(); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto diff --git a/src/google/protobuf/stubs/common.cc b/src/google/protobuf/stubs/common.cc index 6dbb0806c4..ff9a32d503 100644 --- a/src/google/protobuf/stubs/common.cc +++ b/src/google/protobuf/stubs/common.cc @@ -198,8 +198,7 @@ LogMessage& LogMessage::operator<<(const StringPiece& value) { return *this; } -LogMessage& LogMessage::operator<<( - const ::google::protobuf::util::Status& status) { +LogMessage& LogMessage::operator<<(const util::Status& status) { message_ += status.ToString(); return *this; } diff --git a/src/google/protobuf/stubs/logging.h b/src/google/protobuf/stubs/logging.h index 8d7e640109..f37048d677 100644 --- a/src/google/protobuf/stubs/logging.h +++ b/src/google/protobuf/stubs/logging.h @@ -89,7 +89,7 @@ class PROTOBUF_EXPORT LogMessage { LogMessage& operator<<(double value); LogMessage& operator<<(void* value); LogMessage& operator<<(const StringPiece& value); - LogMessage& operator<<(const ::google::protobuf::util::Status& status); + LogMessage& operator<<(const util::Status& status); LogMessage& operator<<(const uint128& value); private: @@ -143,10 +143,10 @@ inline bool IsOk(bool status) { return status; } #undef GOOGLE_DCHECK_GT #undef GOOGLE_DCHECK_GE -#define GOOGLE_LOG(LEVEL) \ - ::google::protobuf::internal::LogFinisher() = \ - ::google::protobuf::internal::LogMessage( \ - ::google::protobuf::LOGLEVEL_##LEVEL, __FILE__, __LINE__) +#define GOOGLE_LOG(LEVEL) \ + ::google::protobuf::internal::LogFinisher() = \ + ::google::protobuf::internal::LogMessage( \ + ::google::protobuf::LOGLEVEL_##LEVEL, __FILE__, __LINE__) #define GOOGLE_LOG_IF(LEVEL, CONDITION) \ !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL) @@ -170,8 +170,8 @@ T* CheckNotNull(const char* /* file */, int /* line */, return val; } } // namespace internal -#define GOOGLE_CHECK_NOTNULL(A) \ - ::google::protobuf::internal::CheckNotNull(\ +#define GOOGLE_CHECK_NOTNULL(A) \ + ::google::protobuf::internal::CheckNotNull( \ __FILE__, __LINE__, "'" #A "' must not be nullptr", (A)) #ifdef NDEBUG diff --git a/src/google/protobuf/stubs/macros.h b/src/google/protobuf/stubs/macros.h index 0e9a9ec198..c556d02233 100644 --- a/src/google/protobuf/stubs/macros.h +++ b/src/google/protobuf/stubs/macros.h @@ -112,55 +112,7 @@ struct CompileAssert { } // namespace internal -#undef GOOGLE_COMPILE_ASSERT -#if __cplusplus >= 201103L #define GOOGLE_COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) -#else -#define GOOGLE_COMPILE_ASSERT(expr, msg) \ - ::google::protobuf::internal::CompileAssert<(bool(expr))> \ - msg[bool(expr) ? 1 : -1]; \ - (void)msg -// Implementation details of COMPILE_ASSERT: -// -// - COMPILE_ASSERT works by defining an array type that has -1 -// elements (and thus is invalid) when the expression is false. -// -// - The simpler definition -// -// #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1] -// -// does not work, as gcc supports variable-length arrays whose sizes -// are determined at run-time (this is gcc's extension and not part -// of the C++ standard). As a result, gcc fails to reject the -// following code with the simple definition: -// -// int foo; -// COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is -// // not a compile-time constant. -// -// - By using the type CompileAssert<(bool(expr))>, we ensures that -// expr is a compile-time constant. (Template arguments must be -// determined at compile-time.) -// -// - The outter parentheses in CompileAssert<(bool(expr))> are necessary -// to work around a bug in gcc 3.4.4 and 4.0.1. If we had written -// -// CompileAssert -// -// instead, these compilers will refuse to compile -// -// COMPILE_ASSERT(5 > 0, some_message); -// -// (They seem to think the ">" in "5 > 0" marks the end of the -// template argument list.) -// -// - The array size is (bool(expr) ? 1 : -1), instead of simply -// -// ((expr) ? 1 : -1). -// -// This is to avoid running into a bug in MS VC 7.1, which -// causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1. -#endif // __cplusplus >= 201103L } // namespace protobuf } // namespace google diff --git a/src/google/protobuf/stubs/mathutil.h b/src/google/protobuf/stubs/mathutil.h index 8a9f69a0b2..b87b286980 100644 --- a/src/google/protobuf/stubs/mathutil.h +++ b/src/google/protobuf/stubs/mathutil.h @@ -67,7 +67,7 @@ class MathUtil { template static bool AlmostEquals(T a, T b) { - return ::google::protobuf::internal::AlmostEquals(a, b); + return internal::AlmostEquals(a, b); } // Largest of two values. diff --git a/src/google/protobuf/stubs/once.h b/src/google/protobuf/stubs/once.h index feb71c13ac..070d36d193 100644 --- a/src/google/protobuf/stubs/once.h +++ b/src/google/protobuf/stubs/once.h @@ -34,6 +34,8 @@ #include #include +#include + namespace google { namespace protobuf { namespace internal { @@ -45,8 +47,9 @@ void call_once(Args&&... args ) { } } // namespace internal - } // namespace protobuf } // namespace google +#include + #endif // GOOGLE_PROTOBUF_STUBS_ONCE_H__ diff --git a/src/google/protobuf/stubs/status_macros.h b/src/google/protobuf/stubs/status_macros.h index b3af0dcd55..0c64317d3c 100644 --- a/src/google/protobuf/stubs/status_macros.h +++ b/src/google/protobuf/stubs/status_macros.h @@ -49,7 +49,7 @@ namespace util { #define RETURN_IF_ERROR(expr) \ do { \ /* Using _status below to avoid capture problems if expr is "status". */ \ - const ::google::protobuf::util::Status _status = (expr); \ + const PROTOBUF_NAMESPACE_ID::util::Status _status = (expr); \ if (PROTOBUF_PREDICT_FALSE(!_status.ok())) return _status; \ } while (0) diff --git a/src/google/protobuf/test_util.h b/src/google/protobuf/test_util.h index 5d22a76399..47d3d719aa 100644 --- a/src/google/protobuf/test_util.h +++ b/src/google/protobuf/test_util.h @@ -132,7 +132,8 @@ inline TestUtil::ReflectionTester::ReflectionTester( std::string package = base_descriptor->file()->package(); const FieldDescriptor* import_descriptor = pool->FindFieldByName(package + ".TestAllTypes.optional_import_message"); - std::string import_package = import_descriptor->message_type()->file()->package(); + std::string import_package = + import_descriptor->message_type()->file()->package(); nested_b_ = pool->FindFieldByName(package + ".TestAllTypes.NestedMessage.bb"); foreign_c_ = pool->FindFieldByName(package + ".ForeignMessage.c"); @@ -1269,8 +1270,7 @@ inline void TestUtil::ReflectionTester::ExpectMessagesReleasedViaReflection( // Check that the passed-in serialization is the canonical serialization we // expect for a TestFieldOrderings message filled in by // SetAllFieldsAndExtensions(). -inline void ExpectAllFieldsAndExtensionsInOrder( - const std::string& serialized) { +inline void ExpectAllFieldsAndExtensionsInOrder(const std::string& serialized) { // We set each field individually, serialize separately, and concatenate all // the strings in canonical order to determine the expected serialization. std::string expected; diff --git a/src/google/protobuf/test_util.inc b/src/google/protobuf/test_util.inc index 185f68d901..ab80b69e39 100644 --- a/src/google/protobuf/test_util.inc +++ b/src/google/protobuf/test_util.inc @@ -1545,7 +1545,7 @@ inline void TestUtil::ExpectAllExtensionsSet( inline void TestUtil::ExpectExtensionsClear( const UNITTEST::TestAllExtensions& message) { - string serialized; + std::string serialized; ASSERT_TRUE(message.SerializeToString(&serialized)); EXPECT_EQ("", serialized); EXPECT_EQ(0, message.ByteSizeLong()); diff --git a/src/google/protobuf/test_util2.h b/src/google/protobuf/test_util2.h index 299311dc6f..d1cf2119e3 100644 --- a/src/google/protobuf/test_util2.h +++ b/src/google/protobuf/test_util2.h @@ -42,10 +42,10 @@ namespace protobuf { namespace TestUtil { // Translate net/proto2/* -> google/protobuf/* -inline ::std::string TranslatePathToOpensource(const ::std::string& google3_path) { - const ::std::string prefix = "net/proto2/"; +inline std::string TranslatePathToOpensource(const std::string& google3_path) { + const std::string prefix = "net/proto2/"; GOOGLE_CHECK(google3_path.find(prefix) == 0) << google3_path; - ::std::string path = google3_path.substr(prefix.size()); + std::string path = google3_path.substr(prefix.size()); path = StringReplace(path, "internal/", "", false); path = StringReplace(path, "proto/", "", false); @@ -53,17 +53,17 @@ inline ::std::string TranslatePathToOpensource(const ::std::string& google3_path return "google/protobuf/" + path; } -inline ::std::string MaybeTranslatePath(const ::std::string& google3_path) { +inline std::string MaybeTranslatePath(const std::string& google3_path) { std::string path = google3_path; path = TranslatePathToOpensource(path); return path; } -inline ::std::string TestSourceDir() { +inline std::string TestSourceDir() { return google::protobuf::TestSourceDir(); } -inline ::std::string GetTestDataPath(const ::std::string& google3_path) { +inline std::string GetTestDataPath(const std::string& google3_path) { return TestSourceDir() + "/" + MaybeTranslatePath(google3_path); } diff --git a/src/google/protobuf/test_util_lite.cc b/src/google/protobuf/test_util_lite.cc index 79c5abec6d..81728dfc3f 100644 --- a/src/google/protobuf/test_util_lite.cc +++ b/src/google/protobuf/test_util_lite.cc @@ -1160,7 +1160,7 @@ void TestUtilLite::ExpectAllExtensionsSet( void TestUtilLite::ExpectExtensionsClear( const unittest::TestAllExtensionsLite& message) { - string serialized; + std::string serialized; ASSERT_TRUE(message.SerializeToString(&serialized)); EXPECT_EQ("", serialized); EXPECT_EQ(0, message.ByteSize()); diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc index c6603156cf..34e442cd6b 100644 --- a/src/google/protobuf/text_format.cc +++ b/src/google/protobuf/text_format.cc @@ -70,20 +70,20 @@ namespace protobuf { namespace { -inline bool IsHexNumber(const string& str) { +inline bool IsHexNumber(const std::string& str) { return (str.length() >= 2 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')); } -inline bool IsOctNumber(const string& str) { +inline bool IsOctNumber(const std::string& str) { return (str.length() >= 2 && str[0] == '0' && (str[1] >= '0' && str[1] < '8')); } } // namespace -string Message::DebugString() const { - string debug_string; +std::string Message::DebugString() const { + std::string debug_string; TextFormat::Printer printer; printer.SetExpandAny(true); @@ -93,8 +93,8 @@ string Message::DebugString() const { return debug_string; } -string Message::ShortDebugString() const { - string debug_string; +std::string Message::ShortDebugString() const { + std::string debug_string; TextFormat::Printer printer; printer.SetSingleLineMode(true); @@ -109,8 +109,8 @@ string Message::ShortDebugString() const { return debug_string; } -string Message::Utf8DebugString() const { - string debug_string; +std::string Message::Utf8DebugString() const { + std::string debug_string; TextFormat::Printer printer; printer.SetUseUtf8StringEscaping(true); @@ -200,13 +200,13 @@ namespace { // These functions implement the behavior of the "default" TextFormat::Finder, // they are defined as standalone to be called when finder_ is NULL. const FieldDescriptor* DefaultFinderFindExtension(Message* message, - const string& name) { + const std::string& name) { return message->GetReflection()->FindKnownExtensionByName(name); } const Descriptor* DefaultFinderFindAnyType(const Message& message, - const string& prefix, - const string& name) { + const std::string& prefix, + const std::string& name) { if (prefix != internal::kTypeGoogleApisComPrefix && prefix != internal::kTypeGoogleProdComPrefix) { return NULL; @@ -308,7 +308,7 @@ class TextFormat::Parser::ParserImpl { return suc && LookingAtType(io::Tokenizer::TYPE_END); } - void ReportError(int line, int col, const string& message) { + void ReportError(int line, int col, const std::string& message) { had_errors_ = true; if (error_collector_ == NULL) { if (line >= 0) { @@ -324,7 +324,7 @@ class TextFormat::Parser::ParserImpl { } } - void ReportWarning(int line, int col, const string& message) { + void ReportWarning(int line, int col, const std::string& message) { if (error_collector_ == NULL) { if (line >= 0) { GOOGLE_LOG(WARNING) << "Warning parsing text-format " @@ -344,14 +344,14 @@ class TextFormat::Parser::ParserImpl { // Reports an error with the given message with information indicating // the position (as derived from the current token). - void ReportError(const string& message) { + void ReportError(const std::string& message) { ReportError(tokenizer_.current().line, tokenizer_.current().column, message); } // Reports a warning with the given message with information indicating // the position (as derived from the current token). - void ReportWarning(const string& message) { + void ReportWarning(const std::string& message) { ReportWarning(tokenizer_.current().line, tokenizer_.current().column, message); } @@ -359,7 +359,7 @@ class TextFormat::Parser::ParserImpl { // Consumes the specified message with the given starting delimiter. // This method checks to see that the end delimiter at the conclusion of // the consumption matches the starting delimiter passed in here. - bool ConsumeMessage(Message* message, const string delimiter) { + bool ConsumeMessage(Message* message, const std::string delimiter) { while (!LookingAt(">") && !LookingAt("}")) { DO(ConsumeField(message)); } @@ -370,7 +370,7 @@ class TextFormat::Parser::ParserImpl { } // Consume either "<" or "{". - bool ConsumeMessageDelimiter(string* delimiter) { + bool ConsumeMessageDelimiter(std::string* delimiter) { if (TryConsume("<")) { *delimiter = ">"; } else { @@ -387,7 +387,7 @@ class TextFormat::Parser::ParserImpl { const Reflection* reflection = message->GetReflection(); const Descriptor* descriptor = message->GetDescriptor(); - string field_name; + std::string field_name; bool reserved_field = false; const FieldDescriptor* field = NULL; int start_line = tokenizer_.current().line; @@ -398,11 +398,11 @@ class TextFormat::Parser::ParserImpl { if (internal::GetAnyFieldDescriptors(*message, &any_type_url_field, &any_value_field) && TryConsume("[")) { - string full_type_name, prefix; + std::string full_type_name, prefix; DO(ConsumeAnyTypeUrl(&full_type_name, &prefix)); DO(Consume("]")); TryConsume(":"); // ':' is optional between message labels and values. - string serialized_value; + std::string serialized_value; const Descriptor* value_descriptor = finder_ ? finder_->FindAnyType(*message, prefix, full_type_name) : DefaultFinderFindAnyType(*message, prefix, full_type_name); @@ -423,7 +423,7 @@ class TextFormat::Parser::ParserImpl { } } reflection->SetString(message, any_type_url_field, - string(prefix + full_type_name)); + std::string(prefix + full_type_name)); reflection->SetString(message, any_value_field, serialized_value); return true; } @@ -467,7 +467,7 @@ class TextFormat::Parser::ParserImpl { // .proto file, which actually matches their type names, not their // field names. if (field == NULL) { - string lower_field_name = field_name; + std::string lower_field_name = field_name; LowerString(&lower_field_name); field = descriptor->FindFieldByName(lower_field_name); // If the case-insensitive match worked but the field is NOT a group, @@ -482,7 +482,7 @@ class TextFormat::Parser::ParserImpl { } if (field == NULL && allow_case_insensitive_field_) { - string lower_field_name = field_name; + std::string lower_field_name = field_name; LowerString(&lower_field_name); field = descriptor->FindFieldByLowercaseName(lower_field_name); } @@ -552,7 +552,7 @@ class TextFormat::Parser::ParserImpl { if (consumed_semicolon && field->options().weak() && LookingAtType(io::Tokenizer::TYPE_STRING)) { // we are getting a bytes string for a weak field. - string tmp; + std::string tmp; DO(ConsumeString(&tmp)); MessageFactory* factory = finder_ ? finder_->FindExtensionFactory(field) : nullptr; @@ -614,7 +614,7 @@ class TextFormat::Parser::ParserImpl { DO(ConsumeTypeUrlOrFullTypeName()); DO(Consume("]")); } else { - string field_name; + std::string field_name; DO(ConsumeIdentifier(&field_name)); } @@ -648,7 +648,7 @@ class TextFormat::Parser::ParserImpl { parse_info_tree_ = CreateNested(parent, field); } - string delimiter; + std::string delimiter; DO(ConsumeMessageDelimiter(&delimiter)); MessageFactory* factory = finder_ ? finder_->FindExtensionFactory(field) : nullptr; @@ -670,7 +670,7 @@ class TextFormat::Parser::ParserImpl { // Skips the whole body of a message including the beginning delimiter and // the ending delimiter. bool SkipFieldMessage() { - string delimiter; + std::string delimiter; DO(ConsumeMessageDelimiter(&delimiter)); while (!LookingAt(">") && !LookingAt("}")) { DO(SkipField()); @@ -735,7 +735,7 @@ class TextFormat::Parser::ParserImpl { } case FieldDescriptor::CPPTYPE_STRING: { - string value; + std::string value; DO(ConsumeString(&value)); SET_FIELD(String, value); break; @@ -747,7 +747,7 @@ class TextFormat::Parser::ParserImpl { DO(ConsumeUnsignedInteger(&value, 1)); SET_FIELD(Bool, value); } else { - string value; + std::string value; DO(ConsumeIdentifier(&value)); if (value == "true" || value == "True" || value == "t") { SET_FIELD(Bool, true); @@ -763,7 +763,7 @@ class TextFormat::Parser::ParserImpl { } case FieldDescriptor::CPPTYPE_ENUM: { - string value; + std::string value; int64 int_value = kint64max; const EnumDescriptor* enum_type = field->enum_type(); const EnumValueDescriptor* enum_value = NULL; @@ -865,7 +865,7 @@ class TextFormat::Parser::ParserImpl { if (!LookingAtType(io::Tokenizer::TYPE_INTEGER) && !LookingAtType(io::Tokenizer::TYPE_FLOAT) && !LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - string text = tokenizer_.current().text; + std::string text = tokenizer_.current().text; ReportError("Cannot skip field value, unexpected token: " + text); return false; } @@ -876,7 +876,7 @@ class TextFormat::Parser::ParserImpl { // below: // inf, inff, infinity, nan if (has_minus && LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - string text = tokenizer_.current().text; + std::string text = tokenizer_.current().text; LowerString(&text); if (text != "inf" && text != "infinity" && text != "nan") { @@ -889,7 +889,7 @@ class TextFormat::Parser::ParserImpl { } // Returns true if the current token's text is equal to that specified. - bool LookingAt(const string& text) { + bool LookingAt(const std::string& text) { return tokenizer_.current().text == text; } @@ -900,7 +900,7 @@ class TextFormat::Parser::ParserImpl { // Consumes an identifier and saves its value in the identifier parameter. // Returns false if the token is not of type IDENTFIER. - bool ConsumeIdentifier(string* identifier) { + bool ConsumeIdentifier(std::string* identifier) { if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { *identifier = tokenizer_.current().text; tokenizer_.Next(); @@ -922,10 +922,10 @@ class TextFormat::Parser::ParserImpl { } // Consume a string of form ".....". - bool ConsumeFullTypeName(string* name) { + bool ConsumeFullTypeName(std::string* name) { DO(ConsumeIdentifier(name)); while (TryConsume(".")) { - string part; + std::string part; DO(ConsumeIdentifier(&part)); *name += "."; *name += part; @@ -934,7 +934,7 @@ class TextFormat::Parser::ParserImpl { } bool ConsumeTypeUrlOrFullTypeName() { - string discarded; + std::string discarded; DO(ConsumeIdentifier(&discarded)); while (TryConsume(".") || TryConsume("/")) { DO(ConsumeIdentifier(&discarded)); @@ -944,7 +944,7 @@ class TextFormat::Parser::ParserImpl { // Consumes a string and saves its value in the text parameter. // Returns false if the token is not of type STRING. - bool ConsumeString(string* text) { + bool ConsumeString(std::string* text) { if (!LookingAtType(io::Tokenizer::TYPE_STRING)) { ReportError("Expected string, got: " + tokenizer_.current().text); return false; @@ -1010,23 +1010,26 @@ class TextFormat::Parser::ParserImpl { return true; } - // Consumes a uint64 and saves its value in the value parameter. + // Consumes a double and saves its value in the value parameter. // Accepts decimal numbers only, rejects hex or oct numbers. - bool ConsumeUnsignedDecimalInteger(uint64* value, uint64 max_value) { + bool ConsumeUnsignedDecimalAsDouble(double* value, uint64 max_value) { if (!LookingAtType(io::Tokenizer::TYPE_INTEGER)) { ReportError("Expected integer, got: " + tokenizer_.current().text); return false; } - const string& text = tokenizer_.current().text; + const std::string& text = tokenizer_.current().text; if (IsHexNumber(text) || IsOctNumber(text)) { ReportError("Expect a decimal number, got: " + text); return false; } - if (!io::Tokenizer::ParseInteger(text, max_value, value)) { - ReportError("Integer out of range (" + text + ")"); - return false; + uint64 uint64_value; + if (io::Tokenizer::ParseInteger(text, max_value, &uint64_value)) { + *value = static_cast(uint64_value); + } else { + // Uint64 overflow, attempt to parse as a double instead. + *value = io::Tokenizer::ParseFloat(text); } tokenizer_.Next(); @@ -1049,10 +1052,7 @@ class TextFormat::Parser::ParserImpl { // Therefore, we must check both cases here. if (LookingAtType(io::Tokenizer::TYPE_INTEGER)) { // We have found an integer value for the double. - uint64 integer_value; - DO(ConsumeUnsignedDecimalInteger(&integer_value, kuint64max)); - - *value = static_cast(integer_value); + DO(ConsumeUnsignedDecimalAsDouble(value, kuint64max)); } else if (LookingAtType(io::Tokenizer::TYPE_FLOAT)) { // We have found a float value for the double. *value = io::Tokenizer::ParseFloat(tokenizer_.current().text); @@ -1060,7 +1060,7 @@ class TextFormat::Parser::ParserImpl { // Mark the current token as consumed. tokenizer_.Next(); } else if (LookingAtType(io::Tokenizer::TYPE_IDENTIFIER)) { - string text = tokenizer_.current().text; + std::string text = tokenizer_.current().text; LowerString(&text); if (text == "inf" || text == "infinity") { @@ -1087,12 +1087,12 @@ class TextFormat::Parser::ParserImpl { // Consumes Any::type_url value, of form "type.googleapis.com/full.type.Name" // or "type.googleprod.com/full.type.Name" - bool ConsumeAnyTypeUrl(string* full_type_name, string* prefix) { + bool ConsumeAnyTypeUrl(std::string* full_type_name, std::string* prefix) { // TODO(saito) Extend Consume() to consume multiple tokens at once, so that // this code can be written as just DO(Consume(kGoogleApisTypePrefix)). DO(ConsumeIdentifier(prefix)); while (TryConsume(".")) { - string url; + std::string url; DO(ConsumeIdentifier(&url)); *prefix += "." + url; } @@ -1106,14 +1106,14 @@ class TextFormat::Parser::ParserImpl { // A helper function for reconstructing Any::value. Consumes a text of // full_type_name, then serializes it into serialized_value. bool ConsumeAnyValue(const Descriptor* value_descriptor, - string* serialized_value) { + std::string* serialized_value) { DynamicMessageFactory factory; const Message* value_prototype = factory.GetPrototype(value_descriptor); if (value_prototype == NULL) { return false; } std::unique_ptr value(value_prototype->New()); - string sub_delimiter; + std::string sub_delimiter; DO(ConsumeMessageDelimiter(&sub_delimiter)); DO(ConsumeMessage(value.get(), sub_delimiter)); @@ -1134,8 +1134,8 @@ class TextFormat::Parser::ParserImpl { // Consumes a token and confirms that it matches that specified in the // value parameter. Returns false if the token found does not match that // which was specified. - bool Consume(const string& value) { - const string& current_value = tokenizer_.current().text; + bool Consume(const std::string& value) { + const std::string& current_value = tokenizer_.current().text; if (current_value != value) { ReportError("Expected \"" + value + "\", found \"" + current_value + @@ -1150,7 +1150,7 @@ class TextFormat::Parser::ParserImpl { // Attempts to consume the supplied value. Returns false if a the // token found does not match the value specified. - bool TryConsume(const string& value) { + bool TryConsume(const std::string& value) { if (tokenizer_.current().text == value) { tokenizer_.Next(); return true; @@ -1168,11 +1168,11 @@ class TextFormat::Parser::ParserImpl { ~ParserErrorCollector() override {} - void AddError(int line, int column, const string& message) override { + void AddError(int line, int column, const std::string& message) override { parser_->ReportError(line, column, message); } - void AddWarning(int line, int column, const string& message) override { + void AddWarning(int line, int column, const std::string& message) override { parser_->ReportWarning(line, column, message); } @@ -1342,13 +1342,13 @@ class TextFormat::Printer::TextGenerator TextFormat::Finder::~Finder() {} const FieldDescriptor* TextFormat::Finder::FindExtension( - Message* message, const string& name) const { + Message* message, const std::string& name) const { return DefaultFinderFindExtension(message, name); } -const Descriptor* TextFormat::Finder::FindAnyType(const Message& message, - const string& prefix, - const string& name) const { +const Descriptor* TextFormat::Finder::FindAnyType( + const Message& message, const std::string& prefix, + const std::string& name) const { return DefaultFinderFindAnyType(message, prefix, name); } @@ -1408,7 +1408,8 @@ bool TextFormat::Parser::Parse(io::ZeroCopyInputStream* input, return MergeUsingImpl(input, output, &parser); } -bool TextFormat::Parser::ParseFromString(const string& input, Message* output) { +bool TextFormat::Parser::ParseFromString(const std::string& input, + Message* output) { DO(CheckParseInputSize(input, error_collector_)); io::ArrayInputStream input_stream(input.data(), input.size()); return Parse(&input_stream, output); @@ -1426,7 +1427,8 @@ bool TextFormat::Parser::Merge(io::ZeroCopyInputStream* input, return MergeUsingImpl(input, output, &parser); } -bool TextFormat::Parser::MergeFromString(const string& input, Message* output) { +bool TextFormat::Parser::MergeFromString(const std::string& input, + Message* output) { DO(CheckParseInputSize(input, error_collector_)); io::ArrayInputStream input_stream(input.data(), input.size()); return Merge(&input_stream, output); @@ -1438,7 +1440,7 @@ bool TextFormat::Parser::MergeUsingImpl(io::ZeroCopyInputStream* /* input */, ParserImpl* parser_impl) { if (!parser_impl->Parse(output)) return false; if (!allow_partial_ && !output->IsInitialized()) { - std::vector missing_fields; + std::vector missing_fields; output->FindInitializationErrors(&missing_fields); parser_impl->ReportError(-1, 0, "Message missing required fields: " + @@ -1448,7 +1450,7 @@ bool TextFormat::Parser::MergeUsingImpl(io::ZeroCopyInputStream* /* input */, return true; } -bool TextFormat::Parser::ParseFieldValueFromString(const string& input, +bool TextFormat::Parser::ParseFieldValueFromString(const std::string& input, const FieldDescriptor* field, Message* output) { io::ArrayInputStream input_stream(input.data(), input.size()); @@ -1471,12 +1473,12 @@ bool TextFormat::Parser::ParseFieldValueFromString(const string& input, return Parser().Merge(input, output); } -/* static */ bool TextFormat::ParseFromString(const string& input, +/* static */ bool TextFormat::ParseFromString(const std::string& input, Message* output) { return Parser().ParseFromString(input, output); } -/* static */ bool TextFormat::MergeFromString(const string& input, +/* static */ bool TextFormat::MergeFromString(const std::string& input, Message* output) { return Parser().MergeFromString(input, output); } @@ -1500,13 +1502,13 @@ class StringBaseTextGenerator : public TextFormat::BaseTextGenerator { // Some compilers do not support ref-qualifiers even in C++11 mode. // Disable the optimization for now and revisit it later. #if 0 // LANG_CXX11 - string Consume() && { return std::move(output_); } + std::string Consume() && { return std::move(output_); } #else // !LANG_CXX11 - const string& Get() { return output_; } + const std::string& Get() { return output_; } #endif // LANG_CXX11 private: - string output_; + std::string output_; }; } // namespace @@ -1529,49 +1531,51 @@ TextFormat::FieldValuePrinter::~FieldValuePrinter() {} return generator.Get() #endif // LANG_CXX11 -string TextFormat::FieldValuePrinter::PrintBool(bool val) const { +std::string TextFormat::FieldValuePrinter::PrintBool(bool val) const { FORWARD_IMPL(PrintBool, val); } -string TextFormat::FieldValuePrinter::PrintInt32(int32 val) const { +std::string TextFormat::FieldValuePrinter::PrintInt32(int32 val) const { FORWARD_IMPL(PrintInt32, val); } -string TextFormat::FieldValuePrinter::PrintUInt32(uint32 val) const { +std::string TextFormat::FieldValuePrinter::PrintUInt32(uint32 val) const { FORWARD_IMPL(PrintUInt32, val); } -string TextFormat::FieldValuePrinter::PrintInt64(int64 val) const { +std::string TextFormat::FieldValuePrinter::PrintInt64(int64 val) const { FORWARD_IMPL(PrintInt64, val); } -string TextFormat::FieldValuePrinter::PrintUInt64(uint64 val) const { +std::string TextFormat::FieldValuePrinter::PrintUInt64(uint64 val) const { FORWARD_IMPL(PrintUInt64, val); } -string TextFormat::FieldValuePrinter::PrintFloat(float val) const { +std::string TextFormat::FieldValuePrinter::PrintFloat(float val) const { FORWARD_IMPL(PrintFloat, val); } -string TextFormat::FieldValuePrinter::PrintDouble(double val) const { +std::string TextFormat::FieldValuePrinter::PrintDouble(double val) const { FORWARD_IMPL(PrintDouble, val); } -string TextFormat::FieldValuePrinter::PrintString(const string& val) const { +std::string TextFormat::FieldValuePrinter::PrintString( + const std::string& val) const { FORWARD_IMPL(PrintString, val); } -string TextFormat::FieldValuePrinter::PrintBytes(const string& val) const { +std::string TextFormat::FieldValuePrinter::PrintBytes( + const std::string& val) const { return PrintString(val); } -string TextFormat::FieldValuePrinter::PrintEnum(int32 val, - const string& name) const { +std::string TextFormat::FieldValuePrinter::PrintEnum( + int32 val, const std::string& name) const { FORWARD_IMPL(PrintEnum, val, name); } -string TextFormat::FieldValuePrinter::PrintFieldName( +std::string TextFormat::FieldValuePrinter::PrintFieldName( const Message& message, const Reflection* reflection, const FieldDescriptor* field) const { FORWARD_IMPL(PrintFieldName, message, reflection, field); } -string TextFormat::FieldValuePrinter::PrintMessageStart( +std::string TextFormat::FieldValuePrinter::PrintMessageStart( const Message& message, int field_index, int field_count, bool single_line_mode) const { FORWARD_IMPL(PrintMessageStart, message, field_index, field_count, single_line_mode); } -string TextFormat::FieldValuePrinter::PrintMessageEnd( +std::string TextFormat::FieldValuePrinter::PrintMessageEnd( const Message& message, int field_index, int field_count, bool single_line_mode) const { FORWARD_IMPL(PrintMessageEnd, message, field_index, field_count, @@ -1614,18 +1618,18 @@ void TextFormat::FastFieldValuePrinter::PrintDouble( generator->PrintString(SimpleDtoa(val)); } void TextFormat::FastFieldValuePrinter::PrintEnum( - int32 val, const string& name, BaseTextGenerator* generator) const { + int32 val, const std::string& name, BaseTextGenerator* generator) const { generator->PrintString(name); } void TextFormat::FastFieldValuePrinter::PrintString( - const string& val, BaseTextGenerator* generator) const { + const std::string& val, BaseTextGenerator* generator) const { generator->PrintLiteral("\""); generator->PrintString(CEscape(val)); generator->PrintLiteral("\""); } void TextFormat::FastFieldValuePrinter::PrintBytes( - const string& val, BaseTextGenerator* generator) const { + const std::string& val, BaseTextGenerator* generator) const { PrintString(val, generator); } void TextFormat::FastFieldValuePrinter::PrintFieldName( @@ -1716,15 +1720,15 @@ class FieldValuePrinterWrapper : public TextFormat::FastFieldValuePrinter { TextFormat::BaseTextGenerator* generator) const override { generator->PrintString(delegate_->PrintDouble(val)); } - void PrintString(const string& val, + void PrintString(const std::string& val, TextFormat::BaseTextGenerator* generator) const override { generator->PrintString(delegate_->PrintString(val)); } - void PrintBytes(const string& val, + void PrintBytes(const std::string& val, TextFormat::BaseTextGenerator* generator) const override { generator->PrintString(delegate_->PrintBytes(val)); } - void PrintEnum(int32 val, const string& name, + void PrintEnum(int32 val, const std::string& name, TextFormat::BaseTextGenerator* generator) const override { generator->PrintString(delegate_->PrintEnum(val, name)); } @@ -1764,13 +1768,13 @@ class FieldValuePrinterWrapper : public TextFormat::FastFieldValuePrinter { class FastFieldValuePrinterUtf8Escaping : public TextFormat::FastFieldValuePrinter { public: - void PrintString(const string& val, + void PrintString(const std::string& val, TextFormat::BaseTextGenerator* generator) const override { generator->PrintLiteral("\""); generator->PrintString(strings::Utf8SafeCEscape(val)); generator->PrintLiteral("\""); } - void PrintBytes(const string& val, + void PrintBytes(const std::string& val, TextFormat::BaseTextGenerator* generator) const override { return FastFieldValuePrinter::PrintString(val, generator); } @@ -1841,7 +1845,7 @@ bool TextFormat::Printer::RegisterMessagePrinter( } bool TextFormat::Printer::PrintToString(const Message& message, - string* output) const { + std::string* output) const { GOOGLE_DCHECK(output) << "output specified is NULL"; output->clear(); @@ -1851,7 +1855,7 @@ bool TextFormat::Printer::PrintToString(const Message& message, } bool TextFormat::Printer::PrintUnknownFieldsToString( - const UnknownFieldSet& unknown_fields, string* output) const { + const UnknownFieldSet& unknown_fields, std::string* output) const { GOOGLE_DCHECK(output) << "output specified is NULL"; output->clear(); @@ -1912,9 +1916,9 @@ bool TextFormat::Printer::PrintAny(const Message& message, const Reflection* reflection = message.GetReflection(); // Extract the full type name from the type_url field. - const string& type_url = reflection->GetString(message, type_url_field); - string url_prefix; - string full_type_name; + const std::string& type_url = reflection->GetString(message, type_url_field); + std::string url_prefix; + std::string full_type_name; if (!internal::ParseAnyTypeUrl(type_url, &url_prefix, &full_type_name)) { return false; } @@ -1930,7 +1934,7 @@ bool TextFormat::Printer::PrintAny(const Message& message, DynamicMessageFactory factory; std::unique_ptr value_message( factory.GetPrototype(value_descriptor)->New()); - string serialized_value = reflection->GetString(message, value_field); + std::string serialized_value = reflection->GetString(message, value_field); if (!value_message->ParseFromString(serialized_value)) { GOOGLE_LOG(WARNING) << type_url << ": failed to parse contents"; return false; @@ -1956,7 +1960,7 @@ void TextFormat::Printer::Print(const Message& message, // Parse it again in an UnknownFieldSet, and display this instead. UnknownFieldSet unknown_fields; { - string serialized = message.SerializeAsString(); + std::string serialized = message.SerializeAsString(); io::ArrayInputStream input(serialized.data(), serialized.size()); unknown_fields.ParseFromZeroCopyStream(&input); } @@ -1995,7 +1999,7 @@ void TextFormat::Printer::Print(const Message& message, void TextFormat::Printer::PrintFieldValueToString(const Message& message, const FieldDescriptor* field, int index, - string* output) const { + std::string* output) const { GOOGLE_DCHECK(output) << "output specified is NULL"; output->clear(); @@ -2039,8 +2043,8 @@ class MapEntryMessageComparator { return first < second; } case FieldDescriptor::CPPTYPE_STRING: { - string first = reflection->GetString(*a, field_); - string second = reflection->GetString(*b, field_); + std::string first = reflection->GetString(*a, field_); + std::string second = reflection->GetString(*b, field_); return first < second; } default: @@ -2315,14 +2319,14 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, #undef OUTPUT_FIELD case FieldDescriptor::CPPTYPE_STRING: { - string scratch; - const string& value = + std::string scratch; + const std::string& value = field->is_repeated() ? reflection->GetRepeatedStringReference(message, field, index, &scratch) : reflection->GetStringReference(message, field, &scratch); - const string* value_to_print = &value; - string truncated_value; + const std::string* value_to_print = &value; + std::string truncated_value; if (truncate_string_field_longer_than_ > 0 && truncate_string_field_longer_than_ < value.size()) { truncated_value = value.substr(0, truncate_string_field_longer_than_) + @@ -2380,31 +2384,31 @@ void TextFormat::Printer::PrintFieldValue(const Message& message, } /* static */ bool TextFormat::PrintToString(const Message& message, - string* output) { + std::string* output) { return Printer().PrintToString(message, output); } /* static */ bool TextFormat::PrintUnknownFieldsToString( - const UnknownFieldSet& unknown_fields, string* output) { + const UnknownFieldSet& unknown_fields, std::string* output) { return Printer().PrintUnknownFieldsToString(unknown_fields, output); } /* static */ void TextFormat::PrintFieldValueToString( const Message& message, const FieldDescriptor* field, int index, - string* output) { + std::string* output) { return Printer().PrintFieldValueToString(message, field, index, output); } /* static */ bool TextFormat::ParseFieldValueFromString( - const string& input, const FieldDescriptor* field, Message* message) { + const std::string& input, const FieldDescriptor* field, Message* message) { return Parser().ParseFieldValueFromString(input, field, message); } // Prints an integer as hex with a fixed number of digits dependent on the // integer type. template -static string PaddedHex(IntType value) { - string result; +static std::string PaddedHex(IntType value) { + std::string result; result.reserve(sizeof(value) * 2); for (int i = sizeof(value) * 2 - 1; i >= 0; i--) { result.push_back(int_to_hex_digit(value >> (i * 4) & 0x0F)); @@ -2416,7 +2420,7 @@ void TextFormat::Printer::PrintUnknownFields( const UnknownFieldSet& unknown_fields, TextGenerator* generator) const { for (int i = 0; i < unknown_fields.field_count(); i++) { const UnknownField& field = unknown_fields.field(i); - string field_number = StrCat(field.number()); + std::string field_number = StrCat(field.number()); switch (field.type()) { case UnknownField::TYPE_VARINT: @@ -2455,7 +2459,7 @@ void TextFormat::Printer::PrintUnknownFields( } case UnknownField::TYPE_LENGTH_DELIMITED: { generator->PrintString(field_number); - const string& value = field.length_delimited(); + const std::string& value = field.length_delimited(); UnknownFieldSet embedded_unknown_fields; if (!value.empty() && embedded_unknown_fields.ParseFromString(value)) { // This field is parseable as a Message. diff --git a/src/google/protobuf/text_format.h b/src/google/protobuf/text_format.h index 3026def605..4c7c33b466 100644 --- a/src/google/protobuf/text_format.h +++ b/src/google/protobuf/text_format.h @@ -84,8 +84,8 @@ class PROTOBUF_EXPORT TextFormat { // even if printing fails. Returns false if printing fails. static bool PrintToString(const Message& message, std::string* output); - // Like PrintUnknownFields(), but outputs directly to a string. Returns false - // if printing fails. + // Like PrintUnknownFields(), but outputs directly to a string. Returns + // false if printing fails. static bool PrintUnknownFieldsToString(const UnknownFieldSet& unknown_fields, std::string* output); @@ -171,14 +171,14 @@ class PROTOBUF_EXPORT TextFormat { virtual std::string PrintBytes(const std::string& val) const; virtual std::string PrintEnum(int32 val, const std::string& name) const; virtual std::string PrintFieldName(const Message& message, - const Reflection* reflection, - const FieldDescriptor* field) const; - virtual std::string PrintMessageStart(const Message& message, int field_index, - int field_count, - bool single_line_mode) const; + const Reflection* reflection, + const FieldDescriptor* field) const; + virtual std::string PrintMessageStart(const Message& message, + int field_index, int field_count, + bool single_line_mode) const; virtual std::string PrintMessageEnd(const Message& message, int field_index, - int field_count, - bool single_line_mode) const; + int field_count, + bool single_line_mode) const; private: FastFieldValuePrinter delegate_; @@ -317,9 +317,9 @@ class PROTOBUF_EXPORT TextFormat { // Set how parser finds message for Any payloads. void SetFinder(const Finder* finder) { finder_ = finder; } - // If non-zero, we truncate all string fields that are longer than this - // threshold. This is useful when the proto message has very long strings, - // e.g., dump of encoded image file. + // If non-zero, we truncate all string fields that are longer than + // this threshold. This is useful when the proto message has very long + // strings, e.g., dump of encoded image file. // // NOTE(hfgong): Setting a non-zero value breaks round-trip safe // property of TextFormat::Printer. That is, from the printed message, we diff --git a/src/google/protobuf/text_format_unittest.cc b/src/google/protobuf/text_format_unittest.cc index 023827bb4f..0bed993f33 100644 --- a/src/google/protobuf/text_format_unittest.cc +++ b/src/google/protobuf/text_format_unittest.cc @@ -71,14 +71,14 @@ namespace protobuf { namespace text_format_unittest { // A basic string with different escapable characters for testing. -const string kEscapeTestString = - "\"A string with ' characters \n and \r newlines and \t tabs and \001 " - "slashes \\ and multiple spaces"; +const std::string kEscapeTestString = + "\"A string with ' characters \n and \r newlines and \t tabs and \001 " + "slashes \\ and multiple spaces"; // A representation of the above string with all the characters escaped. -const string kEscapeTestStringEscaped = - "\"\\\"A string with \\' characters \\n and \\r newlines " - "and \\t tabs and \\001 slashes \\\\ and multiple spaces\""; +const std::string kEscapeTestStringEscaped = + "\"\\\"A string with \\' characters \\n and \\r newlines " + "and \\t tabs and \\001 slashes \\\\ and multiple spaces\""; class TextFormatTest : public testing::Test { public: @@ -95,13 +95,13 @@ class TextFormatTest : public testing::Test { protected: // Debug string read from text_format_unittest_data.txt. - const string proto_debug_string_; + const std::string proto_debug_string_; unittest::TestAllTypes proto_; private: - static string static_proto_debug_string_; + static std::string static_proto_debug_string_; }; -string TextFormatTest::static_proto_debug_string_; +std::string TextFormatTest::static_proto_debug_string_; class TextFormatExtensionsTest : public testing::Test { public: @@ -118,14 +118,13 @@ class TextFormatExtensionsTest : public testing::Test { protected: // Debug string read from text_format_unittest_data.txt. - const string proto_debug_string_; + const std::string proto_debug_string_; unittest::TestAllExtensions proto_; private: - static string static_proto_debug_string_; + static std::string static_proto_debug_string_; }; -string TextFormatExtensionsTest::static_proto_debug_string_; - +std::string TextFormatExtensionsTest::static_proto_debug_string_; TEST_F(TextFormatTest, Basic) { TestUtil::SetAllFields(&proto_); @@ -162,7 +161,7 @@ TEST_F(TextFormatTest, ShortPrimitiveRepeateds) { TextFormat::Printer printer; printer.SetUseShortRepeatedPrimitives(true); - string text; + std::string text; EXPECT_TRUE(printer.PrintToString(proto_, &text)); EXPECT_EQ("optional_int32: 123\n" @@ -174,8 +173,8 @@ TEST_F(TextFormatTest, ShortPrimitiveRepeateds) { "repeated_nested_enum: [FOO, BAR]\n", text); - // Verify that any existing data in the string is cleared when - // PrintToString() is called. + // Verify that any existing data in the string is cleared when PrintToString() + // is called. text = "just some data here...\n\nblah blah"; EXPECT_TRUE(printer.PrintToString(proto_, &text)); @@ -208,13 +207,12 @@ TEST_F(TextFormatTest, StringEscape) { proto_.set_optional_string(kEscapeTestString); // Get the DebugString from the proto. - string debug_string = proto_.DebugString(); - string utf8_debug_string = proto_.Utf8DebugString(); + std::string debug_string = proto_.DebugString(); + std::string utf8_debug_string = proto_.Utf8DebugString(); // Hardcode a correct value to test against. - string correct_string = "optional_string: " - + kEscapeTestStringEscaped - + "\n"; + std::string correct_string = + "optional_string: " + kEscapeTestStringEscaped + "\n"; // Compare. EXPECT_EQ(correct_string, debug_string); @@ -222,8 +220,8 @@ TEST_F(TextFormatTest, StringEscape) { // the protocol buffer contains no UTF-8 text. EXPECT_EQ(correct_string, utf8_debug_string); - string expected_short_debug_string = "optional_string: " - + kEscapeTestStringEscaped; + std::string expected_short_debug_string = + "optional_string: " + kEscapeTestStringEscaped; EXPECT_EQ(expected_short_debug_string, proto_.ShortDebugString()); } @@ -233,18 +231,18 @@ TEST_F(TextFormatTest, Utf8DebugString) { proto_.set_optional_bytes("\350\260\267\346\255\214"); // Get the DebugString from the proto. - string debug_string = proto_.DebugString(); - string utf8_debug_string = proto_.Utf8DebugString(); + std::string debug_string = proto_.DebugString(); + std::string utf8_debug_string = proto_.Utf8DebugString(); // Hardcode a correct value to test against. - string correct_utf8_string = + std::string correct_utf8_string = "optional_string: " "\"\350\260\267\346\255\214\"" "\n" "optional_bytes: " "\"\\350\\260\\267\\346\\255\\214\"" "\n"; - string correct_string = + std::string correct_string = "optional_string: " "\"\\350\\260\\267\\346\\255\\214\"" "\n" @@ -306,7 +304,7 @@ TEST_F(TextFormatTest, PrintUnknownFieldsHidden) { TextFormat::Printer printer; printer.SetHideUnknownFields(true); - string output; + std::string output; printer.PrintToString(message, &output); EXPECT_EQ("data: \"data\"\n", output); @@ -339,10 +337,10 @@ TEST_F(TextFormatTest, PrintUnknownMessage) { // nested message. message.add_repeated_nested_message()->set_bb(123); - string data; + std::string data; message.SerializeToString(&data); - string text; + std::string text; UnknownFieldSet unknown_fields; EXPECT_TRUE(unknown_fields.ParseFromString(data)); EXPECT_TRUE(TextFormat::PrintUnknownFieldsToString(unknown_fields, &text)); @@ -365,7 +363,7 @@ TEST_F(TextFormatTest, PrintMessageWithIndent) { message.add_repeated_string("def"); message.add_repeated_nested_message()->set_bb(123); - string text; + std::string text; TextFormat::Printer printer; printer.SetInitialIndentLevel(1); EXPECT_TRUE(printer.PrintToString(message, &text)); @@ -387,7 +385,7 @@ TEST_F(TextFormatTest, PrintMessageSingleLine) { message.add_repeated_string("def"); message.add_repeated_nested_message()->set_bb(123); - string text; + std::string text; TextFormat::Printer printer; printer.SetInitialIndentLevel(1); printer.SetSingleLineMode(true); @@ -416,7 +414,7 @@ TEST_F(TextFormatTest, PrintBufferTooSmall) { // A printer that appends 'u' to all unsigned int32. class CustomUInt32FieldValuePrinter : public TextFormat::FieldValuePrinter { public: - virtual string PrintUInt32(uint32 val) const { + virtual std::string PrintUInt32(uint32 val) const { return StrCat(FieldValuePrinter::PrintUInt32(val), "u"); } }; @@ -433,14 +431,14 @@ TEST_F(TextFormatTest, DefaultCustomFieldPrinter) { printer.SetDefaultFieldValuePrinter(new CustomUInt32FieldValuePrinter()); // Let's see if that works well together with the repeated primitives: printer.SetUseShortRepeatedPrimitives(true); - string text; + std::string text; printer.PrintToString(message, &text); EXPECT_EQ("optional_uint32: 42u\nrepeated_uint32: [1u, 2u, 3u]\n", text); } class CustomInt32FieldValuePrinter : public TextFormat::FieldValuePrinter { public: - virtual string PrintInt32(int32 val) const { + virtual std::string PrintInt32(int32 val) const { return StrCat("value-is(", FieldValuePrinter::PrintInt32(val), ")"); } }; @@ -455,7 +453,7 @@ TEST_F(TextFormatTest, FieldSpecificCustomPrinter) { EXPECT_TRUE(printer.RegisterFieldValuePrinter( message.GetDescriptor()->FindFieldByName("optional_int32"), new CustomInt32FieldValuePrinter())); - string text; + std::string text; printer.PrintToString(message, &text); EXPECT_EQ("optional_int32: value-is(42)\nrepeated_int32: 42\n", text); } @@ -491,15 +489,14 @@ TEST_F(TextFormatTest, ErrorCasesRegisteringFieldValuePrinterShouldFail) { class CustomMessageFieldValuePrinter : public TextFormat::FieldValuePrinter { public: - virtual string PrintInt32(int32 v) const { + virtual std::string PrintInt32(int32 v) const { return StrCat(FieldValuePrinter::PrintInt32(v), " # x", strings::Hex(v)); } - virtual string PrintMessageStart(const Message& message, - int field_index, - int field_count, - bool single_line_mode) const { + virtual std::string PrintMessageStart(const Message& message, int field_index, + int field_count, + bool single_line_mode) const { if (single_line_mode) { return " { "; } @@ -519,7 +516,7 @@ TEST_F(TextFormatTest, CustomPrinterForComments) { TextFormat::Printer printer; CustomMessageFieldValuePrinter my_field_printer; printer.SetDefaultFieldValuePrinter(new CustomMessageFieldValuePrinter()); - string text; + std::string text; printer.PrintToString(message, &text); EXPECT_EQ( "optional_nested_message { # NestedMessage: -1\n" @@ -542,10 +539,9 @@ TEST_F(TextFormatTest, CustomPrinterForComments) { class CustomMultilineCommentPrinter : public TextFormat::FieldValuePrinter { public: - virtual string PrintMessageStart(const Message& message, - int field_index, - int field_count, - bool single_line_comment) const { + virtual std::string PrintMessageStart(const Message& message, int field_index, + int field_count, + bool single_line_comment) const { return StrCat(" { # 1\n", " # 2\n"); } }; @@ -557,7 +553,7 @@ TEST_F(TextFormatTest, CustomPrinterForMultilineComments) { TextFormat::Printer printer; CustomMessageFieldValuePrinter my_field_printer; printer.SetDefaultFieldValuePrinter(new CustomMultilineCommentPrinter()); - string text; + std::string text; printer.PrintToString(message, &text); EXPECT_EQ( "optional_nested_message { # 1\n" @@ -628,7 +624,7 @@ TEST_F(TextFormatTest, CompactRepeatedFieldPrinter) { message.add_repeated_nested_message()->set_bb(2); message.add_repeated_nested_message()->set_bb(3); - string text; + std::string text; ASSERT_TRUE(printer.PrintToString(message, &text)); EXPECT_EQ( "repeated_nested_message {\n" @@ -643,12 +639,12 @@ TEST_F(TextFormatTest, CompactRepeatedFieldPrinter) { // BaseTextGenerator::Indent and BaseTextGenerator::Outdent. class MultilineStringPrinter : public TextFormat::FastFieldValuePrinter { public: - void PrintString(const string& val, + void PrintString(const std::string& val, TextFormat::BaseTextGenerator* generator) const override { generator->Indent(); int last_pos = 0; int newline_pos = val.find('\n'); - while (newline_pos != string::npos) { + while (newline_pos != std::string::npos) { generator->PrintLiteral("\n"); TextFormat::FastFieldValuePrinter::PrintString( val.substr(last_pos, newline_pos + 1 - last_pos), generator); @@ -676,7 +672,7 @@ TEST_F(TextFormatTest, MultilineStringPrinter) { protobuf_unittest::TestAllTypes message; message.set_optional_string("first line\nsecond line\nthird line"); - string text; + std::string text; ASSERT_TRUE(printer.PrintToString(message, &text)); EXPECT_EQ( "optional_string: \n" @@ -703,7 +699,7 @@ TEST_F(TextFormatTest, CustomMessagePrinter) { new CustomNestedMessagePrinter); unittest::TestAllTypes message; - string text; + std::string text; EXPECT_TRUE(printer.PrintToString(message, &text)); EXPECT_EQ("", text); @@ -728,8 +724,8 @@ TEST_F(TextFormatExtensionsTest, ParseExtensions) { TEST_F(TextFormatTest, ParseEnumFieldFromNumber) { // Create a parse string with a numerical value for an enum field. - string parse_string = strings::Substitute("optional_nested_enum: $0", - unittest::TestAllTypes::BAZ); + std::string parse_string = strings::Substitute("optional_nested_enum: $0", + unittest::TestAllTypes::BAZ); EXPECT_TRUE(TextFormat::ParseFromString(parse_string, &proto_)); EXPECT_TRUE(proto_.has_optional_nested_enum()); EXPECT_EQ(unittest::TestAllTypes::BAZ, proto_.optional_nested_enum()); @@ -737,8 +733,8 @@ TEST_F(TextFormatTest, ParseEnumFieldFromNumber) { TEST_F(TextFormatTest, ParseEnumFieldFromNegativeNumber) { ASSERT_LT(unittest::SPARSE_E, 0); - string parse_string = strings::Substitute("sparse_enum: $0", - unittest::SPARSE_E); + std::string parse_string = + strings::Substitute("sparse_enum: $0", unittest::SPARSE_E); unittest::SparseEnumMessage proto; EXPECT_TRUE(TextFormat::ParseFromString(parse_string, &proto)); EXPECT_TRUE(proto.has_sparse_enum()); @@ -767,7 +763,7 @@ TEST_F(TextFormatTest, PrintUnknownEnumFieldProto3) { TEST_F(TextFormatTest, ParseUnknownEnumFieldProto3) { proto3_unittest::TestAllTypes proto; - string parse_string = + std::string parse_string = "repeated_nested_enum: [10, -10, 2147483647, -2147483648]"; EXPECT_TRUE(TextFormat::ParseFromString(parse_string, &proto)); ASSERT_EQ(4, proto.repeated_nested_enum_size()); @@ -779,9 +775,8 @@ TEST_F(TextFormatTest, ParseUnknownEnumFieldProto3) { TEST_F(TextFormatTest, ParseStringEscape) { // Create a parse string with escpaed characters in it. - string parse_string = "optional_string: " - + kEscapeTestStringEscaped - + "\n"; + std::string parse_string = + "optional_string: " + kEscapeTestStringEscaped + "\n"; io::ArrayInputStream input_stream(parse_string.data(), parse_string.size()); @@ -793,7 +788,7 @@ TEST_F(TextFormatTest, ParseStringEscape) { TEST_F(TextFormatTest, ParseConcatenatedString) { // Create a parse string with multiple parts on one line. - string parse_string = "optional_string: \"foo\" \"bar\"\n"; + std::string parse_string = "optional_string: \"foo\" \"bar\"\n"; io::ArrayInputStream input_stream1(parse_string.data(), parse_string.size()); @@ -819,7 +814,7 @@ TEST_F(TextFormatTest, ParseFloatWithSuffix) { // end. This is needed for backwards-compatibility with proto1. // Have it parse a float with the 'f' suffix. - string parse_string = "optional_float: 1.0f\n"; + std::string parse_string = "optional_float: 1.0f\n"; io::ArrayInputStream input_stream(parse_string.data(), parse_string.size()); @@ -831,7 +826,7 @@ TEST_F(TextFormatTest, ParseFloatWithSuffix) { } TEST_F(TextFormatTest, ParseShortRepeatedForm) { - string parse_string = + std::string parse_string = // Mixed short-form and long-form are simply concatenated. "repeated_int32: 1\n" "repeated_int32: [456, 789]\n" @@ -871,7 +866,7 @@ TEST_F(TextFormatTest, ParseShortRepeatedForm) { } TEST_F(TextFormatTest, ParseShortRepeatedWithTrailingComma) { - string parse_string = "repeated_int32: [456,]\n"; + std::string parse_string = "repeated_int32: [456,]\n"; ASSERT_FALSE(TextFormat::ParseFromString(parse_string, &proto_)); parse_string = "repeated_nested_enum: [ FOO , ]"; ASSERT_FALSE(TextFormat::ParseFromString(parse_string, &proto_)); @@ -883,7 +878,7 @@ TEST_F(TextFormatTest, ParseShortRepeatedWithTrailingComma) { } TEST_F(TextFormatTest, ParseShortRepeatedEmpty) { - string parse_string = + std::string parse_string = "repeated_int32: []\n" "repeated_nested_enum: []\n" "repeated_string: []\n" @@ -900,7 +895,7 @@ TEST_F(TextFormatTest, ParseShortRepeatedEmpty) { } TEST_F(TextFormatTest, ParseShortRepeatedConcatenatedWithEmpty) { - string parse_string = + std::string parse_string = // Starting with empty [] should have no impact. "repeated_int32: []\n" "repeated_nested_enum: []\n" @@ -955,8 +950,9 @@ TEST_F(TextFormatTest, ParseShortRepeatedConcatenatedWithEmpty) { TEST_F(TextFormatTest, Comments) { // Test that comments are ignored. - string parse_string = "optional_int32: 1 # a comment\n" - "optional_int64: 2 # another comment"; + std::string parse_string = + "optional_int32: 1 # a comment\n" + "optional_int64: 2 # another comment"; io::ArrayInputStream input_stream(parse_string.data(), parse_string.size()); @@ -972,7 +968,7 @@ TEST_F(TextFormatTest, OptionalColon) { // Test that we can place a ':' after the field name of a nested message, // even though we don't have to. - string parse_string = "optional_nested_message: { bb: 1}\n"; + std::string parse_string = "optional_nested_message: { bb: 1}\n"; io::ArrayInputStream input_stream(parse_string.data(), parse_string.size()); @@ -986,7 +982,7 @@ TEST_F(TextFormatTest, OptionalColon) { // Some platforms (e.g. Windows) insist on padding the exponent to three // digits when one or two would be just fine. -static string RemoveRedundantZeros(string text) { +static std::string RemoveRedundantZeros(std::string text) { text = StringReplace(text, "e+0", "e+", true); text = StringReplace(text, "e-0", "e-", true); return text; @@ -1008,7 +1004,7 @@ TEST_F(TextFormatTest, PrintExotic) { message.add_repeated_double(std::numeric_limits::infinity()); message.add_repeated_double(-std::numeric_limits::infinity()); message.add_repeated_double(std::numeric_limits::quiet_NaN()); - message.add_repeated_string(string("\000\001\a\b\f\n\r\t\v\\\'\"", 12)); + message.add_repeated_string(std::string("\000\001\a\b\f\n\r\t\v\\\'\"", 12)); // Fun story: We used to use 1.23e22 instead of 1.23e21 above, but this // seemed to trigger an odd case on MinGW/GCC 3.4.5 where GCC's parsing of @@ -1207,9 +1203,9 @@ TEST_F(TextFormatTest, ParseExotic) { EXPECT_TRUE(MathLimits::IsNaN(message.repeated_double(12))); // Note: Since these string literals have \0's in them, we must explicitly - // pass their sizes to string's constructor. + // pass their sizes to string's constructor. ASSERT_EQ(1, message.repeated_string_size()); - EXPECT_EQ(string("\000\001\a\b\f\n\r\t\v\\\'\"", 12), + EXPECT_EQ(std::string("\000\001\a\b\f\n\r\t\v\\\'\"", 12), message.repeated_string(0)); } @@ -1239,7 +1235,7 @@ TEST_F(TextFormatTest, PrintFieldsInIndexOrder) { *message.MutableExtension(protobuf_unittest::my_extension_string) = "ext_str0"; TextFormat::Printer printer; - string text; + std::string text; // By default, print in field number order. // my_int: 12345 @@ -1300,19 +1296,19 @@ TEST_F(TextFormatTest, PrintFieldsInIndexOrder) { class TextFormatParserTest : public testing::Test { protected: - void ExpectFailure(const string& input, const string& message, int line, - int col) { + void ExpectFailure(const std::string& input, const std::string& message, + int line, int col) { std::unique_ptr proto(new unittest::TestAllTypes); ExpectFailure(input, message, line, col, proto.get()); } - void ExpectFailure(const string& input, const string& message, int line, - int col, Message* proto) { + void ExpectFailure(const std::string& input, const std::string& message, + int line, int col, Message* proto) { ExpectMessage(input, message, line, col, proto, false); } - void ExpectMessage(const string& input, const string& message, int line, - int col, Message* proto, bool expected_result) { + void ExpectMessage(const std::string& input, const std::string& message, + int line, int col, Message* proto, bool expected_result) { MockErrorCollector error_collector; parser_.RecordErrorsTo(&error_collector); EXPECT_EQ(expected_result, parser_.ParseFromString(input, proto)) @@ -1323,7 +1319,7 @@ class TextFormatParserTest : public testing::Test { parser_.RecordErrorsTo(nullptr); } - void ExpectSuccessAndTree(const string& input, Message* proto, + void ExpectSuccessAndTree(const std::string& input, Message* proto, TextFormat::ParseInfoTree* info_tree) { MockErrorCollector error_collector; parser_.RecordErrorsTo(&error_collector); @@ -1333,9 +1329,9 @@ class TextFormatParserTest : public testing::Test { parser_.RecordErrorsTo(nullptr); } - void ExpectLocation(TextFormat::ParseInfoTree* tree, - const Descriptor* d, const string& field_name, - int index, int line, int column) { + void ExpectLocation(TextFormat::ParseInfoTree* tree, const Descriptor* d, + const std::string& field_name, int index, int line, + int column) { TextFormat::ParseLocation location = tree->GetLocation( d->FindFieldByName(field_name), index); EXPECT_EQ(line, location.line); @@ -1349,15 +1345,15 @@ class TextFormatParserTest : public testing::Test { MockErrorCollector() {} ~MockErrorCollector() {} - string text_; + std::string text_; // implements ErrorCollector ------------------------------------- - void AddError(int line, int column, const string& message) { + void AddError(int line, int column, const std::string& message) { strings::SubstituteAndAppend(&text_, "$0:$1: $2\n", line + 1, column + 1, message); } - void AddWarning(int line, int column, const string& message) { + void AddWarning(int line, int column, const std::string& message) { AddError(line, column, "WARNING:" + message); } }; @@ -1369,7 +1365,7 @@ TEST_F(TextFormatParserTest, ParseInfoTreeBuilding) { std::unique_ptr message(new unittest::TestAllTypes); const Descriptor* d = message->GetDescriptor(); - string stringData = + std::string stringData = "optional_int32: 1\n" "optional_int64: 2\n" " optional_double: 2.4\n" @@ -1385,7 +1381,6 @@ TEST_F(TextFormatParserTest, ParseInfoTreeBuilding) { " bb: 80\n" ">"; - TextFormat::ParseInfoTree tree; ExpectSuccessAndTree(stringData, message.get(), &tree); @@ -1773,7 +1768,7 @@ TEST_F(TextFormatParserTest, ExplicitDelimiters) { } TEST_F(TextFormatParserTest, PrintErrorsToStderr) { - std::vector errors; + std::vector errors; { ScopedMemoryLog log; @@ -1790,7 +1785,7 @@ TEST_F(TextFormatParserTest, PrintErrorsToStderr) { } TEST_F(TextFormatParserTest, FailsOnTokenizationError) { - std::vector errors; + std::vector errors; { ScopedMemoryLog log; diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc index 7232af8d50..92db4ba2a4 100644 --- a/src/google/protobuf/timestamp.pb.cc +++ b/src/google/protobuf/timestamp.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,54 +16,52 @@ // @@protoc_insertion_point(includes) #include -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class TimestampDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Timestamp_default_instance_; -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE static void InitDefaultsTimestamp_google_2fprotobuf_2ftimestamp_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::google::protobuf::_Timestamp_default_instance_; - new (ptr) ::google::protobuf::Timestamp(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_; + new (ptr) PROTOBUF_NAMESPACE_ID::Timestamp(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::google::protobuf::Timestamp::InitAsDefaultInstance(); + PROTOBUF_NAMESPACE_ID::Timestamp::InitAsDefaultInstance(); } -PROTOBUF_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTimestamp_google_2fprotobuf_2ftimestamp_2eproto}, {}}; +PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTimestamp_google_2fprotobuf_2ftimestamp_2eproto}, {}}; void InitDefaults_google_2fprotobuf_2ftimestamp_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base); } -static ::google::protobuf::Metadata file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[1]; -static constexpr ::google::protobuf::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr; -static constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr; -const ::google::protobuf::uint32 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Timestamp, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::google::protobuf::Timestamp, seconds_), - PROTOBUF_FIELD_OFFSET(::google::protobuf::Timestamp, nanos_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, seconds_), + PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::Timestamp, nanos_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::protobuf::Timestamp)}, +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::Timestamp)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::protobuf::_Timestamp_default_instance_), +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_), }; -static ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptorsTable assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto = { {}, AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, "google/protobuf/timestamp.proto", schemas, file_default_instances, TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets, file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto, file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto, @@ -77,23 +75,22 @@ const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] = "obuf/ptypes/timestamp\370\001\001\242\002\003GPB\252\002\036Google." "Protobuf.WellKnownTypesb\006proto3" ; -static ::google::protobuf::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto = { +static ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto = { false, InitDefaults_google_2fprotobuf_2ftimestamp_2eproto, descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto, "google/protobuf/timestamp.proto", &assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto, 231, }; void AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::PROTOBUF_NAMESPACE_ID::internal::InitFunc deps[1] = { }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, deps, 0); + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, deps, 0); } // Force running AddDescriptors() at dynamic initialization time. static bool dynamic_init_dummy_google_2fprotobuf_2ftimestamp_2eproto = []() { AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto(); return true; }(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN // =================================================================== @@ -109,19 +106,19 @@ const int Timestamp::kNanosFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Timestamp::Timestamp() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:google.protobuf.Timestamp) } -Timestamp::Timestamp(::google::protobuf::Arena* arena) - : ::google::protobuf::Message(), +Timestamp::Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(arena) { SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp) } Timestamp::Timestamp(const Timestamp& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&seconds_, &from.seconds_, @@ -149,20 +146,20 @@ void Timestamp::ArenaDtor(void* object) { Timestamp* _this = reinterpret_cast< Timestamp* >(object); (void)_this; } -void Timestamp::RegisterArenaDtor(::google::protobuf::Arena*) { +void Timestamp::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } void Timestamp::SetCachedSize(int size) const { _cached_size_.Set(size); } const Timestamp& Timestamp::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base); return *internal_default_instance(); } void Timestamp::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -173,23 +170,24 @@ void Timestamp::Clear() { } #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Timestamp::_InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) { +const char* Timestamp::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { - ::google::protobuf::uint32 tag; - ptr = ::google::protobuf::internal::ReadTag(ptr, &tag); + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); switch (tag >> 3) { // int64 seconds = 1; case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - set_seconds(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 8) goto handle_unusual; + set_seconds(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } // int32 nanos = 2; case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - set_nanos(::google::protobuf::internal::ReadVarint(&ptr)); + if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) != 16) goto handle_unusual; + set_nanos(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); break; } @@ -210,21 +208,21 @@ const char* Timestamp::_InternalParse(const char* ptr, ::google::protobuf::inter } #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER bool Timestamp::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; + ::PROTOBUF_NAMESPACE_ID::uint32 tag; // @@protoc_insertion_point(parse_start:google.protobuf.Timestamp) for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int64 seconds = 1; case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( input, &seconds_))); } else { goto handle_unusual; @@ -234,10 +232,10 @@ bool Timestamp::MergePartialFromCodedStream( // int32 nanos = 2; case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( input, &nanos_))); } else { goto handle_unusual; @@ -250,7 +248,7 @@ bool Timestamp::MergePartialFromCodedStream( if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } @@ -267,46 +265,46 @@ failure: #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void Timestamp::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.protobuf.Timestamp) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->seconds(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->seconds(), output); } // int32 nanos = 2; if (this->nanos() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->nanos(), output); } if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); } // @@protoc_insertion_point(serialize_end:google.protobuf.Timestamp) } -::google::protobuf::uint8* Timestamp::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Timestamp::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->seconds(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->seconds(), target); } // int32 nanos = 2; if (this->nanos() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target); } if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp) @@ -319,41 +317,41 @@ size_t Timestamp::ByteSizeLong() const { if (_internal_metadata_.have_unknown_fields()) { total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( _internal_metadata_.unknown_fields()); } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // int64 seconds = 1; if (this->seconds() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( this->seconds()); } // int32 nanos = 2; if (this->nanos() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( this->nanos()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Timestamp::MergeFrom(const ::google::protobuf::Message& from) { +void Timestamp::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Timestamp) GOOGLE_DCHECK_NE(&from, this); const Timestamp* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Timestamp) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Timestamp) MergeFrom(*source); @@ -364,7 +362,7 @@ void Timestamp::MergeFrom(const Timestamp& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.seconds() != 0) { @@ -375,7 +373,7 @@ void Timestamp::MergeFrom(const Timestamp& from) { } } -void Timestamp::CopyFrom(const ::google::protobuf::Message& from) { +void Timestamp::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Timestamp) if (&from == this) return; Clear(); @@ -419,22 +417,19 @@ void Timestamp::InternalSwap(Timestamp* other) { swap(nanos_, other->nanos_); } -::google::protobuf::Metadata Timestamp::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto); +::PROTOBUF_NAMESPACE_ID::Metadata Timestamp::GetMetadata() const { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::assign_descriptors_table_google_2fprotobuf_2ftimestamp_2eproto); return ::file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::google::protobuf::Timestamp* Arena::CreateMaybeMessage< ::google::protobuf::Timestamp >(Arena* arena) { - return Arena::CreateMessageInternal< ::google::protobuf::Timestamp >(arena); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Timestamp >(Arena* arena) { + return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::Timestamp >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/src/google/protobuf/timestamp.pb.h b/src/google/protobuf/timestamp.pb.h index 729d00bacf..1d2debbdf8 100644 --- a/src/google/protobuf/timestamp.pb.h +++ b/src/google/protobuf/timestamp.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/protobuf/timestamp.proto -#ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto -#define PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto #include #include @@ -31,61 +31,56 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -namespace google { -namespace protobuf { -namespace internal { -class AnyMetadata; -} // namespace internal -} // namespace protobuf -} // namespace google // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto PROTOBUF_EXPORT +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ftimestamp_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[1] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; void PROTOBUF_EXPORT AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto(); -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN class Timestamp; class TimestampDefaultTypeInternal; PROTOBUF_EXPORT extern TimestampDefaultTypeInternal _Timestamp_default_instance_; -template<> PROTOBUF_EXPORT ::google::protobuf::Timestamp* Arena::CreateMaybeMessage<::google::protobuf::Timestamp>(Arena*); -} // namespace protobuf -} // namespace google -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage(Arena*); +PROTOBUF_NAMESPACE_CLOSE +PROTOBUF_NAMESPACE_OPEN // =================================================================== class PROTOBUF_EXPORT Timestamp final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ { public: Timestamp(); virtual ~Timestamp(); Timestamp(const Timestamp& from); - - inline Timestamp& operator=(const Timestamp& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Timestamp(Timestamp&& from) noexcept : Timestamp() { *this = ::std::move(from); } + inline Timestamp& operator=(const Timestamp& from) { + CopyFrom(from); + return *this; + } inline Timestamp& operator=(Timestamp&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -94,14 +89,14 @@ class PROTOBUF_EXPORT Timestamp final : } return *this; } - #endif - inline ::google::protobuf::Arena* GetArena() const final { + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { return GetArenaNoVirtual(); } inline void* GetMaybeArenaPointer() const final { return MaybeArenaPtr(); } - static const ::google::protobuf::Descriptor* descriptor() { + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return default_instance().GetDescriptor(); } static const Timestamp& default_instance(); @@ -126,11 +121,11 @@ class PROTOBUF_EXPORT Timestamp final : return CreateMaybeMessage(nullptr); } - Timestamp* New(::google::protobuf::Arena* arena) const final { + Timestamp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Timestamp& from); void MergeFrom(const Timestamp& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; @@ -138,15 +133,15 @@ class PROTOBUF_EXPORT Timestamp final : size_t ByteSizeLong() const final; #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; #else bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: @@ -154,17 +149,17 @@ class PROTOBUF_EXPORT Timestamp final : inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Timestamp* other); - friend class ::google::protobuf::internal::AnyMetadata; - static ::google::protobuf::StringPiece FullMessageName() { + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "google.protobuf.Timestamp"; } protected: - explicit Timestamp(::google::protobuf::Arena* arena); + explicit Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::google::protobuf::Arena* arena); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { @@ -172,7 +167,7 @@ class PROTOBUF_EXPORT Timestamp final : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- @@ -181,26 +176,26 @@ class PROTOBUF_EXPORT Timestamp final : // int64 seconds = 1; void clear_seconds(); static const int kSecondsFieldNumber = 1; - ::google::protobuf::int64 seconds() const; - void set_seconds(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 seconds() const; + void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); // int32 nanos = 2; void clear_nanos(); static const int kNanosFieldNumber = 2; - ::google::protobuf::int32 nanos() const; - void set_nanos(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 nanos() const; + void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); // @@protoc_insertion_point(class_scope:google.protobuf.Timestamp) private: class HasBitSetters; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - template friend class ::google::protobuf::Arena::InternalHelper; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::int64 seconds_; - ::google::protobuf::int32 nanos_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::int64 seconds_; + ::PROTOBUF_NAMESPACE_ID::int32 nanos_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_google_2fprotobuf_2ftimestamp_2eproto; }; // =================================================================== @@ -218,11 +213,11 @@ class PROTOBUF_EXPORT Timestamp final : inline void Timestamp::clear_seconds() { seconds_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 Timestamp::seconds() const { +inline ::PROTOBUF_NAMESPACE_ID::int64 Timestamp::seconds() const { // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds) return seconds_; } -inline void Timestamp::set_seconds(::google::protobuf::int64 value) { +inline void Timestamp::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { seconds_ = value; // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds) @@ -232,11 +227,11 @@ inline void Timestamp::set_seconds(::google::protobuf::int64 value) { inline void Timestamp::clear_nanos() { nanos_ = 0; } -inline ::google::protobuf::int32 Timestamp::nanos() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 Timestamp::nanos() const { // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos) return nanos_; } -inline void Timestamp::set_nanos(::google::protobuf::int32 value) { +inline void Timestamp::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { nanos_ = value; // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos) @@ -248,10 +243,9 @@ inline void Timestamp::set_nanos(::google::protobuf::int32 value) { // @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 26deb9d488..dbf8704782 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,48 +16,46 @@ // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Field_google_2fprotobuf_2ftype_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto; -namespace google { -namespace protobuf { +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fsource_5fcontext_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SourceContext_google_2fprotobuf_2fsource_5fcontext_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EnumValue_google_2fprotobuf_2ftype_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Field_google_2fprotobuf_2ftype_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Option_google_2fprotobuf_2ftype_2eproto; +PROTOBUF_NAMESPACE_OPEN class TypeDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Type_default_instance_; class FieldDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Field_default_instance_; class EnumDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Enum_default_instance_; class EnumValueDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _EnumValue_default_instance_; class OptionDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed